cnhis-design-vue 2.2.3 → 2.2.5

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 (750) hide show
  1. package/CHANGELOG.md +32 -10
  2. package/es/affix/index.js +8 -8
  3. package/es/age/index.js +10 -10
  4. package/es/alert/index.js +8 -8
  5. package/es/anchor/index.js +8 -8
  6. package/es/auto-complete/index.js +8 -8
  7. package/es/avatar/index.js +8 -8
  8. package/es/back-top/index.js +8 -8
  9. package/es/badge/index.js +8 -8
  10. package/es/base/index.js +8 -8
  11. package/es/big-table/index.js +102 -102
  12. package/es/big-table/style.css +1 -1
  13. package/es/breadcrumb/index.js +8 -8
  14. package/es/button/index.js +33 -33
  15. package/es/calendar/index.js +8 -8
  16. package/es/captcha/index.js +3 -3
  17. package/es/card/index.js +8 -8
  18. package/es/card-reader-sdk/index.js +1 -1
  19. package/es/carousel/index.js +8 -8
  20. package/es/cascader/index.js +8 -8
  21. package/es/checkbox/index.js +9 -9
  22. package/es/col/index.js +8 -8
  23. package/es/collapse/index.js +8 -8
  24. package/es/color-picker/index.js +1 -1
  25. package/es/comment/index.js +8 -8
  26. package/es/config-provider/index.js +8 -8
  27. package/es/date-picker/index.js +8 -8
  28. package/es/descriptions/index.js +8 -8
  29. package/es/direct/index.js +16 -16
  30. package/es/divider/index.js +8 -8
  31. package/es/drag-layout/index.js +3 -3
  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 +262 -183
  38. package/es/form/index.js +8 -8
  39. package/es/form-model/index.js +8 -8
  40. package/es/form-table/index.js +74 -74
  41. package/es/full-calendar/index.js +4 -4
  42. package/es/index/index.js +778 -689
  43. package/es/index/style.css +1 -1
  44. package/es/input/index.js +9 -9
  45. package/es/input-number/index.js +8 -8
  46. package/es/layout/index.js +8 -8
  47. package/es/list/index.js +8 -8
  48. package/es/locale-provider/index.js +8 -8
  49. package/es/map/index.js +9 -9
  50. package/es/mentions/index.js +8 -8
  51. package/es/menu/index.js +8 -8
  52. package/es/message/index.js +8 -8
  53. package/es/multi-chat/index.js +76 -76
  54. package/es/multi-chat-client/index.js +70 -70
  55. package/es/multi-chat-history/index.js +4 -4
  56. package/es/multi-chat-record/index.js +14 -14
  57. package/es/multi-chat-setting/index.js +22 -22
  58. package/es/multi-chat-sip/index.js +1 -1
  59. package/es/notification/index.js +8 -8
  60. package/es/page-header/index.js +8 -8
  61. package/es/pagination/index.js +8 -8
  62. package/es/popconfirm/index.js +8 -8
  63. package/es/popover/index.js +8 -8
  64. package/es/progress/index.js +8 -8
  65. package/es/radio/index.js +9 -9
  66. package/es/rate/index.js +8 -8
  67. package/es/result/index.js +8 -8
  68. package/es/row/index.js +8 -8
  69. package/es/scale-container/index.js +9 -9
  70. package/es/scale-view/index.js +27 -27
  71. package/es/select/index.js +36 -21
  72. package/es/select-label/index.js +11 -11
  73. package/es/select-person/index.js +2 -2
  74. package/es/select-tag/index.js +4 -4
  75. package/es/shortcut-setter/index.js +10 -10
  76. package/es/skeleton/index.js +8 -8
  77. package/es/slider/index.js +8 -8
  78. package/es/slider-tree/index.js +9 -9
  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 +112 -117
  85. package/es/table-filter/style.css +1 -1
  86. package/es/tabs/index.js +8 -8
  87. package/es/tag/index.js +9 -9
  88. package/es/time-picker/index.js +8 -8
  89. package/es/timeline/index.js +8 -8
  90. package/es/tooltip/index.js +8 -8
  91. package/es/transfer/index.js +8 -8
  92. package/es/tree/index.js +8 -8
  93. package/es/tree-select/index.js +8 -8
  94. package/es/upload/index.js +8 -8
  95. package/es/verification-code/index.js +2 -2
  96. package/lib/cui.common.js +719 -632
  97. package/lib/cui.umd.js +719 -632
  98. package/lib/cui.umd.min.js +18 -18
  99. package/package.json +1 -1
  100. package/.prettierrc.js +0 -27
  101. package/packages/affix/index.js +0 -12
  102. package/packages/affix/src/Affix.jsx +0 -12
  103. package/packages/age/index.js +0 -27
  104. package/packages/age/src/age/index.vue +0 -140
  105. package/packages/age/src/age-com/index.vue +0 -210
  106. package/packages/alert/index.js +0 -12
  107. package/packages/alert/src/Alert.jsx +0 -11
  108. package/packages/anchor/index.js +0 -18
  109. package/packages/anchor/src/Anchor.jsx +0 -11
  110. package/packages/anchor/src/Link.jsx +0 -11
  111. package/packages/auto-complete/index.js +0 -12
  112. package/packages/auto-complete/src/AutoComplete.jsx +0 -12
  113. package/packages/avatar/index.js +0 -12
  114. package/packages/avatar/src/Avatar.jsx +0 -11
  115. package/packages/back-top/index.js +0 -12
  116. package/packages/back-top/src/BackTop.jsx +0 -11
  117. package/packages/badge/index.js +0 -12
  118. package/packages/badge/src/Badge.jsx +0 -11
  119. package/packages/base/index.js +0 -3
  120. package/packages/big-table/index.js +0 -20
  121. package/packages/big-table/src/BigTable.vue +0 -2977
  122. package/packages/big-table/src/Fieldset.vue +0 -2067
  123. package/packages/big-table/src/assets/iconfont/iconfont.css +0 -25
  124. package/packages/big-table/src/assets/iconfont/iconfont.ttf +0 -0
  125. package/packages/big-table/src/assets/img/failure.png +0 -0
  126. package/packages/big-table/src/assets/img/icon-asc.png +0 -0
  127. package/packages/big-table/src/assets/img/icon-desc.png +0 -0
  128. package/packages/big-table/src/assets/img/no-permission.png +0 -0
  129. package/packages/big-table/src/assets/img/nodata.png +0 -0
  130. package/packages/big-table/src/assets/img/notfound.png +0 -0
  131. package/packages/big-table/src/assets/img/qr.png +0 -0
  132. package/packages/big-table/src/assets/img/video_default_cover.png +0 -0
  133. package/packages/big-table/src/assets/img/xb_big.png +0 -0
  134. package/packages/big-table/src/assets/img/xb_small.png +0 -0
  135. package/packages/big-table/src/assets/style/table-base.less +0 -425
  136. package/packages/big-table/src/assets/style/table-global.less +0 -20
  137. package/packages/big-table/src/components/AutoLayoutButton.vue +0 -285
  138. package/packages/big-table/src/components/HeaderFilter.vue +0 -371
  139. package/packages/big-table/src/components/NoData.vue +0 -81
  140. package/packages/big-table/src/components/TextOverTooltip.vue +0 -120
  141. package/packages/big-table/src/components/edit-form/EditForm.vue +0 -518
  142. package/packages/big-table/src/components/edit-form/edit-component/config-data/index.js +0 -68
  143. package/packages/big-table/src/components/edit-form/edit-component/edit-date-picker/edit-date-picker.vue +0 -60
  144. package/packages/big-table/src/components/edit-form/edit-component/edit-digital/edit-digital.vue +0 -54
  145. package/packages/big-table/src/components/edit-form/edit-component/edit-input/edit-input.vue +0 -39
  146. package/packages/big-table/src/components/edit-form/edit-component/edit-input-password/edit-input-password.vue +0 -79
  147. package/packages/big-table/src/components/edit-form/edit-component/edit-month-picker/edit-month-picker.vue +0 -37
  148. package/packages/big-table/src/components/edit-form/edit-component/edit-search/edit-search.vue +0 -156
  149. package/packages/big-table/src/components/edit-form/edit-component/edit-search-more/edit-search-more.vue +0 -151
  150. package/packages/big-table/src/components/edit-form/edit-component/edit-select/edit-select.vue +0 -40
  151. package/packages/big-table/src/components/edit-form/edit-component/edit-select-multiple/edit-select-multiple.vue +0 -55
  152. package/packages/big-table/src/components/edit-form/edit-component/edit-switch/edit-switch.vue +0 -43
  153. package/packages/big-table/src/components/edit-form/edit-component/edit-textarea/edit-textarea.vue +0 -41
  154. package/packages/big-table/src/components/edit-form/edit-component/edit-time-picker/edit-time-picker.vue +0 -40
  155. package/packages/big-table/src/components/edit-form/edit-component/mixins/bound-date.js +0 -3
  156. package/packages/big-table/src/components/edit-form/edit-component/mixins/dateType.js +0 -217
  157. package/packages/big-table/src/components/edit-form/edit-component/mixins/item-default.js +0 -639
  158. package/packages/big-table/src/components/edit-form/edit-component/mixins/search.js +0 -1223
  159. package/packages/big-table/src/components/edit-form/edit-component/register-com.js +0 -26
  160. package/packages/big-table/src/components/edit-form/edit-item/form-event.js +0 -80
  161. package/packages/big-table/src/components/edit-form/edit-item/global-props.js +0 -33
  162. package/packages/big-table/src/components/edit-form/edit-item/index.js +0 -4
  163. package/packages/big-table/src/components/edit-form/edit-item/render-methods.js +0 -28
  164. package/packages/big-table/src/components/edit-form/edit-item/validate-rules.js +0 -463
  165. package/packages/big-table/src/components/edit-form/edit-mixins/form-commom.js +0 -673
  166. package/packages/big-table/src/components/edit-form/edit-mixins/index.js +0 -3
  167. package/packages/big-table/src/components/edit-form/edit-utils/index.js +0 -112
  168. package/packages/big-table/src/components/password-com.vue +0 -58
  169. package/packages/big-table/src/components/player-vod/index.vue +0 -57
  170. package/packages/big-table/src/components/player-vod/player.vue +0 -193
  171. package/packages/big-table/src/components/player-vod/video-list.vue +0 -265
  172. package/packages/big-table/src/components/player-vod/video-modal.vue +0 -131
  173. package/packages/big-table/src/utils/CustomPagination.vue +0 -86
  174. package/packages/big-table/src/utils/batchEditing.js +0 -613
  175. package/packages/big-table/src/utils/bigTableProps.js +0 -112
  176. package/packages/big-table/src/utils/checkStrictly.js +0 -58
  177. package/packages/big-table/src/utils/eventBroadcast.js +0 -24
  178. package/packages/big-table/src/utils/format.js +0 -577
  179. package/packages/big-table/src/utils/headerFilter.js +0 -691
  180. package/packages/big-table/src/utils/nestTable.js +0 -109
  181. package/packages/big-table/src/utils/tableParse.js +0 -234
  182. package/packages/breadcrumb/index.js +0 -21
  183. package/packages/breadcrumb/src/Breadcrumb.jsx +0 -11
  184. package/packages/breadcrumb/src/BreadcrumbItem.jsx +0 -11
  185. package/packages/breadcrumb/src/BreadcrumbSeparator.jsx +0 -11
  186. package/packages/button/index.js +0 -21
  187. package/packages/button/src/Button.jsx +0 -11
  188. package/packages/button/src/ButtonGroup.jsx +0 -11
  189. package/packages/button/src/ButtonPrint/components/IdentityVerification.vue +0 -181
  190. package/packages/button/src/ButtonPrint/index.vue +0 -165
  191. package/packages/button/src/ButtonPrint/js/print.es.min.js +0 -1
  192. package/packages/button/src/ButtonPrint/js/print.es.min1.js +0 -1
  193. package/packages/button/src/ButtonPrint/mixin/his-print.js +0 -95
  194. package/packages/button/src/ButtonPrint/new.vue +0 -1476
  195. package/packages/button/src/ButtonPrint/old.vue +0 -870
  196. package/packages/calendar/index.js +0 -12
  197. package/packages/calendar/src/Calendar.jsx +0 -11
  198. package/packages/captcha/index.js +0 -10
  199. package/packages/captcha/src/Captcha.vue +0 -164
  200. package/packages/captcha/src/Index.vue +0 -47
  201. package/packages/captcha/src/SlideVerify.vue +0 -285
  202. package/packages/card/index.js +0 -21
  203. package/packages/card/src/Card.jsx +0 -12
  204. package/packages/card/src/CardGrid.js +0 -7
  205. package/packages/card/src/CardMeta.js +0 -7
  206. package/packages/card-reader-sdk/index.js +0 -4
  207. package/packages/card-reader-sdk/src/cardReaderSDK.js +0 -149
  208. package/packages/card-reader-sdk/src/components/readCardDialog.vue +0 -48
  209. package/packages/card-reader-sdk/src/constants/index.js +0 -76
  210. package/packages/card-reader-sdk/src/insuranceSDK.js +0 -111
  211. package/packages/card-reader-sdk/src/utils/index.js +0 -84
  212. package/packages/card-reader-sdk/src/utils/readHealthCard.jsx +0 -57
  213. package/packages/carousel/index.js +0 -12
  214. package/packages/carousel/src/Carousel.jsx +0 -12
  215. package/packages/cascader/index.js +0 -12
  216. package/packages/cascader/src/Cascader.jsx +0 -11
  217. package/packages/checkbox/index.js +0 -30
  218. package/packages/checkbox/src/Checkbox.jsx +0 -11
  219. package/packages/checkbox/src/CheckboxImg/index.vue +0 -142
  220. package/packages/checkbox/src/Group.jsx +0 -11
  221. package/packages/col/index.js +0 -13
  222. package/packages/col/src/Col.jsx +0 -11
  223. package/packages/collapse/index.js +0 -18
  224. package/packages/collapse/src/Collapse.jsx +0 -11
  225. package/packages/collapse/src/Panel.jsx +0 -11
  226. package/packages/color-picker/index.js +0 -10
  227. package/packages/color-picker/src/color-picker.vue +0 -191
  228. package/packages/color-picker/src/style.less +0 -109
  229. package/packages/comment/index.js +0 -12
  230. package/packages/comment/src/Comment.jsx +0 -11
  231. package/packages/config-provider/index.js +0 -12
  232. package/packages/config-provider/src/ConfigProvider.jsx +0 -11
  233. package/packages/date-picker/index.js +0 -26
  234. package/packages/date-picker/src/DatePicker.jsx +0 -12
  235. package/packages/date-picker/src/MonthPicker.jsx +0 -11
  236. package/packages/date-picker/src/RangePicker.jsx +0 -11
  237. package/packages/date-picker/src/WeekPicker.jsx +0 -11
  238. package/packages/date-picker/src/utils/index.js +0 -374
  239. package/packages/descriptions/index.js +0 -18
  240. package/packages/descriptions/src/Descriptions.jsx +0 -11
  241. package/packages/descriptions/src/Item.jsx +0 -11
  242. package/packages/direct/index.js +0 -3
  243. package/packages/divider/index.js +0 -12
  244. package/packages/divider/src/Divider.jsx +0 -11
  245. package/packages/drag-layout/DragFormLeftItem.vue +0 -173
  246. package/packages/drag-layout/DragFormRightItem.vue +0 -284
  247. package/packages/drag-layout/I18n-mixins.js +0 -10
  248. package/packages/drag-layout/drag-layout.vue +0 -778
  249. package/packages/drag-layout/index.js +0 -12
  250. package/packages/drawer/index.js +0 -12
  251. package/packages/drawer/src/Drawer.jsx +0 -11
  252. package/packages/dropdown/index.js +0 -12
  253. package/packages/dropdown/src/Dropdown.jsx +0 -11
  254. package/packages/editor/index.js +0 -10
  255. package/packages/editor/src/Editor.vue +0 -201
  256. package/packages/editor/src/utils.js +0 -65
  257. package/packages/ellipsis/index.js +0 -9
  258. package/packages/ellipsis/src/Ellipsis.vue +0 -65
  259. package/packages/empty/index.js +0 -12
  260. package/packages/empty/src/Empty.jsx +0 -11
  261. package/packages/fabric-chart/index.js +0 -10
  262. package/packages/fabric-chart/src/FabricChart.vue +0 -153
  263. package/packages/fabric-chart/src/FabricGrid.vue +0 -67
  264. package/packages/fabric-chart/src/components/DropPopup.vue +0 -90
  265. package/packages/fabric-chart/src/components/MouseRightClick.vue +0 -168
  266. package/packages/fabric-chart/src/components/TimeScaleValue.vue +0 -125
  267. package/packages/fabric-chart/src/const/defaultVaule.js +0 -61
  268. package/packages/fabric-chart/src/fabric-chart/FabricCanvas.vue +0 -396
  269. package/packages/fabric-chart/src/fabric-chart/FabricLines.vue +0 -641
  270. package/packages/fabric-chart/src/fabric-chart/FabricPolylines.vue +0 -1447
  271. package/packages/fabric-chart/src/fabric-chart/FabricScaleValue.vue +0 -142
  272. package/packages/fabric-chart/src/fabric-chart/FabricTextGroup.vue +0 -928
  273. package/packages/fabric-chart/src/mixins/draw.js +0 -444
  274. package/packages/fabric-chart/src/mixins/drawExtracorporealCirculation.js +0 -222
  275. package/packages/fabric-chart/src/mixins/eventCommon.js +0 -107
  276. package/packages/fabric-chart/src/mixins/fabricCommon.js +0 -77
  277. package/packages/fabric-chart/src/mixins/fabricObject.js +0 -193
  278. package/packages/fabric-chart/src/utils/bus.js +0 -2
  279. package/packages/fabric-chart/src/utils/index.js +0 -104
  280. package/packages/form/index.js +0 -16
  281. package/packages/form/src/Form.jsx +0 -11
  282. package/packages/form/src/Item.jsx +0 -11
  283. package/packages/form-model/index.js +0 -14
  284. package/packages/form-model/src/FormModel.jsx +0 -11
  285. package/packages/form-model/src/Item.jsx +0 -11
  286. package/packages/form-table/index.js +0 -16
  287. package/packages/form-table/src/FormTable.vue +0 -1110
  288. package/packages/form-table/src/components/table-component/config-data/index.js +0 -80
  289. package/packages/form-table/src/components/table-component/global-props.js +0 -22
  290. package/packages/form-table/src/components/table-component/index.js +0 -8
  291. package/packages/form-table/src/components/table-component/mixins/bound-date.js +0 -455
  292. package/packages/form-table/src/components/table-component/mixins/dateType.js +0 -217
  293. package/packages/form-table/src/components/table-component/mixins/item-default.js +0 -257
  294. package/packages/form-table/src/components/table-component/mixins/search.js +0 -1242
  295. package/packages/form-table/src/components/table-component/register-com.js +0 -30
  296. package/packages/form-table/src/components/table-component/table-age/table-age.vue +0 -175
  297. package/packages/form-table/src/components/table-component/table-date-picker/table-date-picker.vue +0 -87
  298. package/packages/form-table/src/components/table-component/table-digital/table-digital.vue +0 -93
  299. package/packages/form-table/src/components/table-component/table-input/table-input.vue +0 -81
  300. package/packages/form-table/src/components/table-component/table-input-password/table-input-password.vue +0 -126
  301. package/packages/form-table/src/components/table-component/table-month-picker/table-month-picker.vue +0 -55
  302. package/packages/form-table/src/components/table-component/table-search/table-search.vue +0 -174
  303. package/packages/form-table/src/components/table-component/table-search-more/table-search-more.vue +0 -191
  304. package/packages/form-table/src/components/table-component/table-select/table-select.vue +0 -64
  305. package/packages/form-table/src/components/table-component/table-select-multiple/table-select-multiple.vue +0 -81
  306. package/packages/form-table/src/components/table-component/table-textarea/table-textarea.vue +0 -76
  307. package/packages/form-table/src/components/table-component/table-time-picker/table-time-picker.vue +0 -55
  308. package/packages/form-table/src/components/table-component/table-tree-select/table-tree-select.vue +0 -135
  309. package/packages/form-table/src/components/table-component/text-over-tooltip/TextOverTooltip.vue +0 -97
  310. package/packages/form-table/src/components/table-item/form-event.js +0 -81
  311. package/packages/form-table/src/components/table-item/global-props.js +0 -27
  312. package/packages/form-table/src/components/table-item/index.js +0 -4
  313. package/packages/form-table/src/components/table-item/render-methods.js +0 -28
  314. package/packages/form-table/src/components/table-item/validate-rules.js +0 -520
  315. package/packages/form-table/src/components/table-mixins/form-commom.js +0 -98
  316. package/packages/form-table/src/components/table-mixins/index.js +0 -3
  317. package/packages/form-table/src/components/table-utils/index.js +0 -112
  318. package/packages/form-table/src/disabledDetail.less +0 -46
  319. package/packages/full-calendar/index.js +0 -10
  320. package/packages/full-calendar/src/FullCalendar.vue +0 -775
  321. package/packages/full-calendar/src/api/index.js +0 -71
  322. package/packages/full-calendar/src/components/ListTag.vue +0 -184
  323. package/packages/full-calendar/src/components/Tag.vue +0 -300
  324. package/packages/full-calendar/src/components/TagDetail.vue +0 -288
  325. package/packages/full-calendar/src/utils/index.js +0 -217
  326. package/packages/grid/index.js +0 -10
  327. package/packages/grid/src/grid.js +0 -27
  328. package/packages/icon/index.js +0 -10
  329. package/packages/icon/src/icon.js +0 -13
  330. package/packages/index.js +0 -325
  331. package/packages/input/index.js +0 -30
  332. package/packages/input/src/Group.jsx +0 -11
  333. package/packages/input/src/Input.jsx +0 -11
  334. package/packages/input/src/Password.jsx +0 -11
  335. package/packages/input/src/Search.jsx +0 -11
  336. package/packages/input/src/TextArea.jsx +0 -11
  337. package/packages/input/src/input-quick/components/quick-item.vue +0 -284
  338. package/packages/input/src/input-quick/components/quick-popover.vue +0 -596
  339. package/packages/input/src/input-quick/index.vue +0 -137
  340. package/packages/input-number/index.js +0 -12
  341. package/packages/input-number/src/InputNumber.jsx +0 -11
  342. package/packages/keep-cache/KeepCache.js +0 -236
  343. package/packages/keep-cache/index.css +0 -3
  344. package/packages/keep-cache/index.js +0 -8
  345. package/packages/layout/index.js +0 -27
  346. package/packages/layout/src/Content.jsx +0 -11
  347. package/packages/layout/src/Footer.jsx +0 -11
  348. package/packages/layout/src/Header.jsx +0 -11
  349. package/packages/layout/src/Layout.jsx +0 -11
  350. package/packages/layout/src/Sider.jsx +0 -11
  351. package/packages/list/index.js +0 -21
  352. package/packages/list/src/Item.jsx +0 -11
  353. package/packages/list/src/ItemMeta.jsx +0 -11
  354. package/packages/list/src/List.jsx +0 -11
  355. package/packages/locale-provider/index.js +0 -12
  356. package/packages/locale-provider/src/LocaleProvider.jsx +0 -11
  357. package/packages/map/index.js +0 -10
  358. package/packages/map/src/Map.vue +0 -484
  359. package/packages/map/src/popup-map.vue +0 -53
  360. package/packages/mentions/index.js +0 -18
  361. package/packages/mentions/src/Mentions.jsx +0 -11
  362. package/packages/mentions/src/Option.jsx +0 -11
  363. package/packages/menu/index.js +0 -27
  364. package/packages/menu/src/Divider.jsx +0 -11
  365. package/packages/menu/src/Item.jsx +0 -11
  366. package/packages/menu/src/ItemGroup.jsx +0 -11
  367. package/packages/menu/src/Menu.jsx +0 -11
  368. package/packages/menu/src/SubMenu.jsx +0 -11
  369. package/packages/message/index.js +0 -8
  370. package/packages/modal/index.js +0 -10
  371. package/packages/modal/src/Modal.js +0 -7
  372. package/packages/multi-chat/chat/addConference.vue +0 -200
  373. package/packages/multi-chat/chat/addMembers.vue +0 -411
  374. package/packages/multi-chat/chat/advancedFilter.vue +0 -372
  375. package/packages/multi-chat/chat/audio.vue +0 -599
  376. package/packages/multi-chat/chat/calling.vue +0 -246
  377. package/packages/multi-chat/chat/chatFooter.vue +0 -1647
  378. package/packages/multi-chat/chat/chatHeader.vue +0 -493
  379. package/packages/multi-chat/chat/chatHistory.vue +0 -605
  380. package/packages/multi-chat/chat/chatMain.vue +0 -1490
  381. package/packages/multi-chat/chat/client/clientChat.vue +0 -731
  382. package/packages/multi-chat/chat/client/index.vue +0 -149
  383. package/packages/multi-chat/chat/delay.vue +0 -177
  384. package/packages/multi-chat/chat/evaluate.vue +0 -343
  385. package/packages/multi-chat/chat/index.vue +0 -2419
  386. package/packages/multi-chat/chat/messageRecord.vue +0 -324
  387. package/packages/multi-chat/chat/mixins/NoData.js +0 -20
  388. package/packages/multi-chat/chat/mixins/base.js +0 -97
  389. package/packages/multi-chat/chat/mixins/uniRTCAPI.js +0 -80
  390. package/packages/multi-chat/chat/mixins/viewerOptions.js +0 -67
  391. package/packages/multi-chat/chat/multiVideo.vue +0 -1426
  392. package/packages/multi-chat/chat/quickReply.vue +0 -439
  393. package/packages/multi-chat/chat/robot/index.vue +0 -312
  394. package/packages/multi-chat/chat/scrollList.vue +0 -1259
  395. package/packages/multi-chat/chat/video.vue +0 -404
  396. package/packages/multi-chat/chat/videoVoiceList.vue +0 -348
  397. package/packages/multi-chat/chat/voice.vue +0 -431
  398. package/packages/multi-chat/components/avatar.vue +0 -113
  399. package/packages/multi-chat/components/chat-tabs-header.vue +0 -251
  400. package/packages/multi-chat/components/classify-tabs.vue +0 -185
  401. package/packages/multi-chat/components/empty.vue +0 -24
  402. package/packages/multi-chat/components/modal-refuse-reason.vue +0 -112
  403. package/packages/multi-chat/components/modal-sip.vue +0 -160
  404. package/packages/multi-chat/components/modal-user-transfer.vue +0 -98
  405. package/packages/multi-chat/components/msg-describe.vue +0 -138
  406. package/packages/multi-chat/components/msg-picture.vue +0 -68
  407. package/packages/multi-chat/components/msg-prescription.vue +0 -205
  408. package/packages/multi-chat/components/read-record.vue +0 -133
  409. package/packages/multi-chat/components/read-status.vue +0 -34
  410. package/packages/multi-chat/components/user-status.vue +0 -198
  411. package/packages/multi-chat/components/vuecmf-dialog.vue +0 -323
  412. package/packages/multi-chat/img/OFF-LINE.png +0 -0
  413. package/packages/multi-chat/img/ON-LINE.png +0 -0
  414. package/packages/multi-chat/img/accept.png +0 -0
  415. package/packages/multi-chat/img/add-person.png +0 -0
  416. package/packages/multi-chat/img/add_prescription.png +0 -0
  417. package/packages/multi-chat/img/all-voice.png +0 -0
  418. package/packages/multi-chat/img/audio-new.png +0 -0
  419. package/packages/multi-chat/img/audio-play.gif +0 -0
  420. package/packages/multi-chat/img/audio.png +0 -0
  421. package/packages/multi-chat/img/base-info-active.png +0 -0
  422. package/packages/multi-chat/img/base-info.png +0 -0
  423. package/packages/multi-chat/img/busy_line.png +0 -0
  424. package/packages/multi-chat/img/call.png +0 -0
  425. package/packages/multi-chat/img/callin.png +0 -0
  426. package/packages/multi-chat/img/callin_cancel.png +0 -0
  427. package/packages/multi-chat/img/calling.png +0 -0
  428. package/packages/multi-chat/img/callout.png +0 -0
  429. package/packages/multi-chat/img/callout_cancel.png +0 -0
  430. package/packages/multi-chat/img/close.png +0 -0
  431. package/packages/multi-chat/img/close_video.png +0 -0
  432. package/packages/multi-chat/img/customer-service-active.png +0 -0
  433. package/packages/multi-chat/img/customer-service.png +0 -0
  434. package/packages/multi-chat/img/customer.png +0 -0
  435. package/packages/multi-chat/img/customer_staff.png +0 -0
  436. package/packages/multi-chat/img/default.png +0 -0
  437. package/packages/multi-chat/img/ellipsis.png +0 -0
  438. package/packages/multi-chat/img/end-voice.png +0 -0
  439. package/packages/multi-chat/img/event-active.png +0 -0
  440. package/packages/multi-chat/img/event.png +0 -0
  441. package/packages/multi-chat/img/exp.png +0 -0
  442. package/packages/multi-chat/img/full-sceen-close.png +0 -0
  443. package/packages/multi-chat/img/full-sceen.png +0 -0
  444. package/packages/multi-chat/img/icon_list.png +0 -0
  445. package/packages/multi-chat/img/icon_list_active.png +0 -0
  446. package/packages/multi-chat/img/icon_table.png +0 -0
  447. package/packages/multi-chat/img/icon_table_active.png +0 -0
  448. package/packages/multi-chat/img/join-video.png +0 -0
  449. package/packages/multi-chat/img/large.png +0 -0
  450. package/packages/multi-chat/img/left-wrapper.png +0 -0
  451. package/packages/multi-chat/img/left.png +0 -0
  452. package/packages/multi-chat/img/medical_record.png +0 -0
  453. package/packages/multi-chat/img/middle.png +0 -0
  454. package/packages/multi-chat/img/msgTip.mp3 +0 -0
  455. package/packages/multi-chat/img/multi-video.png +0 -0
  456. package/packages/multi-chat/img/multi-voice.png +0 -0
  457. package/packages/multi-chat/img/mute-audio.png +0 -0
  458. package/packages/multi-chat/img/muted-audio.png +0 -0
  459. package/packages/multi-chat/img/muted-screen.png +0 -0
  460. package/packages/multi-chat/img/muted-video.png +0 -0
  461. package/packages/multi-chat/img/no-all-voice.png +0 -0
  462. package/packages/multi-chat/img/no-data.png +0 -0
  463. package/packages/multi-chat/img/no-data2.png +0 -0
  464. package/packages/multi-chat/img/no-screen.png +0 -0
  465. package/packages/multi-chat/img/no-video.png +0 -0
  466. package/packages/multi-chat/img/no-voice.png +0 -0
  467. package/packages/multi-chat/img/no-voiced.png +0 -0
  468. package/packages/multi-chat/img/normal-screen.png +0 -0
  469. package/packages/multi-chat/img/normal-video.png +0 -0
  470. package/packages/multi-chat/img/over.png +0 -0
  471. package/packages/multi-chat/img/portrait.png +0 -0
  472. package/packages/multi-chat/img/prescription.png +0 -0
  473. package/packages/multi-chat/img/receive.png +0 -0
  474. package/packages/multi-chat/img/reject.png +0 -0
  475. package/packages/multi-chat/img/remove.png +0 -0
  476. package/packages/multi-chat/img/replay.png +0 -0
  477. package/packages/multi-chat/img/required.png +0 -0
  478. package/packages/multi-chat/img/screen.png +0 -0
  479. package/packages/multi-chat/img/send_prescription.png +0 -0
  480. package/packages/multi-chat/img/setting.png +0 -0
  481. package/packages/multi-chat/img/small.png +0 -0
  482. package/packages/multi-chat/img/sound.png +0 -0
  483. package/packages/multi-chat/img/sound_forbid.png +0 -0
  484. package/packages/multi-chat/img/start_video.png +0 -0
  485. package/packages/multi-chat/img/system_message.png +0 -0
  486. package/packages/multi-chat/img/to-session.png +0 -0
  487. package/packages/multi-chat/img/transfer.png +0 -0
  488. package/packages/multi-chat/img/transfer2.png +0 -0
  489. package/packages/multi-chat/img/video-accept.png +0 -0
  490. package/packages/multi-chat/img/video.png +0 -0
  491. package/packages/multi-chat/img/video_consult.png +0 -0
  492. package/packages/multi-chat/img/voice.png +0 -0
  493. package/packages/multi-chat/img/worktime-active.png +0 -0
  494. package/packages/multi-chat/img/worktime.png +0 -0
  495. package/packages/multi-chat/index.js +0 -7
  496. package/packages/multi-chat/setting/authority/index.vue +0 -156
  497. package/packages/multi-chat/setting/authority/roleSetting.vue +0 -204
  498. package/packages/multi-chat/setting/baseInfo/index.vue +0 -1343
  499. package/packages/multi-chat/setting/configuration/index.vue +0 -334
  500. package/packages/multi-chat/setting/customerService/batchSelect.vue +0 -403
  501. package/packages/multi-chat/setting/customerService/index.vue +0 -273
  502. package/packages/multi-chat/setting/event/edit/condition.vue +0 -128
  503. package/packages/multi-chat/setting/event/edit/index.vue +0 -437
  504. package/packages/multi-chat/setting/event/edit/notice.vue +0 -129
  505. package/packages/multi-chat/setting/event/edit/strategy.vue +0 -98
  506. package/packages/multi-chat/setting/event/index.vue +0 -249
  507. package/packages/multi-chat/setting/index.vue +0 -281
  508. package/packages/multi-chat/setting/page.vue +0 -14
  509. package/packages/multi-chat/setting/sessionList/index.vue +0 -412
  510. package/packages/multi-chat/setting/sessionList/messageRecord.vue +0 -372
  511. package/packages/multi-chat/setting/userConfig/index.vue +0 -124
  512. package/packages/multi-chat/setting/worktime/index.vue +0 -274
  513. package/packages/multi-chat/store/actions.js +0 -452
  514. package/packages/multi-chat/store/getters.js +0 -380
  515. package/packages/multi-chat/store/helper.js +0 -66
  516. package/packages/multi-chat/store/index.js +0 -50
  517. package/packages/multi-chat/store/mutation.js +0 -305
  518. package/packages/multi-chat/store/state.js +0 -120
  519. package/packages/multi-chat/style/emoji.css +0 -315
  520. package/packages/multi-chat/style/message.mixin.less +0 -38
  521. package/packages/multi-chat/utils/chatSock.js +0 -93
  522. package/packages/multi-chat/utils/compressImage.js +0 -115
  523. package/packages/multi-chat/utils/emoji.json +0 -68
  524. package/packages/multi-chat/utils/index.js +0 -259
  525. package/packages/multi-chat/utils/observer-scroll.js +0 -49
  526. package/packages/multi-chat/utils/panelsetting.js +0 -48
  527. package/packages/multi-chat/utils/rtc-client-multi.js +0 -397
  528. package/packages/multi-chat/utils/rtc-client.js +0 -469
  529. package/packages/multi-chat-client/index.js +0 -7
  530. package/packages/multi-chat-history/index.js +0 -7
  531. package/packages/multi-chat-record/index.js +0 -7
  532. package/packages/multi-chat-setting/index.js +0 -7
  533. package/packages/multi-chat-sip/index.js +0 -6
  534. package/packages/notification/index.js +0 -8
  535. package/packages/page-header/index.js +0 -12
  536. package/packages/page-header/src/PageHeader.jsx +0 -11
  537. package/packages/pagination/index.js +0 -12
  538. package/packages/pagination/src/Pagination.jsx +0 -11
  539. package/packages/popconfirm/index.js +0 -12
  540. package/packages/popconfirm/src/Popconfirm.jsx +0 -11
  541. package/packages/popover/index.js +0 -12
  542. package/packages/popover/src/Popover.jsx +0 -11
  543. package/packages/progress/index.js +0 -12
  544. package/packages/progress/src/Progress.jsx +0 -11
  545. package/packages/radio/index.js +0 -33
  546. package/packages/radio/src/Group.jsx +0 -11
  547. package/packages/radio/src/Radio.jsx +0 -11
  548. package/packages/radio/src/RadioButton.jsx +0 -11
  549. package/packages/radio/src/RadioImg/index.vue +0 -125
  550. package/packages/rate/index.js +0 -12
  551. package/packages/rate/src/Rate.jsx +0 -11
  552. package/packages/result/index.js +0 -12
  553. package/packages/result/src/Result.jsx +0 -11
  554. package/packages/row/index.js +0 -12
  555. package/packages/row/src/Row.jsx +0 -11
  556. package/packages/scale-container/index.js +0 -9
  557. package/packages/scale-container/src/ScaleContainer.vue +0 -202
  558. package/packages/scale-container/src/scale.png +0 -0
  559. package/packages/scale-view/NoData.vue +0 -81
  560. package/packages/scale-view/answerParse.vue +0 -133
  561. package/packages/scale-view/assets/img/failure.png +0 -0
  562. package/packages/scale-view/assets/img/no-permission.png +0 -0
  563. package/packages/scale-view/assets/img/nodata.png +0 -0
  564. package/packages/scale-view/assets/img/notfound.png +0 -0
  565. package/packages/scale-view/customList.vue +0 -801
  566. package/packages/scale-view/data.js +0 -80
  567. package/packages/scale-view/directive/drag-move.js +0 -132
  568. package/packages/scale-view/evaluateCountdown.vue +0 -157
  569. package/packages/scale-view/evaluatePage.vue +0 -203
  570. package/packages/scale-view/formitem/data.js +0 -3991
  571. package/packages/scale-view/formitem/index.js +0 -7
  572. package/packages/scale-view/formitem/r-address.vue +0 -245
  573. package/packages/scale-view/formitem/r-choice.vue +0 -755
  574. package/packages/scale-view/formitem/r-input.vue +0 -93
  575. package/packages/scale-view/formitem/r-prompt.vue +0 -52
  576. package/packages/scale-view/formitem/r-sign.vue +0 -218
  577. package/packages/scale-view/formitem/r-time.vue +0 -285
  578. package/packages/scale-view/formitem/r-upload-custom-list.vue +0 -242
  579. package/packages/scale-view/formitem/r-upload.vue +0 -321
  580. package/packages/scale-view/formitem/sign-com.vue +0 -316
  581. package/packages/scale-view/formitem/text-over-tooltip/TextOverTooltip.vue +0 -98
  582. package/packages/scale-view/index.js +0 -17
  583. package/packages/scale-view/mixin/NoData.js +0 -38
  584. package/packages/scale-view/mixin/addressVal.js +0 -156
  585. package/packages/scale-view/mixin/evaluate.js +0 -146
  586. package/packages/scale-view/mixin/index.js +0 -337
  587. package/packages/scale-view/mixin/judgeTypes.js +0 -267
  588. package/packages/scale-view/scaleView.vue +0 -2086
  589. package/packages/select/index.js +0 -30
  590. package/packages/select/src/CustomSelect/index.vue +0 -130
  591. package/packages/select/src/OptGroup.jsx +0 -11
  592. package/packages/select/src/Option.jsx +0 -11
  593. package/packages/select/src/PagerSelect/index.vue +0 -92
  594. package/packages/select/src/Select/Select.vue +0 -231
  595. package/packages/select/src/Select/index.js +0 -12
  596. package/packages/select/src/TableSelect/index.vue +0 -514
  597. package/packages/select-label/index.js +0 -14
  598. package/packages/select-label/label-classify.vue +0 -129
  599. package/packages/select-label/labelFormContent.vue +0 -787
  600. package/packages/select-label/select-label.vue +0 -597
  601. package/packages/select-person/index.js +0 -10
  602. package/packages/select-person/search-tree.vue +0 -373
  603. package/packages/select-person/select-person.vue +0 -1736
  604. package/packages/select-tag/index.js +0 -14
  605. package/packages/select-tag/label-classify.vue +0 -133
  606. package/packages/select-tag/labelFormContent.vue +0 -295
  607. package/packages/select-tag/select-label.vue +0 -274
  608. package/packages/shortcut-provider/index.js +0 -10
  609. package/packages/shortcut-provider/src/ShortcutProvider.vue +0 -33
  610. package/packages/shortcut-provider/src/constants/index.js +0 -4
  611. package/packages/shortcut-provider/src/hooks/index.js +0 -1
  612. package/packages/shortcut-provider/src/hooks/useShortcuts.js +0 -129
  613. package/packages/shortcut-provider/src/utils/index.js +0 -107
  614. package/packages/shortcut-setter/index.js +0 -12
  615. package/packages/shortcut-setter/src/ShortcutSetter.vue +0 -55
  616. package/packages/shortcut-setter/src/ShortcutSetterItem.vue +0 -97
  617. package/packages/shortcut-setter/src/utils/index.js +0 -63
  618. package/packages/skeleton/index.js +0 -12
  619. package/packages/skeleton/src/Skeleton.jsx +0 -11
  620. package/packages/slider/index.js +0 -12
  621. package/packages/slider/src/Slider.jsx +0 -11
  622. package/packages/slider-tree/hooks/useAsyncData.js +0 -53
  623. package/packages/slider-tree/index.js +0 -7
  624. package/packages/slider-tree/index.vue +0 -391
  625. package/packages/slider-tree/utils/index.js +0 -10
  626. package/packages/space/index.js +0 -12
  627. package/packages/space/src/Space.jsx +0 -11
  628. package/packages/spin/index.js +0 -12
  629. package/packages/spin/src/Spin.jsx +0 -11
  630. package/packages/statistic/index.js +0 -18
  631. package/packages/statistic/src/Countdown.jsx +0 -11
  632. package/packages/statistic/src/Statistic.jsx +0 -11
  633. package/packages/steps/index.js +0 -18
  634. package/packages/steps/src/Step.jsx +0 -11
  635. package/packages/steps/src/Steps.jsx +0 -11
  636. package/packages/switch/index.js +0 -12
  637. package/packages/switch/src/Switch.jsx +0 -11
  638. package/packages/table-filter/index.js +0 -27
  639. package/packages/table-filter/src/base-search-com/BaseSearch.vue +0 -2690
  640. package/packages/table-filter/src/classification/Classification-com.vue +0 -1765
  641. package/packages/table-filter/src/classification/search-class-name.vue +0 -266
  642. package/packages/table-filter/src/classification/search-professional-model.vue +0 -680
  643. package/packages/table-filter/src/components/TextOverTooltip.vue +0 -120
  644. package/packages/table-filter/src/components/age-com/index.vue +0 -205
  645. package/packages/table-filter/src/components/button-group/ButtonGroup.vue +0 -162
  646. package/packages/table-filter/src/components/button-icon/button-icon.js +0 -33
  647. package/packages/table-filter/src/components/button-icon/getBtnIcon.js +0 -34
  648. package/packages/table-filter/src/components/c-tree-select/tree-select.vue +0 -336
  649. package/packages/table-filter/src/components/checkbox-group/CheckboxGroup.vue +0 -53
  650. package/packages/table-filter/src/components/drop-button/drop-button.vue +0 -224
  651. package/packages/table-filter/src/components/drop-button/head-btn-icon.js +0 -33
  652. package/packages/table-filter/src/components/drop-view/drop-view.vue +0 -89
  653. package/packages/table-filter/src/components/multi-select/multi-select.vue +0 -242
  654. package/packages/table-filter/src/components/out-quick-search/out-quick-search.vue +0 -232
  655. package/packages/table-filter/src/components/range-age/index.vue +0 -171
  656. package/packages/table-filter/src/components/render-widget/components/CheckboxGroup.vue +0 -68
  657. package/packages/table-filter/src/components/render-widget/components/DateRangeQuick.vue +0 -216
  658. package/packages/table-filter/src/components/render-widget/components/Label.vue +0 -209
  659. package/packages/table-filter/src/components/render-widget/components/NumberRange.vue +0 -157
  660. package/packages/table-filter/src/components/render-widget/components/Select.vue +0 -62
  661. package/packages/table-filter/src/components/render-widget/components/SelectDynamic.vue +0 -287
  662. package/packages/table-filter/src/components/render-widget/components/SelectLabel.vue +0 -80
  663. package/packages/table-filter/src/components/render-widget/components/SelectTree.vue +0 -145
  664. package/packages/table-filter/src/components/render-widget/components/Text.vue +0 -58
  665. package/packages/table-filter/src/components/render-widget/components/index.js +0 -11
  666. package/packages/table-filter/src/components/render-widget/enums.js +0 -60
  667. package/packages/table-filter/src/components/render-widget/helpers/presetValToTimestamp.js +0 -282
  668. package/packages/table-filter/src/components/render-widget/index.vue +0 -150
  669. package/packages/table-filter/src/components/render-widget/mixins/dynamic-method.js +0 -185
  670. package/packages/table-filter/src/components/render-widget/mixins/label-method.js +0 -23
  671. package/packages/table-filter/src/components/render-widget/widgetCfgMaps.js +0 -354
  672. package/packages/table-filter/src/components/search-condition/SearchCondition.vue +0 -2016
  673. package/packages/table-filter/src/components/search-condition/fieldTypeList.js +0 -169
  674. package/packages/table-filter/src/components/search-filter/SearchFilter.vue +0 -280
  675. package/packages/table-filter/src/components/search-modal/set-classification.vue +0 -340
  676. package/packages/table-filter/src/components/table-modal/TableModal.vue +0 -477
  677. package/packages/table-filter/src/const/dataOptions.js +0 -43
  678. package/packages/table-filter/src/const/index.js +0 -1
  679. package/packages/table-filter/src/index.vue +0 -584
  680. package/packages/table-filter/src/mixins/mixins.js +0 -870
  681. package/packages/table-filter/src/mixins/out-quick-method.js +0 -123
  682. package/packages/table-filter/src/mixins/printNew.js +0 -190
  683. package/packages/table-filter/src/mixins/renderWidget.js +0 -122
  684. package/packages/table-filter/src/mixins/tableSearchCon.js +0 -128
  685. package/packages/table-filter/src/mixins/wordBookutils.js +0 -130
  686. package/packages/table-filter/src/quick-search/QuickSearch.vue +0 -2272
  687. package/packages/tabs/index.js +0 -18
  688. package/packages/tabs/src/TabPane.jsx +0 -11
  689. package/packages/tabs/src/Tabs.jsx +0 -11
  690. package/packages/tag/index.js +0 -21
  691. package/packages/tag/src/CheckableTag.jsx +0 -11
  692. package/packages/tag/src/Tag.jsx +0 -11
  693. package/packages/tag/src/TagGroup.vue +0 -622
  694. package/packages/time-picker/index.js +0 -12
  695. package/packages/time-picker/src/TimePicker.jsx +0 -11
  696. package/packages/timeline/index.js +0 -14
  697. package/packages/timeline/src/Item.jsx +0 -11
  698. package/packages/timeline/src/Timeline.jsx +0 -11
  699. package/packages/tooltip/index.js +0 -12
  700. package/packages/tooltip/src/Tooltip.jsx +0 -11
  701. package/packages/transfer/index.js +0 -12
  702. package/packages/transfer/src/Transfer.jsx +0 -11
  703. package/packages/tree/index.js +0 -18
  704. package/packages/tree/src/Tree.jsx +0 -11
  705. package/packages/tree/src/TreeNode.jsx +0 -11
  706. package/packages/tree-select/index.js +0 -18
  707. package/packages/tree-select/src/TreeNode.jsx +0 -11
  708. package/packages/tree-select/src/TreeSelect.jsx +0 -11
  709. package/packages/upload/chunk-upload/chunk-upload-new.vue +0 -1006
  710. package/packages/upload/chunk-upload/vod-chunk-upload.vue +0 -757
  711. package/packages/upload/chunk-upload/vod-upload-modal.vue +0 -100
  712. package/packages/upload/index.js +0 -12
  713. package/packages/upload/src/Upload.jsx +0 -11
  714. package/packages/verification-code/SlideVerify.vue +0 -306
  715. package/packages/verification-code/index.js +0 -17
  716. package/packages/verification-code/verification-code.vue +0 -147
  717. package/src/assets/img/nodata.png +0 -0
  718. package/src/assets/img/success.png +0 -0
  719. package/src/assets/img/video.png +0 -0
  720. package/src/assets/img/video_default_cover.png +0 -0
  721. package/src/assets/img/video_hover.png +0 -0
  722. package/src/assets/img/video_play_hover.png +0 -0
  723. package/src/component/player-vod/index.vue +0 -57
  724. package/src/component/player-vod/player.vue +0 -192
  725. package/src/component/player-vod/video-list.vue +0 -262
  726. package/src/component/player-vod/video-modal.vue +0 -128
  727. package/src/component/select-options/index.vue +0 -430
  728. package/src/component/select-pages/index.vue +0 -95
  729. package/src/component/svg/index.vue +0 -59
  730. package/src/core/create.js +0 -6
  731. package/src/core/event.js +0 -23
  732. package/src/core/table-methods.js +0 -447
  733. package/src/directive/flexibleResize.js +0 -162
  734. package/src/directive/preventReClick.js +0 -12
  735. package/src/directive/scroll.js +0 -230
  736. package/src/global/variable.js +0 -2
  737. package/src/style/normalize.css +0 -424
  738. package/src/style/style.less +0 -49
  739. package/src/utils/UniRTCv2.js +0 -627
  740. package/src/utils/chatFetch.js +0 -61
  741. package/src/utils/clickoutside.js +0 -75
  742. package/src/utils/crypto.js +0 -25
  743. package/src/utils/index.js +0 -103
  744. package/src/utils/kty-sdk.js +0 -582
  745. package/src/utils/kty.min-1.0.0.js +0 -14378
  746. package/src/utils/sip-device.js +0 -79
  747. package/src/utils/time-domain.js +0 -270
  748. package/src/utils/trtc.js +0 -1
  749. package/src/utils/utils-map.js +0 -485
  750. package/src/utils/vexutils.js +0 -836
@@ -1,2977 +0,0 @@
1
- <template>
2
- <div
3
- class="big-table"
4
- :class="{
5
- mt: visibleCheckAllWrap || visibleTreeCheck || hasRefresh,
6
- 'expand-padding': !isNestTable,
7
- 'table-editing': isTableEdit
8
- }"
9
- :style="{ height: tableHeight }"
10
- >
11
- <div class="check-wrap" v-if="hasRefresh && !isNestTable">
12
- <p class="check-wrap-title">
13
- <span>系统检测到有数据更新,</span>
14
- <span class="check-wrap-btn" @click="refreshTable">点击查看</span>
15
- </p>
16
- </div>
17
- <!-- 全选 选择框 -->
18
- <div class="check-wrap" v-show="visibleCheckAllWrap && !isInlineOperating && !isNestTable">
19
- <p class="check-wrap-title">
20
- <span>已勾选数据共{{ allSelectedLength }}条</span>
21
- <span v-show="visibleCheckAllWrapMore">(当前页{{ currentPageSelectedLength }}条)</span>
22
- </p>
23
- <template v-if="visibleCheckAllWrapMore">
24
-
25
- <p v-if="!visibleCancelCheckAllBtn" class="check-wrap-btn" @click="handleCheckAll">
26
- <!-- asyncCount 性能模式也可以“勾选全部” -->
27
- <span v-if="pageVO.total > MAX_CHECK_SIZE">
28
- <!-- {{ `最大勾选“${tableName}” ${MAX_CHECK_SIZE}条数据` }} -->
29
- {{ `勾选全部页 ${MAX_CHECK_SIZE}条数据` }}
30
- </span>
31
- <span v-else>
32
- <!-- {{ $t("1.9.598", { name: tableName, total }) }} -->
33
- {{ `勾选全部页 ${pageVO.total}条数据` }}
34
- </span>
35
- </p>
36
- <p v-else class="check-wrap-btn" @click="handleCancelAllCheck">取消全部勾选</p>
37
- </template>
38
- </div>
39
- <!-- 树状表格已选 -->
40
- <div v-show="visibleTreeCheck && !isInlineOperating && !isNestTable" class="check-wrap">
41
- <p class="check-wrap-title">
42
- <span>已勾选数据共{{ treeTableLength }}条</span>
43
- </p>
44
- </div>
45
- <c-grid
46
- border
47
- :show-overflow="isShowOverflow"
48
- show-header-overflow
49
- highlight-hover-row
50
- highlight-current-row
51
- show-footer-overflow="title"
52
- :keep-source="isTree != 1"
53
- ref="xGrid"
54
- height="auto"
55
- resizable
56
- auto-resize
57
- :row-id="handleRowId"
58
- :row-class-name="getRowClassName"
59
- :show-footer="showFooter && !isInlineOperating"
60
- :footer-method="footerMethod"
61
- :sort-config="{ trigger: 'cell', remote: true }"
62
- :tree-config="treeConfig"
63
- :span-method="colspanMethod"
64
- :footer-span-method="footerRowspanMethod"
65
- @cell-dblclick="rowdblclick"
66
- @cell-click="handlerClickRow"
67
- @checkbox-change="selectionChange"
68
- @checkbox-all="selectionChangeAll"
69
- @radio-change="radioOnChange"
70
- @sort-change="sortChange"
71
- @scroll="handlerScroll"
72
- @cell-mouseenter="handleCellMouseenter"
73
- :tooltip-config="{ enterable: false }"
74
- :checkbox-config="{
75
- checkField: 'checked',
76
- labelField: 'checked',
77
- checkMethod: checkMethod,
78
- trigger: 'cell',
79
- reserve: true,
80
- highlight: true,
81
- ...(isCheckStrictly ? { checkStrictly: true, showHeader: true } : {})
82
- }"
83
- :seq-config="handleSeqConfig"
84
- :radio-config="{
85
- checkField: 'checked',
86
- trigger: 'cell',
87
- reserve: true,
88
- highlight: true
89
- }"
90
- :cell-style="getCellStyle"
91
- :row-style="getRowStyle"
92
- :edit-config="{ trigger: 'manual', mode: 'row', autoClear: false, showIcon: false }"
93
- :scroll-x="scrollXConfig"
94
- :scroll-y="scrollYConfig"
95
- :expand-config="{
96
- lazy: true,
97
- accordion: columnConfig && columnConfig.accordion,
98
- loadMethod: loadExpandMethod,
99
- toggleMethod: toggleExpandMethod,
100
- iconOpen: 'iconfont icon-a-xitongtubiaozhediejian',
101
- iconClose: 'iconfont icon-a-xitongtubiaotianjia'
102
- }"
103
- :row-config="{ isCurrent: true }"
104
- v-bind="tableAttrs"
105
- >
106
- <template v-slot:empty>
107
- <div v-if="isShowEmpty">
108
- <NoData :noDataImg="emptyItems.noDataImg" :noDataTip="emptyItems.noDataTip" :showImg="!isNestTable"></NoData>
109
- </div>
110
- </template>
111
- <!-- 修复 vxe-table升级3.x版本 原自定义checkbox样式失效 -->
112
- <template v-slot:tooltip_checkbox="{ row, checked }">
113
- <a-tooltip v-if="row.forbiddenBatchSelect" :title="row.forbiddenBatchSelectReason" placement="right" trigger="hover">
114
- <i class="disabled-checked-tips"></i>
115
- </a-tooltip>
116
- <a-checkbox class="tooltip-checkbox-item" v-else :checked="checked"></a-checkbox>
117
- </template>
118
- <template v-slot:tooltip_footer="{ column }">
119
- <!-- 分组统计 -->
120
- <template v-if="groupCountFields && groupCountFields.length">
121
- <span v-html="groupText"></span>
122
- </template>
123
- <!-- 一般统计 -->
124
- <a-tooltip v-else overlayClassName="table-footer-tooltip-wrap">
125
- <template slot="title">
126
- <div v-html="getFooterTooltipTitle(column)"></div>
127
- </template>
128
- {{ getFooterTitle(column) }}
129
- </a-tooltip>
130
- </template>
131
- <!-- 子列表嵌套 -->
132
- <template v-slot:nest_table_content="{ row, rowIndex, $rowIndex, column }">
133
- <slot name="content" :data="{ row, rowIndex, $rowIndex, column }"></slot>
134
- </template>
135
- </c-grid>
136
- <!-- `${refreshRow}条更新` -->
137
- <div class="refresh" v-show="refreshRow > 0 && !isNestTable" @click="hanldeClickRefresh">
138
- <a-icon type="sync"></a-icon>
139
- <p class="refresh-row">{{ refreshRow }}条更新</p>
140
- </div>
141
- </div>
142
- </template>
143
-
144
- <script>
145
- import Vue from 'vue';
146
- import VueXss from 'vue-xss';
147
- import TextOverTooltip from './components/TextOverTooltip.vue';
148
- import AutoLayoutButton from './components/AutoLayoutButton.vue';
149
- import { Icon, Tooltip, Progress, Switch, Popover, Button, Dropdown, Menu, Checkbox, Input, Popconfirm } from 'ant-design-vue';
150
- import format from './utils/format';
151
- import { parseDurationValue, parseCombinationValue, formatFieldText, imgs2imgArr, parseNumberField } from './utils/tableParse';
152
- import passwordCom from './components/password-com.vue';
153
- import NoData from './components/NoData.vue';
154
- import VideoList from './components/player-vod/video-list';
155
- import Grid from '~/grid';
156
- import vexutils from '@/utils/vexutils';
157
- import DomPortal from 'vue-dom-portal';
158
- import create from '@/core/create';
159
-
160
- let hideAllWrap = null;
161
-
162
- import { GROUP_TITLE_KEY } from '@/global/variable';
163
-
164
- import batchEditing from './utils/batchEditing';
165
- import checkStrictly from './utils/checkStrictly';
166
- import headerFilter from './utils/headerFilter';
167
- import EditForm from './components/edit-form/EditForm.vue';
168
- import HeaderFilter from './components/HeaderFilter.vue'
169
-
170
- import nestTable from './utils/nestTable';
171
- import eventBroadcast from './utils/eventBroadcast';
172
- import bigTableProps from './utils/bigTableProps';
173
- import SvgIcon from '@/component/svg/index.vue';
174
- import cloneDeep from 'lodash/cloneDeep';
175
-
176
- let addInlineEditPrimaryKey = '';
177
- export default create({
178
- name: 'big-table',
179
- components: {
180
- TextOverTooltip,
181
- passwordCom,
182
- NoData,
183
- EditForm,
184
- [Icon.name]: Icon,
185
- [Tooltip.name]: Tooltip,
186
- [Progress.name]: Progress,
187
- [Switch.name]: Switch,
188
- [Popover.name]: Popover,
189
- [Dropdown.name]: Dropdown,
190
- [Popconfirm.name]: Popconfirm,
191
- [Menu.name]: Menu,
192
- [Grid.name]: Grid,
193
- [VideoList.name]: VideoList,
194
- SvgIcon,
195
- AutoLayoutButton
196
- },
197
- mixins: [format, batchEditing, nestTable, eventBroadcast, checkStrictly, headerFilter],
198
- props: Object.assign({}, bigTableProps),
199
- beforeCreate() {
200
- Vue.use(Button)
201
- .use(Checkbox)
202
- .use(Input)
203
- .use(DomPortal);
204
- !this.$xss && Vue.use(VueXss);
205
- },
206
- mounted() {
207
- this.bindDocumentClick();
208
- this.tableHeight = this.handleTableHeight();
209
-
210
- // 子列表在mounted后初始化 直接watch无法触发
211
- if (!this.isNestTable) return;
212
- this.loadColumn(this.columnConfig);
213
- this.loadData(this.data);
214
- },
215
- // activated() {
216
- // // 行编辑状态下 切换tab 再切回 需要重置页面样式
217
- // this.removeInsert();
218
- // },
219
- beforeRouteLeave() {},
220
- beforeDestroy() {
221
- // 移除事件监听
222
- this.$off();
223
- },
224
- destroyed() {
225
- this.unBindDocumentClick();
226
- },
227
- data() {
228
- return {
229
- curAbleCheckedLen: 0, // 当前页能够多选的选项个数
230
- showButtonTop: 0,
231
- // hasOnlyIcon: false,
232
- isTree: 0, // 0非数表 1全加载数表 2懒加载数表 3分组表
233
- isShowEmpty: false,
234
- /* 全选相关 */
235
- currentPageSelectedLength: 0,
236
- visibleCheckAllWrap: false,
237
- visibleCheckAllWrapMore: false,
238
- // 已勾选的表格row数据
239
- checkedRows: [],
240
- // 存储所有当前可筛选的表头
241
- filterFields: {},
242
- /* 树状已选 */
243
- visibleTreeCheck: false,
244
- treeTableLength: 0,
245
- treeTableData: [],
246
- checkWidth: {
247
- 'table-simple': '30',
248
- 'table-classics': '24'
249
- },
250
- lastPageIndex: 1,
251
- selectType: '',
252
- levelLazyLoadSetting: null, // 数表懒加载配置
253
- openOnly: 0, // 手风琴模式
254
- filterWidth: 280, // 筛选框宽度
255
- filterHeight: 120, // 筛选框高度
256
- startX: 0, // 起始距离
257
- distance: 0, // 移动距离
258
- mask: '', // 拖拽遮罩层
259
- groupText: [], // 分组统计 text
260
-
261
- /* 行内编辑相关 */
262
- currentClickBtnInfo: null,
263
- /* */
264
-
265
- columnLen: 0, // column 长度
266
- hasRefresh: false, // 当前列表是否有新的更新
267
- isExpand: 0, // isTree == 1 是否全部展开
268
- btnIcons: {
269
- // 按钮icon 映射
270
- copy: 'copy',
271
- pencil: 'edit',
272
- delete: 'delete',
273
- add: 'plus-circle',
274
- download: 'download',
275
- label: 'tag',
276
- queding: 'check',
277
- del: 'close'
278
- },
279
- tableHeight: '100%',
280
- allCheckedRows: [],
281
- scrollXConfig: { enabled: false, gt: 25, oSize: 10, }, // 暂时去掉横向虚拟滚动,2023.8.2
282
- scrollYConfig: { enabled: true, gt: 50, mode: 'wheel' },
283
- isShowOverflow: true
284
- };
285
- },
286
- computed: {
287
- currentCheckedKeys() {
288
- return this.checkedRows?.map(row => row[this.primaryKey]) || [];
289
- },
290
- allSelectedLength() {
291
- return this.checkedRows?.length;
292
- },
293
- allLen() {
294
- return this.allCheckedRows?.length || this.pageVO.total;
295
- },
296
- visibleCancelCheckAllBtn() {
297
- let isCurrentPageAllCheck = this.currentPageSelectedLength === this.curAbleCheckedLen;
298
- let isMaxChecked = this.currentCheckedKeys.length === this.MAX_CHECK_SIZE;
299
- let isCheckedTotal = this.currentCheckedKeys.length === this.allLen;
300
-
301
- return isMaxChecked || !isCurrentPageAllCheck || isCheckedTotal;
302
- },
303
- handleRowId() {
304
- if (this.isTree == 2 || this.isTree == 3) {
305
- return 'theUniqueKey';
306
- }
307
- return this.primaryKey || 'theUniqueKey';
308
- },
309
- handlePrimaryKey() {
310
- return this.isTree > 0 ? this.primaryKey || 'theUniqueKey' : 'theUniqueKey';
311
- },
312
- handleName() {
313
- return function(item, key = 'name') {
314
- return item.alias || item[key];
315
- };
316
- },
317
- treeConfig() {
318
- let result = null;
319
- switch (Number(this.isTree)) {
320
- case 1:
321
- case 3:
322
- if(this.treeVirtualScroll) {
323
- result = {
324
- accordion: this.openOnly > 0,
325
- reserve: true,
326
- transform: true,
327
- rowField: '_row_field',
328
- parentField: '_parent_field'
329
- }
330
- } else {
331
- // 同步树
332
- result = {
333
- children: 'childrenList',
334
- accordion: this.openOnly > 0,
335
- reserve: true
336
- };
337
- }
338
-
339
- break;
340
- case 2:// 异步树
341
- result = {
342
- lazy: true,
343
- reserve: true,
344
- children: 'childrenList',
345
- hasChild: 'hasChildren',
346
- loadMethod: this.loadChildrenMethod,
347
- accordion: this.openOnly > 0,
348
- iconLoaded: 'iconfont icon-loading roll'
349
- };
350
- break;
351
- default:
352
- break;
353
- }
354
- return result;
355
- },
356
- handleFooterGroupText() {
357
- let { groupText } = this;
358
- if (!groupText) return '';
359
- let value = groupText;
360
- if (this.checkHtml(groupText)) {
361
- value = this.htmlToText(groupText);
362
- }
363
- return value;
364
- },
365
- singleCheckedKey() {
366
- const checkedKeys = this.currentCheckedKeys || [];
367
- return checkedKeys.length == 1 ? checkedKeys[0] : '';
368
- },
369
- getRowClassName() {
370
- return this.selectType === 'checkbox'
371
- ? ({ row }) => {
372
- const k = this.singleCheckedKey;
373
- return k && k === row[this.primaryKey] ? 'single--checked' : '';
374
- }
375
- : () => {};
376
- },
377
- handleSeqConfig() {
378
- if (this.isNestTable) return { startIndex: 0 };
379
- if (this.isBatchEditing) {
380
- return { startIndex: 0 };
381
- }
382
- let startIndex = (this.pageVO.pageIndex - 1) * this.pageVO.pageSize;
383
- return { startIndex: startIndex < 0 ? 0 : startIndex };
384
- },
385
- isScanMultiTable() {
386
- return this.columnConfig?.isScanMultiTable;
387
- },
388
- tableNoSetting() {
389
- let { noSetting } = this.getOtherConfigInit() || {};
390
- return noSetting || this.showSettings?.hideSettingBtn == 1 || this.isTableEdit;
391
- },
392
- // 行编辑字段map
393
- listFormUnionSettingMap() {
394
- let paramsList = this?.listFormUnionSetting?.paramsList || {};
395
- let tableFieldMap = {};
396
- paramsList.forEach(v => {
397
- tableFieldMap[v.tableField] = v;
398
- });
399
- return tableFieldMap;
400
- },
401
- tableAttrs() {
402
- return this?.tableProps || {};
403
- },
404
- isKeepSource(){
405
- // 树表默认是false
406
- if(this.isTree == 1) return false;
407
- // 是否配置编辑表单
408
- return !!(this.listFormUnionSetting?.formId || false)
409
- },
410
- isTreeTable() {
411
- return this.isTree != 0;
412
- }
413
- },
414
- watch: {
415
- columnConfig(config) {
416
- if (!config || !Object.keys(config).length) return;
417
- this.loadColumn(config);
418
- },
419
- data(value) {
420
- const list = value.map(v => {
421
- const newV = {};
422
- for (let i in v) {
423
- if (typeof v[i] === 'number') {
424
- newV[i] = v[i];
425
- } else {
426
- // loadData 方法内有深拷贝,这里多余操作,先去掉
427
- // newV[i] = JSON.parse(JSON.stringify(v[i] || ''));
428
- newV[i] = v[i]
429
- }
430
- if (newV[i] && typeof v[i] === 'string' && !newV[i].includes('security-code')) {
431
- newV[i] = this.$xss(v[i]);
432
- }
433
- }
434
- return newV;
435
- });
436
- this.loadData(list);
437
- },
438
- quickSearchConfig: {
439
- handler: function() {
440
- this.setFilterStatus();
441
- },
442
- deep: true
443
- },
444
- tableDataCache: {
445
- handler: function(val) {
446
- this.setAllCheckedRows(val);
447
- },
448
- deep: true
449
- },
450
- currentCheckedKeys() {
451
- this.setVisibleCheckAllWrap();
452
- },
453
- 'pageVO.pageSize'() {
454
- if (this.isNestTable) return;
455
- this.setVisibleCheckAllWrap();
456
- this.resetTableInlineEditStatus();
457
- },
458
- 'pageVO.pageIndex'() {
459
- if (this.isNestTable) return;
460
- this.setTalbeScrollTo();
461
- this.resetTableInlineEditStatus();
462
- },
463
- 'styleSetting.tableHeight'() {
464
- if (this.isNestTable) return;
465
- if (Object.keys(this.columnConfig).length > 0) {
466
- this.loadColumn(this.columnConfig);
467
- this.loadData(this.data);
468
- this.setTalbeScrollTo();
469
- }
470
- },
471
- sysImageSize: {
472
- deep: true,
473
- immediate: true,
474
- handler(val) {
475
- const v = this.styleSetting?.tableHeight === 'table-simple' ? '26' : '22';
476
- this.handleTableImageSize(val, 'LIST_FIELD_SMALL', v + 'px');
477
- }
478
- },
479
-
480
- // $route(val) {
481
- // this.resetTableInlineEditStatus();
482
- // },
483
- tableRefreshCache: {
484
- immediate: true,
485
- deep: true,
486
- handler(val, oldVal) {
487
- if (this.isNestTable) return;
488
- const { orgId } = this?.userInfo?.map?.sysParams || {};
489
- // 增加判断老旧数据是否相同,判断orgId是否相等
490
- if (val != oldVal && this.tableParams && val[this.tableParams.tableId] && orgId == val[this.tableParams.tableId]) {
491
- this.hasRefresh = true;
492
- }
493
- }
494
- },
495
- 'tableParams.tableId': {
496
- handler(val) {
497
- this.$nextTick(() => {
498
- if (val && this.tableRefreshCache[val]) {
499
- this.hasRefresh = true;
500
- }
501
- });
502
- }
503
- }
504
- },
505
- methods: {
506
- customerInit() {
507
- this.loadColumn(this.columnConfig);
508
- this.loadData(this.data);
509
- },
510
- setTalbeScrollTo() {
511
- let table = this.$refs.xGrid;
512
- if (!table) return;
513
- table.scrollTo(table.getScroll().scrollLeft, 0);
514
- },
515
- hideSelectCloumns() {
516
- let vxeTable = this.$refs.xGrid;
517
- let findSelectCloumns = vxeTable.getColumns()?.find(item => item.type === this.selectType);
518
- findSelectCloumns && vxeTable.hideColumn(findSelectCloumns);
519
- },
520
- setVisibleCheckAllWrap() {
521
- if (this.isNestTable) return;
522
- if (this.isTree == 1) {
523
- this.visibleCheckAllWrap = false;
524
- return false;
525
- }
526
-
527
- this.visibleCheckAllWrap = this.currentCheckedKeys.length > 1;
528
-
529
- let len = this.currentCheckedKeys.length;
530
- let isLargerOrEqualPageSize = len >= this.curAbleCheckedLen;
531
- let isShowAllTable = this.pageVO.pageSize === this.pageVO.total;
532
- let isSpreadSelected = this.currentCheckedKeys.length > this.currentPageSelectedLength;
533
-
534
- this.visibleCheckAllWrapMore = isSpreadSelected || (isLargerOrEqualPageSize && !isShowAllTable);
535
- },
536
- // 加载表格内容
537
- async loadData(data) {
538
- this.isLoadData = false;
539
- this.isShowEmpty = !data?.length;
540
-
541
- // const list = JSON.parse(JSON.stringify(data));
542
- const list = cloneDeep(data)
543
- let table = this.$refs.xGrid;
544
- if (!table) return;
545
- let formatList = this.setChecklist(list);
546
- this.originFormatList = formatList;
547
-
548
- this.setGroupTitleToFristColumnFieldData(formatList);
549
- this.curAbleCheckedLen = list.filter(item => this.checkMethod({ row: item })).length;
550
-
551
- // 非子列表触发
552
- if (!this.isNestTable) {
553
- await this.handleFormTheUniqueKey();
554
- }
555
-
556
- // reloadData 替换 loadData 保存setting之后需要表格重新reload
557
- // loadData 加载数据
558
- // reloadData 加载数据并清除所有状态
559
- // 暂时 不知道是否影响其它????
560
- // 还是用loadData较好,树表展开需要在更新数据后保留上一次的状态
561
- // table.clearSort(); // <-- table.loadData 不会清空sort选项,导致sortChange重复触发
562
-
563
- /**
564
- * TODO: 全加载数表平铺处理,支持虚拟滚动处理
565
- */
566
- if(this.isTree == 1 && this.treeVirtualScroll){
567
- const transFormList = [];
568
- this.formatTransFormList(formatList, null, transFormList);
569
- formatList = transFormList
570
- }
571
-
572
- await table.loadData(formatList);
573
-
574
- table.setCurrentRow({});
575
- this.setCurrentPageRowChecked();
576
-
577
- this.setGroupTreeExpand();
578
- this.resetTableInlineEditStatus();
579
- this.isLoadData = true;
580
- },
581
- setGroupTreeExpand() {
582
- let isExpand = this.isTree == 1 && this.isExpand == 1 && this.total < 1001;
583
- if (this.isTree == 3 || isExpand) {
584
- let table = this.$refs.xGrid;
585
- this.$nextTick(() => {
586
- table.setAllTreeExpand(true);
587
- });
588
- }
589
- },
590
- setGroupTitleToFristColumnFieldData(formatList) {
591
- if (this.isTree != 3) return;
592
- let table = this.$refs.xGrid;
593
- let key = table.getTableColumn().tableColumn?.find(column => {
594
- return !!column.property;
595
- }).property;
596
-
597
- this.setTreeGroupTitle(formatList, key);
598
- },
599
- setTreeGroupTitle(formatList, key) {
600
- formatList.forEach(row => {
601
- if (vexutils.has(row, 'childrenList')) {
602
- this.setTreeGroupTitle(row['childrenList'], key);
603
- }
604
-
605
- if (!vexutils.has(row, GROUP_TITLE_KEY)) return;
606
- row[key] = row[GROUP_TITLE_KEY];
607
- });
608
- },
609
- resetTableInlineEditStatus() {
610
- if (!this.checkOperateCurrentTable()) return false;
611
- // 编辑中,不重置样式
612
- if (this.defaultEditAllRow || this.isEditAllRow || this.isInlineEditing || this.isBatchEditing) return false;
613
- this.handleClickCancelBtnByInline();
614
- },
615
-
616
- /**
617
- * 初始化行按钮
618
- */
619
- initRowBtnList(row){
620
- const getTextWidth = (text, font) => {
621
- const canvas = document.createElement('canvas');
622
- const context = canvas.getContext('2d');
623
- context.font = font;
624
- const metrics = context.measureText(text);
625
- return metrics.width;
626
- };
627
- const handleName = (item, key = 'name') => {
628
- return item.alias || item[key];
629
- };
630
-
631
- if(Array.isArray(row.btnList)){
632
- row.btnList.forEach((btn)=>{
633
- btn._show_title = handleName(btn);
634
- btn._show_title_width = getTextWidth(btn._show_title, '14px Arial');
635
- btn._show_btn_style = vexutils.getBtnStyle(btn);
636
- })
637
- }
638
- },
639
- setChecklist(list) {
640
- let fieldList = this?.columnConfig?.fieldList || [];
641
- const fieldListMap = fieldList.reduce((pre,cur)=> {
642
- let key = cur.columnName;
643
- if(key){
644
- pre[key] = cur;
645
- }
646
- return pre;
647
- },{});
648
-
649
- return list.map(i => {
650
- i._redner_before_ = true;
651
- this.$set(i, 'checked', false);
652
- if (this.isTree == 2) {
653
- const treeNodeKey = this.levelLazyLoadSetting.childCountKey;
654
- const { isTreeOrList = '' } = this.tableParams;
655
- if (treeNodeKey && Number(i[treeNodeKey]) > 0) {
656
- isTreeOrList != 'LIST' && this.$set(i, 'hasChildren', true);
657
- }
658
- }
659
- this.initRowBtnList(i);
660
- if (i.childrenList && i.childrenList.length) {
661
- i.childrenList = this.setChecklist(i.childrenList);
662
- }
663
- // 处理富文本字段,转为字符串,判断是否为富文本,中转标志_temp+id,/<[^>]+>/g.test(i[item].replace(/<span (.*?)>(.*?)<\/span>$/g, ""))处理过大文本会卡住,replace的问题,直接判断有没有p元素就行
664
- Object.keys(i).map(item => {
665
- let isHtml = this.checkHtml(i[item])
666
- if (i[item] && typeof i[item] == 'string' && i[item].indexOf('<p') !== -1 && item.indexOf('_temp_' + i.id) === -1) {
667
- i[item + '_temp_' + i.id] = i[item] || '';
668
- i[item] = this.htmlToText(i[item]);
669
- }
670
-
671
- let col = fieldListMap[item];
672
- try {
673
- i[item] = col ? formatFieldText(i, col, this.columnConfig.fieldList, this.fieldListOriginal): i[item];
674
- !isHtml && (isHtml = this.checkHtml(i[item]))
675
- } catch (error) {
676
- console.log(error)
677
- }
678
- // 预处理,避免数据量大虚拟滚动时,渲染的单元格耗时长
679
- i[`_${item}__redner_before_`] = {
680
- isLink: col ? this.isLink(col, i) : undefined,
681
- isCopy:col ? this.isCopy(col, i) : undefined,
682
- tips:col ? this.handleValueTips(i, col) : undefined,
683
- isHtml
684
- }
685
-
686
- });
687
- return {
688
- ...i
689
- };
690
- });
691
- },
692
- setCurrentRow(row) {
693
- this.$refs.xGrid.setCurrentRow(row);
694
- },
695
- setDefCheckboxRow(row) {
696
- const vxeTable = this.$refs.xGrid;
697
- let { tableData } = vxeTable.getTableData();
698
- this.$refs.xGrid?.setCheckboxRow([tableData?.[0] || row], true);
699
- },
700
- // 加载表格头部
701
- loadColumn(config) {
702
- this.isLoadColumn = false;
703
- this.setTableConfig(config);
704
- // this.hasOnlyIcon = config.hasOnlyIcon;
705
- let columns = this.formatColumns(config);
706
- columns = this.handleGroupColums(columns);
707
- const xGrid = this.$refs.xGrid;
708
- xGrid && xGrid.reloadColumn(columns);
709
-
710
- this.setGroupTreeExpand();
711
- this.resetTableInlineEditStatus();
712
-
713
- this.isLoadColumn = true;
714
- },
715
- setTableConfig(config) {
716
- this.showButtonTop = config.showButtonTop;
717
- this.isTree = config.isTree;
718
- this.openOnly = config.openOnly;
719
- this.isExpand = config.spreadAllBtn;
720
- this.levelLazyLoadSetting = Object.assign({}, config.levelLazyLoadSetting);
721
- },
722
- // 获取checkbox已选行
723
- getCheckboxRecords() {
724
- const xGrid = this.$refs.xGrid;
725
- let res = [];
726
- if (xGrid) {
727
- res = xGrid.getCheckboxRecords();
728
- }
729
- return res;
730
- },
731
- // loadColumnAndData
732
- loadColumnAndData(data, config) {
733
- this.setTableConfig(config);
734
- let columns = this.formatColumns(config);
735
- columns = this.handleGroupColums(columns);
736
- const xGrid = this.$refs.xGrid;
737
- const list = this.setChecklist(data);
738
- this.curAbleCheckedLen = list.filter(item => this.checkMethod({ row: item })).length;
739
-
740
- if (!xGrid) return;
741
-
742
- Promise.all([xGrid.reloadColumn(columns), xGrid.reloadData(list)]).then(() => {
743
- console.log('列表加载完成');
744
- this.setGroupTitleToFristColumnFieldData(list);
745
- this.setGroupTreeExpand();
746
- });
747
- },
748
- // 判断是否链接字段
749
- isLink(item, row) {
750
- return (
751
- item.clickFieldKey == item.columnName ||
752
- (this.relatedItems.triggerMethodPc == 'field' && item.columnName == this.relatedItems.triggerMethodField) ||
753
- (item.isbtnLink && row.btnLinks && row.btnLinks?.includes(item.columnName))
754
- );
755
- },
756
- // 判断是否复制
757
- isCopy(item, row) {
758
- return row[item.columnName] && item.fieldSetting && item.fieldSetting.fontContentCopy == 1;
759
- },
760
- // 图片jsx:当图片类型为头像时,显示的是圆形
761
- getPicture(row, item, type) {
762
- return [
763
- <div class={['img-wrap', type === 'HEADPORTRAIT' ? 'img-circle' : '']}>
764
- {this.handleImgArr(row[item.columnName], type).map((v, i) => (
765
- <img
766
- key={i}
767
- src={this.handleImgSrc(v, this.sysImageSize, 'LIST_FIELD_SMALL')}
768
- style={this.modalDetailImage(this.sysImageSize, 'LIST_FIELD_SMALL', '36px')}
769
- on-click={e => this.handlePreView(row[item.columnName], i, e)}
770
- />
771
- ))}
772
- </div>
773
- ];
774
- },
775
- getvideoList(row, item) {
776
- let res = row[item.columnName];
777
- if (Array.isArray(res)) {
778
- res = JSON.stringify(res);
779
- }
780
- /** string */
781
- return [<video-list columnName={item.columnName} stlist={res} />];
782
- },
783
- // 字段颜色jsx
784
- getColor(row, item) {
785
- let color = row[item.columnName];
786
- // color = row.color;
787
- if (color?.includes('-')) {
788
- let colorName = color.split('-')[1];
789
- color = vexutils.oldColorMap(colorName);
790
- }
791
- return [
792
- <div class="color-wrap" style="height: 100%; padding: 4px;">
793
- <div style={{ background: color, height: '100%' }} />
794
- </div>
795
- ];
796
- },
797
- /** 评价组件 */
798
- getEvaluate(row, item) {
799
- let str = row[item.columnName];
800
- if (vexutils.isJSON(str)) {
801
- let obj = JSON.parse(str);
802
- return obj.star ? `${obj.star}星` : '';
803
- }
804
- return str;
805
- },
806
- getMapVal(row, item) {
807
- let str = row[item.columnName];
808
- if (vexutils.isJSON(str)) {
809
- let obj = JSON.parse(str);
810
- return obj.address || '';
811
- }
812
- return str;
813
- },
814
- // 日期显示格式化
815
- getDate(row, item, attrType) {
816
- let obj = row[item.columnName] || '';
817
- let style = {};
818
- // fillColor 有值代表背景色
819
- if (obj?.fillColor) {
820
- style.background = obj.fillColor;
821
- style.color = '#fff';
822
- style.padding = '0 2px';
823
- }
824
- if (obj?.background) {
825
- style.color = obj.background;
826
- }
827
- if (obj && !vexutils.isEmpty(obj)) {
828
- if (vexutils.isObject(obj) && 'tooltip' in obj) {
829
- return [
830
- <a-tooltip title={obj.tooltip}>
831
- <span domPropsInnerHTML={obj.value} style={style} />
832
- </a-tooltip>
833
- ];
834
- }
835
- }
836
- if (attrType === 'BIRTHDAY') {
837
- return [
838
- <a-tooltip title={obj}>
839
- <span domPropsInnerHTML={obj} style={style} />
840
- </a-tooltip>
841
- ];
842
- }
843
- return [<span domPropsInnerHTML={obj} style={style}></span>];
844
- },
845
- // 百分数格式化
846
- getPercentage(row, item) {
847
- let value = row[item.columnName];
848
- if (!value && value !== 0) return;
849
- let percentValue = value;
850
-
851
- let SPANTAG_REGEXP = /<\/?span.*?>/g;
852
- if (SPANTAG_REGEXP.test(value)) {
853
- let d = document.createElement('span');
854
- d.innerHTML = value;
855
- value = d.textContent;
856
- percentValue = value;
857
- }
858
-
859
- if (value && vexutils.isString(value) && value.includes('%')) {
860
- percentValue = Number(value.replace('%', ''));
861
- }
862
- let strokeColor = '#52c41a';
863
- if (percentValue < 15) {
864
- strokeColor = '#ff5500';
865
- } else if (percentValue < 50) {
866
- strokeColor = '#ff8b01';
867
- } else if (percentValue < 90) {
868
- strokeColor = '#1890ff';
869
- }
870
- if (percentValue > 100) {
871
- percentValue = 100;
872
- } else if (percentValue < 0) {
873
- percentValue = 0;
874
- }
875
- return [
876
- <div class="percent-wrap">
877
- <span class="percent-value">{percentValue}%</span>
878
- <a-progress percent={percentValue} showInfo={false} strokeColor={strokeColor} />
879
- </div>
880
- ];
881
- },
882
-
883
- /** 选人组件数据解析 */
884
- getCandidateComponents(row, item) {
885
- /**
886
- * 一人展示名字,多人展示数量 => 方晶晶(产品)
887
- */
888
- // [{"dept_id":996,"dept_name":"高手","user_name":"我是李高手"}]
889
- // 2022/12/14 列表选人组件字段,产品(方晶晶)期望鼠标悬停在 已选x人 上面时,展示所有名称 xxx,xxx,xxx
890
- let obj = row[item.columnName];
891
- if (!obj) return '';
892
- let content = '';
893
- if (obj && vexutils.isJSON(obj)) {
894
- obj = JSON.parse(obj);
895
- }
896
- if (!Array.isArray(obj) || !obj.length) return '';
897
- let len = obj.length;
898
- let showName = obj[0]?.user_name || obj[0]?.name;
899
- if (len > 1) {
900
- content = `已选${len}人`;
901
- } else if (len === 1) {
902
- content = showName || `已选${len}人`;
903
- }
904
- let tooltipTitle = obj
905
- .map(v => v.user_name || v.name)
906
- .filter(Boolean)
907
- .join(',');
908
- let refName = `item-${item.columnName}-${item[this.handleRowId]}`;
909
- let isAlias = false;
910
- if (tooltipTitle && tooltipTitle !== content) {
911
- isAlias = !!tooltipTitle;
912
- }
913
- return [<TextOverTooltip refName={refName} tooltipTitle={tooltipTitle} content={content} isAlias={isAlias}></TextOverTooltip>];
914
- },
915
-
916
- /** 年龄 json 解析 */
917
- getageShowType(row, item) {
918
- /**
919
- * 3个月以下了显示到天,3个月到1岁只显示到月,1岁到3岁显示几岁几月,3岁以上的只显示岁
920
- */
921
- let objStr = row[item.columnName];
922
- if (vexutils.isJSON(objStr)) {
923
- let obj = JSON.parse(objStr);
924
- let days = obj.days || 0;
925
- if (days > 0) {
926
- if (days < 91) {
927
- return `${days} 天`;
928
- } else if (90 < days && days < 365) {
929
- return `${Math.floor(days / 30)} 个月`;
930
- } else if (365 < days && days < 1095) {
931
- return `${obj.year} 岁 ${obj.month} 月`;
932
- } else if (1095 < days) {
933
- return `${obj.year}岁`;
934
- }
935
- } else {
936
- return '';
937
- }
938
- }
939
- return objStr || '';
940
- },
941
- getOrCode(row, item, type) {
942
- let src = require('./assets/img/qr.png');
943
- return [
944
- <span class="bigTable-qr-span" on-click={e => this.qrCodeEvent(e, row, item)}>
945
- <img class="bigTable-qr-img" src={src} />
946
- <span>
947
- <svg-icon iconClass="fangda" />
948
- </span>
949
- </span>
950
- ];
951
- },
952
- qrCodeEvent(e, row, item) {
953
- e.preventDefault();
954
- e.stopPropagation();
955
- let data = this.handleQrCodeContent(row, item);
956
- this.$emit('qrCodeEvent', data);
957
- },
958
- handleQrCodeContent(row, field) {
959
- let { settingObj = {}, fieldSetting = {} } = field;
960
- let { mergedFeildExpression } = fieldSetting;
961
- let content = row[field.field];
962
- // 合并字段
963
- if (mergedFeildExpression) {
964
- const regexp = /#{(.+?)\}/g;
965
- let formatHtml = mergedFeildExpression.replace(regexp, (match, $1) => {
966
- let value = row[$1] || '';
967
- return value;
968
- });
969
- content = formatHtml;
970
- }
971
- let params = {
972
- content
973
- };
974
- let btnObj = {
975
- btnName: settingObj?.qrCode?.name,
976
- trigger_id: settingObj?.qrCode?.id,
977
- params
978
- };
979
- return btnObj;
980
- },
981
-
982
- // switch jsx
983
- getBtnLinkSwitch(row, item, disabled, index) {
984
- let key;
985
- let k = `_${item.columnName}_rowSwitchVal_`;
986
- // 在 format 处理了。
987
- if(k in row){
988
- key = row[k]
989
- } else {
990
- // 树表不能用索引取值,注意:row 是解析后的值。
991
- let cur = this.isTree !== 0 ? row : this.oldtableData[index];
992
- key = cur[item.columnName];
993
- if (typeof key === 'string') {
994
- if (key && key.startsWith('###{')) {
995
- let temp = JSON.parse(key.replace('###', ''));
996
- key = temp.tooltip || temp.value; // temp.tooltip 日期的处理
997
- }
998
- }
999
- }
1000
-
1001
-
1002
- // 特别处理'true'与true, 让true == 'true'
1003
- if(item.btnLinkSwitchDefVal === true && key === 'true'){
1004
- item.btnLinkSwitchDefVal = 'true';
1005
- }
1006
-
1007
- // 特别处理'false'与false, 让false == 'false'
1008
- if(item.btnLinkSwitchDefVal === false && key === 'false'){
1009
- item.btnLinkSwitchDefVal = 'false';
1010
- }
1011
-
1012
- let isEdit = this.isBatchEditing || this.isInlineEditing || this.isInlineAdding;
1013
-
1014
- let f = isEdit ? (this.listFormUnionSettingMap[item.columnName] ? disabled : true) : disabled;
1015
-
1016
- function switchClick(e) {
1017
- e.stopPropagation();
1018
- }
1019
- return [
1020
- <div onClick={switchClick} style="display: inline-block;" class="no-transition_a-switch">
1021
- <a-switch checked={key == item.btnLinkSwitchDefVal} disabled={f} on-change={e => this.switchBtnOnChange(e, row, item, index)} />
1022
- </div>
1023
- ];
1024
- },
1025
- // 提示文案
1026
- handleValueTips(row, item) {
1027
- let { columnName } = item;
1028
- let { __originItem__ } = row;
1029
- if (__originItem__ && typeof __originItem__ === 'string' && vexutils.isJSON(__originItem__)) {
1030
- __originItem__ = JSON.parse(__originItem__);
1031
- }
1032
- if (!columnName || !__originItem__) return;
1033
- let originValue = __originItem__[columnName];
1034
- if (!originValue) return;
1035
- if (typeof originValue !== 'string' || !originValue.includes('tips') || !originValue.startsWith('###{')) return;
1036
- let temp = JSON.parse(originValue.replace('###', ''));
1037
- if (!temp || !temp.tips) return;
1038
- return temp.tips;
1039
- },
1040
- // 字段显示 jsx
1041
- getField(row, item, index, isLink) {
1042
- const { _redner_before_ } = row;
1043
- let html,tips,isHtml,isCopy;
1044
- if(_redner_before_){
1045
- const { columnName } = item;
1046
- let config = row[`_${columnName}__redner_before_`] || {};
1047
- html = row[columnName];
1048
- isHtml = config.isHtml;
1049
- isCopy = config.isCopy;
1050
- tips = config.tips
1051
- } else {
1052
- html = formatFieldText(row, item, this.columnConfig.fieldList, this.fieldListOriginal);
1053
- tips = this.handleValueTips(row, item);
1054
- isHtml = this.checkHtml(html);
1055
- isCopy = this.isCopy(item, row);
1056
- }
1057
-
1058
- let content;
1059
- // 判断是不是html文本
1060
- if(isHtml) {
1061
- content = [
1062
- isLink && html ? <a class="c-field-content" on-click={e => this.linkDetail(row, item, index, e)} domPropsInnerHTML={html} /> : <span class="domPropsInnerHTML-span" domPropsInnerHTML={html} />
1063
- ];
1064
- } else {
1065
- content = [
1066
- isLink && html ? <a class="c-field-content" on-click={e => this.linkDetail(row, item, index, e)}>{html}</a> : <span class="domPropsInnerHTML-span">{html}</span>
1067
- ];
1068
- }
1069
-
1070
- if (isCopy) {
1071
- return [
1072
- <a-popover
1073
- placement="right"
1074
- trigger="hover"
1075
- arrowPointAtCenter
1076
- align={{
1077
- offset: [-5, 0]
1078
- }}
1079
- >
1080
- <a-icon slot="content" type="copy" class="blue" on-click={e => this.hanldeCopyContent(e, row[item.columnName])} />
1081
- {content}
1082
- </a-popover>
1083
- ];
1084
- } else {
1085
- if (tips) {
1086
- return [
1087
- <a-tooltip>
1088
- <template slot="title">
1089
- <span domPropsInnerHTML={tips}> </span>
1090
- </template>
1091
- {content}
1092
- </a-tooltip>
1093
- ];
1094
- }
1095
- return [content];
1096
- }
1097
- },
1098
- // 按钮 jsx
1099
- getBtnIcon(btn, mr = '8px') {
1100
- let icon;
1101
- if (btn.icon) {
1102
- if (this.btnIcons[btn.icon]) {
1103
- icon = <a-icon type={this.btnIcons[btn.icon]} />;
1104
- } else {
1105
- icon = (
1106
- <a-tooltip title={this.handleName(btn)}>
1107
- <svg-icon
1108
- iconClass={btn.icon}
1109
- style={{
1110
- marginRight: mr
1111
- }}
1112
- />
1113
- </a-tooltip>
1114
- );
1115
- }
1116
- } else if (btn.iconSetting) {
1117
- icon = (
1118
- <svg-icon
1119
- iconClass={JSON.parse(btn.iconSetting).icon}
1120
- style={{
1121
- marginRight: mr
1122
- }}
1123
- />
1124
- );
1125
- }
1126
- return [icon];
1127
- },
1128
- getInlineEditBtn(row, btnListKey) {
1129
- if (!row[btnListKey]?.length) return [];
1130
-
1131
- return row[btnListKey].filter(item => {
1132
- return item.settingObj[0].trigger_type === 'EDIT_ROW';
1133
- });
1134
- },
1135
- // 按钮 jsx
1136
- getTileBtnList(row, index) {
1137
- if (this.isRowEditing) return;
1138
- return [
1139
- (row.tileBtnList?.length &&
1140
- row.tileBtnList.map((btn, j) => {
1141
- return (
1142
- btn.isShow == '1' &&
1143
- btn.type != 'LINK' && (
1144
- <a-button
1145
- key={btn.sid}
1146
- on-click={e => this.clickBtn(row, btn, index, e, j)}
1147
- class="btn-custom-class row-btn"
1148
- style={{
1149
- ...vexutils.getBtnStyle(btn),
1150
- ...{
1151
- display: !row.__isInlineEditing ? 'inline-block' : 'none'
1152
- }
1153
- }}
1154
- disabled={row.__isDisableInlineEdit}
1155
- type={btn.showStyle == 'none_bg' || btn.showStyle === 'only_icon' ? 'link' : 'primary'}
1156
- ghost={btn.showStyle == 'white_bg'}
1157
- size="small"
1158
- title={this.handleName(btn)}
1159
- >
1160
- {this.getBtnIcon(btn)}
1161
- {btn.showStyle === 'only_icon' ? '' : this.handleName(btn)}
1162
- </a-button>
1163
- )
1164
- );
1165
- })) ||
1166
- ''
1167
- ];
1168
- },
1169
- // 按钮 jsx
1170
- getFoldBtnList(row, index) {
1171
- if (this.isRowEditing) return;
1172
- return [
1173
- (row.foldBtnList?.length && (
1174
- <a-dropdown style={{ display: !row.__isInlineEditing ? 'inline-block' : 'none' }} disabled={this.isInlineOperating}>
1175
- <a-menu slot="overlay">
1176
- {row.foldBtnList.map((b, j) => {
1177
- return (
1178
- <a-menu-item key={b.sid} class="dropdown-btn" on-click={e => this.clickBtn(row, b, index, e.domEvent, j)}>
1179
- {this.handleName(b)}
1180
- {this.getBtnIcon(b, 0)}
1181
- </a-menu-item>
1182
- );
1183
- })}
1184
- </a-menu>
1185
- <a-button size="small" style="margin-left: 8px">
1186
- 更多 ...
1187
- </a-button>
1188
- </a-dropdown>
1189
- )) ||
1190
- ''
1191
- ];
1192
- },
1193
- checkMethod({ row }) {
1194
- return !row.forbiddenBatchSelect;
1195
- },
1196
- // 行内编辑对应生成的(保存、取消)按钮
1197
- generateInlineBtnList(row, index) {
1198
- if (this.isNestTable) return;
1199
- /*
1200
- 操作列,存在行内编辑的情况
1201
- 前端插入【保存、取消】按钮
1202
- */
1203
- let inlineEditBtnList = [];
1204
- inlineEditBtnList.push(...this.getInlineEditBtn(row, 'tileBtnList'));
1205
- inlineEditBtnList.push(...this.getInlineEditBtn(row, 'foldBtnList'));
1206
- if (!inlineEditBtnList?.length) return;
1207
-
1208
- return [
1209
- <span>
1210
- <a-button style={{ display: row.__isInlineEditing ? 'inline-block' : 'none' }} on-click={this.setBatchSaveRowStatus} title="保存" class="btn-custom-class row-btn" type="link" size="small">
1211
- 保存
1212
- </a-button>
1213
- <a-button style={{ display: row.__isInlineEditing ? 'inline-block' : 'none' }} on-click={this.setBatchCancelRowStatus} title="取消" class="btn-custom-class row-btn" type="link" size="small">
1214
- 取消
1215
- </a-button>
1216
- </span>
1217
- ];
1218
- },
1219
- setBatchSaveRowStatus(e) {
1220
- e.stopPropagation();
1221
- let { btnName, tipsMsg, isTips } = this.curBatchBtnData || {};
1222
- let _this = this;
1223
- // 保存是否需要提示
1224
- if (isTips != 1) {
1225
- this.$emit('setBatchSaveRowStatus', true);
1226
- return;
1227
- }
1228
- this.$confirm({
1229
- title: tipsMsg || `是否确认${btnName}`,
1230
- okText: '确定',
1231
- cancelText: '取消',
1232
- onOk: () => {
1233
- _this.$emit('setBatchSaveRowStatus', true);
1234
- },
1235
- onCancel() {}
1236
- });
1237
- },
1238
- setBatchCancelRowStatus(e) {
1239
- e.stopPropagation();
1240
- this.$emit('setBatchCancelRowStatus', true);
1241
- },
1242
- checkOperateCurrentTable() {
1243
- if (this.isNestTable) return false;
1244
- if (this.defaultEditAllRow) return true;
1245
- let id = this.inlineEditCurrentOperateBtnId;
1246
- let find = this.btnList?.find(item => {
1247
- return item?.settingObj?.[0]?.obj_id === id;
1248
- });
1249
- return !!find;
1250
- },
1251
- checkListFormUnionSettingParamsList() {
1252
- if (!this.listFormUnionSetting?.paramsList?.length) {
1253
- this.$message.warning('可编辑行需要设置关联表单字段,设置后请重试!');
1254
- this.$emit('resetInlineEditAll', false);
1255
- this.$emit('triggerSpinning', false);
1256
- return false;
1257
- }
1258
- let find = this.fieldListOriginal?.find(item => item.isEdit == 1);
1259
- if (!find) {
1260
- this.$message.warning('没有设置可编辑字段,请联系管理员');
1261
- this.$emit('resetInlineEditAll', false);
1262
- this.$emit('triggerSpinning', false);
1263
- return false;
1264
- }
1265
- return true;
1266
- },
1267
- getInlineOpreateRow() {
1268
- if (this.isInlineAdding) {
1269
- const vxeTable = this.$refs.xGrid;
1270
- let { tableData } = vxeTable.getTableData();
1271
- return {
1272
- row: tableData[0],
1273
- rowIndex: 0
1274
- };
1275
- }
1276
-
1277
- if (this.showButtonTop == 0) {
1278
- let { row, index: rowIndex } = this.currentClickBtnInfo || {};
1279
- return {
1280
- row,
1281
- rowIndex
1282
- };
1283
- }
1284
-
1285
- let row = this.clickRowData;
1286
- for (var i = 0; i < this.oldtableData.length; i++) {
1287
- let item = this.oldtableData[i];
1288
- if (item[this.primaryKey] === row[this.primaryKey]) break;
1289
- }
1290
-
1291
- return {
1292
- row,
1293
- rowIndex: i
1294
- };
1295
- },
1296
- setAllRowInlineStatus(disabled = false) {
1297
- let vxeTable = this.$refs.xGrid;
1298
- let { tableData } = vxeTable.getTableData();
1299
- tableData.forEach(row => {
1300
- this.$set(row, '__isInlineEditing', false);
1301
- this.$set(row, '__isDisableInlineEdit', disabled);
1302
- });
1303
- },
1304
- async handleClickCancelBtnByInline() {
1305
- let vxeTable = this.$refs.xGrid;
1306
- this.setRowStatus(vxeTable.$el, 0, null);
1307
- this.resetStoreInlineOperationStatus();
1308
- await vxeTable.reloadData(this.originFormatList);
1309
- this.resetOperationRowStatus();
1310
- this.$emit('handleClickBtnByInline', {
1311
- type: 'CANCEL'
1312
- });
1313
- },
1314
- resetOperationRowStatus() {
1315
- if (this.isTreeTable) return false;
1316
-
1317
- const vxeTable = this.$refs.xGrid;
1318
- let { row, rowIndex } = this.getInlineOpreateRow();
1319
- if (!row) return false;
1320
- if (row?.__isInsertRow) {
1321
- vxeTable.remove(row);
1322
- }
1323
- vxeTable?.clearActived()?.then(() => {
1324
- row && vxeTable.revertData(row);
1325
- this.setRowStatus(vxeTable.$el, rowIndex, null);
1326
- vxeTable.resetColumn();
1327
- this.setAllRowInlineStatus();
1328
- this.recordClickBtnInfo();
1329
- });
1330
- },
1331
- async removeInsert() {
1332
- if (this.isTreeTable) return false;
1333
-
1334
- const vxeTable = this.$refs.xGrid;
1335
- // let { row } = this.getInlineOpreateRow();
1336
- let { tableData } = vxeTable.getTableData();
1337
- if (tableData && tableData.length) {
1338
- tableData.forEach(row => {
1339
- if (row?.__isInsertRow) {
1340
- vxeTable.remove(row);
1341
- }
1342
- });
1343
- }
1344
- if (!this.originFormatList?.length) return;
1345
-
1346
- await vxeTable.loadData(this.originFormatList);
1347
- this.resetBatchOperationRowStatus();
1348
- },
1349
- resetStoreInlineOperationStatus() {
1350
- if (this.isTreeTable) return false;
1351
- this.isSaveForm = false;
1352
- },
1353
- removeInlineAddRow() {
1354
- if (!this.isInlineAdding) return false;
1355
-
1356
- const vxeTable = this.$refs.xGrid;
1357
- let { tableData } = vxeTable.getTableData();
1358
- vxeTable.remove(tableData[0]);
1359
- },
1360
- // 列数据解析逻辑
1361
- formatColumns(map) {
1362
- /**
1363
- * 针对 bigTable 的设置列
1364
- * type: 列的类型
1365
- * field: 列字段名(注:属性层级越深,渲染性能将直线下降)
1366
- * title: 列标题(支持开启国际化)
1367
- * width: 列宽度(如果为空则均匀分配剩余宽度,如果全部列固定了,可能会存在宽屏下不会铺满,可以配合 "%" 或者 "min-width" 布局)
1368
- * minWidth: 最小列宽度;会自动将剩余空间按比例分配
1369
- * resizable: 列是否允许拖动列宽调整大小
1370
- * visible: 列是否显示
1371
- * fixed: 将列固定在左侧或者右侧(注意:固定列应该放在左右两侧的位置)
1372
- * align: 列对齐方式
1373
- * headerAlign: 表头列的对齐方式
1374
- * footerAlign: 表尾列的对齐方式
1375
- * formatter: 格式化显示内容 Function({cellValue, row, column})
1376
- * sortable: 是否允许列排序
1377
- */
1378
- // 配置列表
1379
- let { selectType } = this.getOtherConfigInit() || {};
1380
- let { tableNoSetting } = this;
1381
- let { isBatchSelect, fieldList, showButtonTop, isScanMultiTable, autoCellHeight } = map;
1382
- if (selectType) {
1383
- // 有设置 selectType 强制可选。
1384
- isBatchSelect = 1;
1385
- }
1386
- // 如果表格单行需要内容撑开, 则把虚拟滚动关掉
1387
- if (autoCellHeight) {
1388
- this.scrollXConfig.enabled = false;
1389
- this.scrollYConfig.enabled = false;
1390
- this.isShowOverflow = false;
1391
- }
1392
- selectType = selectType || 'checkbox';
1393
- // 扫码弹框 设置为radio
1394
- let { listType } = this.tableOptions;
1395
- if (listType == 'scanList') {
1396
- selectType = 'radio';
1397
- }
1398
- this.selectType = selectType;
1399
- let tableHeight = this.styleSetting?.tableHeight || 'table-simple';
1400
- let checkMinWidth = this.checkWidth[tableHeight] || '30';
1401
- const checkboxSlot = {
1402
- default: data => {
1403
- return this.checkMethod(data) ? null : (
1404
- <a-tooltip title={data.row.forbiddenBatchSelectReason} placement="right" trigger="hover">
1405
- <i class="disabled-checked-tips"></i>
1406
- </a-tooltip>
1407
- );
1408
- }
1409
- };
1410
- let checkVisible = (isBatchSelect == 1 && !this.isNestTable && !isScanMultiTable && !this.isInlineOperating) || false;
1411
- let columns = [
1412
- {
1413
- fixed: 'left',
1414
- align: 'center',
1415
- visible: isScanMultiTable || false,
1416
- width: '50',
1417
- slots: {
1418
- header: () => {
1419
- return '操作';
1420
- },
1421
- default: this.scanMultiOperate
1422
- }
1423
- },
1424
- {
1425
- type: 'seq',
1426
- fixed: this.isNestTable ? '' : 'left',
1427
- align: 'center',
1428
- resizable: true,
1429
- width: '34',
1430
- showOverflow: true,
1431
- slots: {
1432
- header: () => {
1433
- return [tableNoSetting ? null : <a-icon class="setting" type="setting" onClick={() => this.showDrawer()} />];
1434
- }
1435
- }
1436
- },
1437
- {
1438
- type: selectType,
1439
- fixed: this.isNestTable ? '' : 'left',
1440
- align: 'center',
1441
- visible: checkVisible,
1442
- resizable: false,
1443
- width: checkMinWidth,
1444
- // slots: selectType === 'checkbox' ? checkboxSlot : null,
1445
- // 修复 vxe-table升级3.x版本 原自定义checkbox样式失效
1446
- slots:
1447
- selectType === 'checkbox'
1448
- ? {
1449
- checkbox: 'tooltip_checkbox'
1450
- }
1451
- : null,
1452
- showOverflow: true
1453
- }
1454
- ];
1455
- // let showOperatorColumn = true;
1456
- // if (showButtonTop == 1) {
1457
- // showOperatorColumn = hasOnlyIcon;
1458
- // }
1459
- this.fieldKeyMap = {};
1460
- this.handlerInitSqlSearchItem(fieldList);
1461
- const currentColumns = fieldList.map((item, index) => {
1462
- this.fieldKeyMap[item.columnName] = item;
1463
- const { filterField } = item.filterSettingMap || {}
1464
- // 是否排序 1 不可排序
1465
- let notParticipatingSort = item?.fieldSetting?.notParticipatingSort || '';
1466
- // 有子列表fixed会遮盖 所以主表不设置fixed,子表可设置
1467
- let fixed = this.isAboutNestTable && !this.isNestTable ? '' : item.isFixed ? (item.isFixed == 1 ? 'left' : 'right') : '';
1468
- let sortable = this.isTableEdit ? false : this.isNestTable ? false : !filterField && item.isSort == 1 && notParticipatingSort != 1 && item.isMerge != 1;
1469
- let treeNode = this.isNestTable ? false : this.isTreeTable ? index === 0 : false;
1470
- let type = index === 0 && this.showNestTable ? 'expand' : '';
1471
-
1472
- // 扫码打开的table只展示
1473
- if (isScanMultiTable) {
1474
- fixed = '';
1475
- sortable = false;
1476
- treeNode = false;
1477
- type = '';
1478
- }
1479
- // 行编辑不展示排序
1480
- if (this.isInlineOperating) {
1481
- sortable = false;
1482
- }
1483
-
1484
- let showOverflow = this.handleShowOverflow(item);
1485
- const isOperatorColumn = item.columnName == 'operatorColumn'
1486
- const col = Object.assign(item, {
1487
- // 全部行编辑 隐藏“操作”
1488
- visible: isOperatorColumn ? (this.isEditAllRow ? false : showButtonTop == 0) : item.isShow == 1,
1489
- field: item.columnName,
1490
- title: this.handleName(item, 'title'),
1491
- minWidth: item.colWidth,
1492
- fixed: fixed,
1493
-
1494
- sortable: sortable,
1495
- // 参数 "column.remote-sort" 已废弃,请使用 "sort-config.remote"
1496
- // remoteSort: !filterField && item.isSort == 1 && notParticipatingSort != 1,
1497
-
1498
- headerClassName: `mycolumn ${isOperatorColumn ? 'b-table-operator-column' : ''}`, // 文本溢出处理('tooltip' vxe-table当前版本存在bug)
1499
- // showHeaderOverflow: "title",
1500
- showOverflow: showOverflow,
1501
- treeNode: treeNode,
1502
- type: type,
1503
- slots: {
1504
- default: params => {
1505
- return this.formatter(params, item);
1506
- }
1507
- },
1508
- editRender: this.generateEditRender(item)
1509
- });
1510
-
1511
- const isFilterField = filterField && !this.isNestTable && !isScanMultiTable && !this.isTableEdit
1512
-
1513
- if (isFilterField) {
1514
- this.$set(
1515
- this.filterFields,
1516
- item.columnName,
1517
- Object.assign({}, vexutils.clone(item, true), {
1518
- visible: false,
1519
- left: 'initial',
1520
- right: 'initial',
1521
- top: 'initial',
1522
- indeterminate: false,
1523
- checkAll: false,
1524
- searchFilterText: '',
1525
- searchFilterCONVERT: [],
1526
- filterSort: '',
1527
- wordbookSearch: {...this.wordbookSearchDef}
1528
- })
1529
- );
1530
- col.slots.header = this.formatterHeader(item);
1531
- } else {
1532
- col.slots.header = this.toolTipTitle(item);
1533
- }
1534
-
1535
- if (!isScanMultiTable) {
1536
- col.slots.footer = 'tooltip_footer';
1537
- }
1538
-
1539
- // 主表设置expand
1540
- if (this.showNestTable && this.isTree == 0 && this.curNestColumnConfig?.isTree == 0) {
1541
- col.slots.content = 'nest_table_content';
1542
- }
1543
-
1544
- return col;
1545
- });
1546
- columns.push(...currentColumns);
1547
- this.columnLen = currentColumns.filter(item => item.visible).length;
1548
- return columns;
1549
- },
1550
- _isAge(item) {
1551
- if (item.attrType !== 'BIRTHDAY') return false;
1552
- return item.settingObj?.format?.includes?.('age');
1553
- },
1554
- // 2022/12/1 沈培均/方晶晶要求新增 如果有自定义提示就不显示表格自带的提示
1555
- handleShowOverflow(item) {
1556
- // 2023/03/17 新增单行高度由内容撑开, 不需要缺省
1557
- if (!this.isShowOverflow) return false;
1558
- if (item.columnName == 'operatorColumn') return false;
1559
- // 选人组件 自己的tooltip
1560
- if (item.attrType === 'CANDIDATE_COMPONENTS') return false;
1561
- if (this._isAge(item)) return false;
1562
- let { showSetting } = item.settingObj || {};
1563
- if (!showSetting || !showSetting.length) return 'title';
1564
- let hasTips = 'title';
1565
- let i = 0,
1566
- len = showSetting.length,
1567
- v;
1568
- for (; i < len; i++) {
1569
- v = showSetting[i];
1570
- if (v?.filter?.length) {
1571
- let tips = v.filter.some(l => l.tips);
1572
- if (tips) {
1573
- hasTips = false;
1574
- break;
1575
- }
1576
- }
1577
- }
1578
- return hasTips;
1579
- },
1580
- // 分组表头处理
1581
- handleGroupColums(columns) {
1582
- let { rowGroupSetting } = this;
1583
- if (!rowGroupSetting || !Object.keys(rowGroupSetting).length) return columns;
1584
- let { firstRowGroup, secondRowGroup } = rowGroupSetting;
1585
- if (!firstRowGroup || !firstRowGroup.length) return columns;
1586
- this.handleRowColumns(firstRowGroup, columns, 'columnName');
1587
- if (!secondRowGroup || !secondRowGroup.length) return columns;
1588
- this.handleRowColumns(secondRowGroup, columns, 'title');
1589
- return columns;
1590
- },
1591
- // 处理分组columns
1592
- handleRowColumns(rowColumns, columns, key) {
1593
- rowColumns.map(item => {
1594
- let children = [];
1595
- let spliceIndex = -1;
1596
- let indexArr = [];
1597
- item.list?.length &&
1598
- item.list.forEach(v => {
1599
- let matchItem = columns?.find(column => column[key] === v);
1600
- if (matchItem) {
1601
- let matchIndex = columns.findIndex(column => column[key] === v);
1602
- indexArr.push(matchIndex);
1603
- delete matchItem.fixed;
1604
- children.push(matchItem);
1605
- columns.splice(matchIndex, 1);
1606
- }
1607
- });
1608
- let obj = {
1609
- title: item.title,
1610
- align: 'center',
1611
- children
1612
- };
1613
- spliceIndex = Math.min.apply(Math, indexArr);
1614
- spliceIndex > -1 && columns.splice(spliceIndex, 0, obj);
1615
- });
1616
- },
1617
- generateEditRender(fieldItem) {
1618
- if (fieldItem.columnName === 'operatorColumn') {
1619
- return undefined;
1620
- }
1621
-
1622
- return {
1623
- name: 'EditInput',
1624
- enabled: fieldItem.isEdit == 1
1625
- };
1626
- },
1627
- setFilterStatus() {
1628
- // 表头没有过滤字段 不需要设置
1629
- if (!this.filterFields || !Object.keys(this.filterFields).length) return;
1630
- this.filterCheckedOptionMap = {};
1631
- let val = this.quickSearchConfig;
1632
- if (!val || !val.length) {
1633
- let keys = Object.keys(this.filterFields);
1634
- keys.forEach(key => {
1635
- this.$set(this.filterFields[key], 'CONVERT', []);
1636
- });
1637
- return false;
1638
- }
1639
- // 修复 val长度和this.filterFields个数对不上 会少清空选中项
1640
- for (let key in this.filterFields) {
1641
- let item = this.filterFields[key];
1642
- item && this.$set(item, 'CONVERT', []);
1643
- }
1644
-
1645
- val.forEach(item => {
1646
- let itemKey = this.isApiTable ? this.apiFilterMap[item.field_key] : item.field_key;
1647
- // 参与搜索的字段必须在 filterFields中
1648
- if (itemKey in this.filterFields) {
1649
- if (!this.filterFields[itemKey]) {
1650
- this.$set(this.filterFields[itemKey], 'CONVERT', []);
1651
- return false;
1652
- }
1653
- let value = item.value;
1654
- if (!this.isApiTable) {
1655
- if(Array.isArray(value)&& value.length) {
1656
- value = value.map(item => JSON.stringify(item))
1657
- }
1658
- if(value && typeof value === 'string' ) {
1659
- value = value.includes('|#|') ? value.split('|#|') : [value]
1660
- }
1661
- }
1662
-
1663
- this.$set(this.filterFields[itemKey], 'CONVERT', value || []);
1664
- }
1665
- });
1666
- },
1667
- handleCommonTooltipTitle(item, type) {
1668
- let name = item.formTitle || item.alias || item.title;
1669
- let tooltipTitle = item.alias;
1670
- let isAlias = false;
1671
- if (this.tableOptions?.dataSourceType == 'guage') {
1672
- tooltipTitle = item.alias || item.title;
1673
- }
1674
- if (name && tooltipTitle && name !== tooltipTitle) {
1675
- isAlias = !!tooltipTitle;
1676
- }
1677
-
1678
- let fieldSetting = item.fieldSetting;
1679
- if (fieldSetting && vexutils.isJSON(fieldSetting)) {
1680
- fieldSetting = JSON.parse(fieldSetting);
1681
- }
1682
- let { feildDescribeI18n, feildDescribe } = fieldSetting || {};
1683
-
1684
- let showTitleFeildDescribe = feildDescribe || feildDescribeI18n;
1685
- let titleFeildDescribe = '';
1686
- if (showTitleFeildDescribe) {
1687
- titleFeildDescribe = (feildDescribeI18n && this.$root?.$t?.(feildDescribeI18n)) || feildDescribe;
1688
- }
1689
- // 列表操作列添加问号说明
1690
- if (item?.columnName == "operatorColumn" && item.operationDescribe) {
1691
- showTitleFeildDescribe = true;
1692
- titleFeildDescribe = item.operationDescribe
1693
- }
1694
- return (
1695
- <div class={['table-title-wrap', { 'table-title-wrap-describe': showTitleFeildDescribe }]}>
1696
- {showTitleFeildDescribe && (
1697
- <a-tooltip placement="bottom">
1698
- <template slot="title">
1699
- <span domPropsInnerHTML={titleFeildDescribe}> </span>
1700
- </template>
1701
- <a-icon style="margin-right: 2px" type="question-circle" />
1702
- </a-tooltip>
1703
- )}
1704
- <div refName={'item-' + item[this.handleRowId]} title={tooltipTitle || name} content={name} isAlias={isAlias}>
1705
- {type !== 'format' && item.treeNode && this.isTree == 1 ? (
1706
- <a-icon type={this.isExpand && this.total < 1001 ? 'caret-down' : 'caret-right'} onClick={e => this.triggerExpand(e, this.isExpand)} />
1707
- ) : (
1708
- ''
1709
- )}
1710
- <span>{name}</span>
1711
- </div>
1712
- </div>
1713
- );
1714
- },
1715
- toolTipTitle(item) {
1716
- return () => {
1717
- return [this.handleCommonTooltipTitle(item)];
1718
- };
1719
- },
1720
-
1721
- // 表头渲染逻辑
1722
- formatterHeader(item) {
1723
- let field = this.filterFields[item.columnName];
1724
- const {showfilterSearch, showSelectAll, filterOptions=[]} = field.filterSettingMap || {};
1725
- return () => {
1726
- return [
1727
- <div class="filter-box">
1728
- {this.handleCommonTooltipTitle(item, 'format')}
1729
- <i
1730
- class={['vxe-filter--icon', 'vxe-filter--btn', 'vxe-icon--funnel', { active: field.visible || field.filterSort }, { checked: field.CONVERT?.length }]}
1731
- onClick={event => this.showFilter(field, item.columnName, event)}
1732
- />
1733
- {field.visible ? (
1734
- <div
1735
- v-dom-portal={this.filterDomPortal}
1736
- class="big-table-filter-wrap"
1737
- style={{
1738
- left: field.left,
1739
- right: field.right,
1740
- top: field.top,
1741
- width: this.filterWidth + this.distance + 'px'
1742
- }}
1743
- >
1744
- <HeaderFilter
1745
- field={field}
1746
- cHeight={this.filterHeight + this.distance}
1747
- handlefilterBoxClickSort={this.handlefilterBoxClickSort}
1748
- handleFilterSeachDebounce={this.handleFilterSeachDebounce}
1749
- handleFilterChangeAll={this.handleFilterChangeAll}
1750
- handleFilterChange={this.handleFilterChange}
1751
- handleFilterSearchChange={this.handleFilterSearchChange}
1752
- handleFilterClearAll={this.handleFilterClearAll}
1753
- handleCancelFilter={this.handleCancelFilter}
1754
- handleFilter={this.handleFilter}
1755
- >
1756
- </HeaderFilter>
1757
-
1758
- <div
1759
- class="arrows-icon"
1760
- onmousedown={e => {
1761
- this.onmousedownFunc(e);
1762
- }}
1763
- ></div>
1764
- </div>
1765
- ) : (
1766
- ''
1767
- )}
1768
- </div>
1769
- ];
1770
- };
1771
- },
1772
- scanMultiOperate(params) {
1773
- return [
1774
- <a-popconfirm ok-text={'确认'} cancel-text={'取消'} title={'是否确认删除?'} on-confirm={() => this.confirmScanMulti(params)}>
1775
- <svg-icon class="scan-multi-delete" iconClass="shanchu" />
1776
- </a-popconfirm>
1777
- ];
1778
- },
1779
- /**
1780
- * 删除选中scan数据
1781
- */
1782
- confirmScanMulti(params) {
1783
- let { row, rowIndex } = params || {};
1784
- if (!row) return;
1785
- this.$emit('scanMultiRemove', rowIndex, params);
1786
- let vxeTable = this.$refs.xGrid;
1787
- vxeTable.remove(row);
1788
- },
1789
- // 表格渲染逻辑
1790
- formatter(params, col) {
1791
- // 用rowIndex替换$rowIndex, 如果开启了虚拟滚动$rowIndex 下标会有问题
1792
- let { row, column, rowIndex } = params;
1793
- let own = column?._own || column?.own || col;
1794
-
1795
- let { attrType } = own || {};
1796
- // 批量行编辑
1797
- let formUnionItem = this.showEditForm(row, column, rowIndex);
1798
- if (formUnionItem) {
1799
- let dynamicProps = this.initBatchDynamicProps(formUnionItem, row, column, rowIndex);
1800
- if (dynamicProps) {
1801
- return [
1802
- <EditForm class={`js-inlineEditForm`} key={row[this.primaryKey] + rowIndex + column.property} data-key={row[this.primaryKey] + rowIndex + column.property} {...dynamicProps}></EditForm>
1803
- ];
1804
- }
1805
- }
1806
-
1807
- if (GROUP_TITLE_KEY in row) {
1808
- return row[GROUP_TITLE_KEY];
1809
- }
1810
- if (attrType == 'PICTURE' || attrType == 'HEADPORTRAIT') {
1811
- return this.getPicture(row, own, attrType);
1812
- }
1813
- if (attrType == 'COLOR') {
1814
- return this.getColor(row, own);
1815
- }
1816
- if (attrType == 'EVALUATE') {
1817
- return this.getEvaluate(row, own);
1818
- }
1819
- if (attrType == 'MAP') {
1820
- return this.getMapVal(row, own);
1821
- }
1822
- if (attrType == 'DATE' || attrType == 'TASKDATE' || this._isAge(own)) {
1823
- return this.getDate(row, own, attrType);
1824
- }
1825
- if (attrType == 'PERCENTAGE') {
1826
- return this.getPercentage(row, own);
1827
- }
1828
- if (attrType == 'VIDEO') {
1829
- return this.getvideoList(row, own);
1830
- }
1831
- // 选人组件数据展示解析
1832
- if (attrType == 'CANDIDATE_COMPONENTS') {
1833
- return this.getCandidateComponents(row, own);
1834
- }
1835
- if (attrType == 'AGE') {
1836
- return this.getageShowType(row, own);
1837
- }
1838
- if (attrType === 'COUNTDOWN') {
1839
- return [
1840
- <a-tooltip title={row[own.columnName + '_countdownTip']}>
1841
- <span domPropsInnerHTML={row[own.columnName + '_countdown'] || ''} />
1842
- </a-tooltip>
1843
- ];
1844
- }
1845
- // 时长
1846
- if (attrType === 'DURATION') {
1847
- const value = row[own.columnName];
1848
- const duration = own?.fieldSetting?.duration;
1849
- return parseDurationValue(value, duration);
1850
- }
1851
- // 组合组件
1852
- if (attrType === 'COMBINATION') {
1853
- const value = row[own.columnName];
1854
- const params = own.fieldSetting || {};
1855
- const data = parseCombinationValue(value, params);
1856
- return data ? [<span title={data}>{data}</span>] : '';
1857
- }
1858
- if (attrType === 'PASSWORD') {
1859
- const value = row[own.columnName];
1860
- return [<password-com value={value} styleSetting={this.styleSetting} />];
1861
- }
1862
- // 二维码
1863
- if (attrType === 'QR_CODE') {
1864
- return this.getOrCode(row, own, attrType);
1865
- }
1866
-
1867
- if (['MONEY', 'NUMBER'].includes(attrType) || (own.extraField && own.fieldType === 'NUMBER')) {
1868
- let value = row[own.columnName];
1869
- // 数字可能设置了颜色
1870
- if(typeof value === 'string' && this.checkHtml(value)){
1871
- return this.getField(row, own, rowIndex, true);
1872
- }
1873
- return parseNumberField(value, own);
1874
- }
1875
-
1876
- if (column.property === 'operatorColumn') {
1877
- if (this.showButtonTop != 0 || (this.isBatchEditing && !this.isRowEditing)) return;
1878
-
1879
- if (this.rowBtnAutoLayout && !this.isRowEditing) {
1880
- return [<AutoLayoutButton key={row.theUniqueKey + rowIndex} btnList={row.btnList} row={row} index={rowIndex} on-clickBtn={(...arg) => this.clickBtn(...arg)} renderWidth={column.renderWidth} />];
1881
- }
1882
- // 行编辑
1883
- const inlineBtnList = this.generateInlineBtnList(row, rowIndex);
1884
- const tileBtnList = this.getTileBtnList(row, rowIndex);
1885
- const foldBtnList = this.getFoldBtnList(row, rowIndex);
1886
- return [
1887
- <span>
1888
- {this.rowBtnAutoLayout ? null : tileBtnList}
1889
- {this.rowBtnAutoLayout ? null : foldBtnList}
1890
- {inlineBtnList}
1891
- </span>
1892
- ];
1893
- }
1894
-
1895
- const { _redner_before_ } = row;
1896
- let isLink = _redner_before_? row?.[`_${own.columnName}__redner_before_`]?.isLink : this.isLink(own, row);
1897
- if (isLink && !this.isScanMultiTable) {
1898
- if (own.btnLinkSwitch) {
1899
- let disabled = false;
1900
- let curBtn = row.btnList?.find(v => v.name == own.columnName);
1901
- if (curBtn && 'authorizedMark' in curBtn) {
1902
- if (!curBtn.authorizedMark) {
1903
- disabled = true;
1904
- }
1905
- }
1906
- return this.getBtnLinkSwitch(row, own, disabled || this.isTableEdit, rowIndex);
1907
- } else {
1908
- return this.getField(row, own, rowIndex, true);
1909
- }
1910
- } else {
1911
- return this.getField(row, own, rowIndex, false);
1912
- }
1913
- },
1914
- handleImgArr(imgs, type) {
1915
- // 当表格属性为头像时,该列中没有头像情况下,使用小标头像
1916
- if (type === 'HEADPORTRAIT') {
1917
- if (!imgs) imgs = require('./assets/img/xb_small.png');
1918
- }
1919
- return imgs2imgArr(imgs);
1920
- },
1921
- handleImgSrc(curSrc, imageArr, type) {
1922
- if (!imageArr || !imageArr.length) return curSrc;
1923
- let matchItem = imageArr.find(item => item.type === type);
1924
- if (!matchItem) return curSrc;
1925
- if (matchItem.suffix) return curSrc + matchItem.suffix;
1926
- let h = matchItem.h;
1927
- let w = matchItem.w;
1928
- if (matchItem.h === 'adaptive' && matchItem.w != 'adaptive') {
1929
- h = matchItem.w;
1930
- }
1931
- if (matchItem.w === 'adaptive' && matchItem.h != 'adaptive') {
1932
- h = matchItem.h;
1933
- }
1934
- let size = `_${h}x${w}`;
1935
- return curSrc + size;
1936
- },
1937
- // 图片放大
1938
- modalDetailImage(imageArr, type, defaultHeight) {
1939
- if (!imageArr || !imageArr.length)
1940
- return {
1941
- display: 'inline-block',
1942
- maxWidth: '100%',
1943
- maxheight: defaultHeight
1944
- };
1945
- const matchItem = imageArr.find(item => item.type === type);
1946
- if (!matchItem) {
1947
- return { display: 'inline-block', height: defaultHeight };
1948
- }
1949
- const res = vexutils.handleImageSize(matchItem, defaultHeight);
1950
- return res;
1951
- },
1952
- // 设置 domPropsInnerHTML中富文本 img样式
1953
- handleTableImageSize(imageArr, type, defaultHeight) {
1954
- if (!imageArr || imageArr.length === 0) {
1955
- document.body.style.setProperty('--tableImageHeight', defaultHeight);
1956
- document.body.style.setProperty('--tableImageWidth', 'auto');
1957
- return;
1958
- }
1959
- const matchItem = imageArr.find(item => item.type === type);
1960
- if (!matchItem) {
1961
- document.body.style.setProperty('--tableImageHeight', defaultHeight);
1962
- document.body.style.setProperty('--tableImageWidth', 'auto');
1963
- return;
1964
- }
1965
- let height = defaultHeight,
1966
- width = 'auto';
1967
- if (matchItem.h) {
1968
- height = matchItem.h === 'adaptive' ? 'auto' : matchItem.h + 'px';
1969
- }
1970
- if (matchItem.w) {
1971
- width = matchItem.w === 'adaptive' ? 'auto' : matchItem.w + 'px';
1972
- }
1973
- document.body.style.setProperty('--tableImageHeight', height);
1974
- document.body.style.setProperty('--tableImageWidth', width);
1975
- },
1976
- // 分组列表,合并分组标题单元格
1977
- colspanMethod({ row, column, _rowIndex, _columnIndex }) {
1978
- if (this.isTree != 3) {
1979
- return {
1980
- rowspan: 1,
1981
- colspan: 1
1982
- };
1983
- }
1984
-
1985
- let xTree = this.$refs.xGrid;
1986
- let fristKeyIndex = xTree.getTableColumn().tableColumn.findIndex(column => {
1987
- return !!column.property;
1988
- });
1989
- let colspan = xTree.getTableColumn().tableColumn.length - fristKeyIndex;
1990
- if (row.childrenList && row.childrenList.length && xTree) {
1991
- if (column.treeNode) {
1992
- return {
1993
- rowspan: 1,
1994
- colspan: colspan
1995
- };
1996
- } else if (!column.property) {
1997
- return {
1998
- rowspan: 1,
1999
- colspan: 1
2000
- };
2001
- } else {
2002
- return {
2003
- rowspan: 0,
2004
- colspan: 0
2005
- };
2006
- }
2007
- }
2008
- },
2009
- // 表尾合并
2010
- footerRowspanMethod(obj) {
2011
- // 不是分组统计 不需要合并col
2012
- if (!this.groupCountFields || !this.groupCountFields.length) return { rowspan: 1, colspan: 1 };
2013
- let { $rowIndex, _columnIndex, column } = obj;
2014
- let len = this.columnLen || 99;
2015
- let { isBatchSelect } = this.columnConfig;
2016
- if ($rowIndex === 0) {
2017
- // 有 checkbox radio
2018
- if (isBatchSelect == 1) {
2019
- if (_columnIndex === 0) {
2020
- return { rowspan: 1, colspan: 2 };
2021
- } else if (_columnIndex === 1) {
2022
- return { rowspan: 1, colspan: 0 };
2023
- } else if (_columnIndex === 2) {
2024
- return { rowspan: 1, colspan: len };
2025
- }
2026
- return { rowspan: 1, colspan: 0 };
2027
- }
2028
- if (_columnIndex === 0) {
2029
- return { rowspan: 1, colspan: 1 };
2030
- } else if (_columnIndex === 1) {
2031
- return { rowspan: 1, colspan: len };
2032
- }
2033
- return { rowspan: 1, colspan: 0 };
2034
- }
2035
- },
2036
- handleCellMouseenter({ column, $event }) {
2037
- // vxe-table@2.10+ 触发tooltip给vxe-cell父节点设置了title 导致显示有误
2038
- if (column.showOverflow === 'title') {
2039
- const target = $event?.currentTarget;
2040
- const cls = target?.className;
2041
- const bodyCls = ' vxe-body--column ';
2042
- if (cls && ` ${cls} `.includes(bodyCls) && target && target.hasAttribute('title')) {
2043
- const cellElem = target.querySelector('.vxe-cell');
2044
- if (cellElem && cellElem.hasAttribute('title')) {
2045
- cellElem.removeAttribute('title');
2046
- }
2047
- // 行编辑时 去掉tooltip title
2048
- if (this.isInlineOperating) {
2049
- if (target && target.hasAttribute('title')) {
2050
- target.removeAttribute('title');
2051
- }
2052
- }
2053
- }
2054
- }
2055
- },
2056
- // 行双击
2057
- rowdblclick({ row, column }) {
2058
- // 2022/12/12 方晶晶要求 列表相关项在底部展示时, 去除双击事件, 只触发单击事件
2059
- if (this.aboutPositionBtm) {
2060
- return false;
2061
- }
2062
- if (this.isScanMultiTable || this.isInlineOperating) return false;
2063
- if (vexutils.has(row, GROUP_TITLE_KEY)) return false;
2064
- this.$emit('setNestTableClick', this.isNestTable);
2065
- let table = this.$refs.xGrid;
2066
- this.setTableCurrentRow(table, row, true);
2067
- this.$emit('rowdblclick', row, column, true, true);
2068
- },
2069
- // 行单击
2070
- handlerClickRow(data) {
2071
- if (this.isScanMultiTable || this.isInlineOperating) return false;
2072
- if (vexutils.has(data?.row, GROUP_TITLE_KEY)) return false;
2073
- if (this.isTriggerSelectionChange && this.isTree == 0) return false;
2074
- let table = this.$refs.xGrid;
2075
- // 嵌套表与主表click切换时需要清除上次的选中
2076
- this.isAboutNestTable && this.$emit('resetNestLastClickTable', table);
2077
-
2078
- let { row, $event = {}, rowIndex, source, column, trigger } = data;
2079
- // 点击主表格展开行按钮 不需要触发选中行
2080
- let { className } = $event.target || {};
2081
- if (className && vexutils.isString(className) && className.includes('vxe-table--expand-btn')) return;
2082
-
2083
- // 记录上次点击table信息 用于清除
2084
- this.isAboutNestTable && this.$emit('setNestLastClickTable', table, this.isNestTable, row[this.handleRowId], row);
2085
-
2086
- this.$emit('setNestTableClick', false);
2087
-
2088
- // 子列表中点击行 需要特别处理行级按钮
2089
- if (this.isNestTable) {
2090
- table?.setAllCheckboxRow(false);
2091
- this.nestHandleClickRow(table, data);
2092
- return;
2093
- }
2094
-
2095
- let forbiddenBatchSelect = !this.checkMethod(data);
2096
- // 如果该行禁止批量多选,则选择/取消单行 并触发单击事件
2097
- if (this.selectType == 'checkbox' && forbiddenBatchSelect) {
2098
- // 选中“禁用”行,需要清空其它选择数据, 并且再次点击不要取消选中
2099
- table?.setAllCheckboxRow(false);
2100
- const value = [row];
2101
- this.$set(this, 'checkedRows', value);
2102
- this.pubCheckChange(value, { forbiddenBatchSelect });
2103
- this.$emit('handlerClickRow', row, rowIndex, { source, column, trigger });
2104
- return;
2105
- }
2106
- this.visibleCheckAllWrap = false;
2107
- this.visibleCheckAllWrapMore = false;
2108
-
2109
- let checked = false;
2110
- if (this.selectType == 'radio') {
2111
- checked = table.isCheckedByRadioRow(row);
2112
- } else {
2113
- checked = table.isCheckedByCheckboxRow(row);
2114
- }
2115
- // 如果是点击 radio 选中的,处理冲突。先执行 radioOnChange 再 handlerClickRow
2116
- if (this.isradioChange) {
2117
- checked = false;
2118
- this.isradioChange = false;
2119
- }
2120
- let checkedRow = table.getCheckboxRecords();
2121
- let rowLen = this.checkedRows.filter(item => !vexutils.has(item, GROUP_TITLE_KEY)).length;
2122
- let newRow = [];
2123
- if (this.isTreeTable) {
2124
- // 点击树形表格的按钮 不需要触发选中行
2125
- let { className, parentElement } = $event.target || {};
2126
- if (className && className.includes('vxe-tree--node-btn')) return;
2127
- // 点击父级箭头和文字,都能触发展开子节点 已经展开父级,只能点击小箭头进行收起
2128
- if(parentElement?.className && parentElement.className.includes('vxe-tree-cell')) {
2129
- this.toggleCellTreeExpand(data, table)
2130
- }
2131
- // 树表格,点击行无需选中复选框
2132
- if (this.selectType === 'checkbox') {
2133
- let rowVal = {};
2134
- if (!this.isTriggerSelectionChange) {
2135
- /* 存在问题注释的代码
2136
- 点击未选中的数据,会清空已选中的数据
2137
- table.setAllCheckboxRow(false);
2138
- */
2139
- table?.setAllCheckboxRow(false);
2140
- this.$set(this, 'checkedRows', [row]);
2141
- this.pubCheckChange([row]);
2142
- rowVal = row;
2143
- } else {
2144
- if (checkedRow.length > 1) {
2145
- this.$set(this, 'checkedRows', []);
2146
- return false;
2147
- }
2148
- rowVal = checked || (checkedRow.length === 1 && !checked) ? checkedRow[0] : {};
2149
- this.$set(this, 'checkedRows', [rowVal]);
2150
- }
2151
- this.updateAddCheckedRows(rowVal, true);
2152
- // 需要选中行
2153
- this.$emit('handlerClickRow', rowVal, rowIndex, { source, column, trigger });
2154
- this.setTableCurrentRow(table, row);
2155
- return;
2156
- }
2157
- let newTheUniqueKeyArr = [];
2158
- this.flattenRow(row, newRow, newTheUniqueKeyArr);
2159
- let res = this.intersectRow(checkedRow, newTheUniqueKeyArr);
2160
- if (!res) {
2161
- rowLen = 1;
2162
- } else {
2163
- rowLen = checkedRow.filter(item => !vexutils.has(item, GROUP_TITLE_KEY)).length;
2164
- }
2165
- }
2166
-
2167
- // 相关项位于底部,再次点击已选中数据不取消勾选
2168
- let btmNotClear = rowLen < 2 && checked;
2169
- !btmNotClear && table.setAllCheckboxRow(false);
2170
- // 全选后/数据大于一条 单击行只剩这一行 取消其他
2171
- // 只有一条选中 单击行 取消选中
2172
- let setChecked = checked;
2173
- if (rowLen > 1) {
2174
- this.selectType != 'radio' && table.setCheckboxRow([row], true);
2175
- this.isTreeTable && this.selectType != 'radio' && this.pubCheckChange(newRow);
2176
- this.selectType != 'radio' && this.$emit('handlerClickRow', row, rowIndex, { source, column, trigger });
2177
- } else {
2178
- setChecked = !setChecked;
2179
- if (!setChecked) {
2180
- !this.aboutPositionBtm && table.clearCurrentRow();
2181
- this.selectType == 'radio' && table.clearRadioRow();
2182
- this.isTreeTable && this.selectType != 'radio' && this.pubCheckChange([]);
2183
- } else {
2184
- this.selectType == 'radio' && table.setRadioRow(row);
2185
- this.isTreeTable && this.selectType != 'radio' && this.pubCheckChange(newRow);
2186
- }
2187
- // 相关项位于底部,再次点击已选中数据不取消勾选
2188
- let isBtmCheck = this.aboutPositionBtm && !setChecked;
2189
- if (this.selectType != 'radio' && !isBtmCheck) {
2190
- table.setCheckboxRow([row], setChecked);
2191
- }
2192
- }
2193
- if (this.isTreeTable) {
2194
- setChecked && this.$emit('handlerClickRow', row, rowIndex, { source, column, trigger });
2195
- this.setTableCurrentRow(table, row);
2196
- return;
2197
- }
2198
-
2199
- this.setCheckedMehod(setChecked, row);
2200
-
2201
- // 选中row
2202
- let curCheckedRow = table.getCheckboxRecords();
2203
- this.$set(this, 'checkedRows', curCheckedRow);
2204
-
2205
- this.setCurrentCheckedLength();
2206
- this.lastPageIndex = this.pageVO.pageIndex;
2207
- setChecked && this.$emit('handlerClickRow', row, rowIndex, { source, trigger });
2208
- this.setTableCurrentRow(table, row);
2209
- },
2210
- setBtmDbClick(row) {
2211
- if (!row) return;
2212
- let id = row[this.handleRowId];
2213
- if (!id) return;
2214
- let table = this.$refs.xGrid;
2215
- if (!table) return;
2216
- let curRow = table?.getRowById(id);
2217
- const {fullData} = table.getTableData()
2218
- if(!curRow) {
2219
- if(fullData?.length) {
2220
- curRow = fullData.find(item => item[this.handleRowId] === id)
2221
- if(!curRow) {
2222
- let oId = row.__originItem__?.[this.handleRowId]
2223
- oId && (curRow = fullData.find(item => item[this.handleRowId] === oId));
2224
- }
2225
- }
2226
- }
2227
- if (!curRow) return;
2228
- this.handlerClickRow({ row: curRow });
2229
- },
2230
- /**
2231
- * 单选行数据 树结构 扁平化处理
2232
- */
2233
- flattenRow(row, newRow, newTheUniqueKeyArr) {
2234
- newRow.push(row);
2235
- newTheUniqueKeyArr.push(row[this.handleRowId]);
2236
- if (row.childrenList && row.childrenList.length) {
2237
- row.childrenList.forEach(item => {
2238
- if (item.childrenList && item.childrenList.length) {
2239
- this.flattenRow(item, newRow, newTheUniqueKeyArr);
2240
- } else {
2241
- newTheUniqueKeyArr.push(item[this.handleRowId]);
2242
- newRow.push(item);
2243
- }
2244
- });
2245
- }
2246
- },
2247
- /**
2248
- * 树结构 选中交集
2249
- */
2250
- intersectRow(checkedRow, newTheUniqueKeyArr) {
2251
- let theUniqueKeyArr = [];
2252
- if (!checkedRow.length) return 1;
2253
- checkedRow.forEach(item => theUniqueKeyArr.push(item[this.handleRowId]));
2254
- if (!theUniqueKeyArr.length) return 1;
2255
- if (theUniqueKeyArr.length !== newTheUniqueKeyArr.length) return 1;
2256
- let res = theUniqueKeyArr.filter(x => {
2257
- newTheUniqueKeyArr.includes(x);
2258
- });
2259
- return res.length;
2260
- },
2261
- // 清除已选择的禁用多选项
2262
- removeCheckedDisabledRows() {
2263
- // 禁用多选的项可单选,判断是否符合条件并移除
2264
- if (this.checkedRows.length == 1 && !this.checkMethod({ row: this.checkedRows[0] })) {
2265
- this.checkedRows.pop();
2266
- }
2267
- },
2268
- setCheckedMehod(setChecked, row) {
2269
- if (setChecked) {
2270
- this.updateAddCheckedRows(row);
2271
- return;
2272
- }
2273
- // 跨页时 清空之前
2274
- if (this.pageVO.pageIndex != this.lastPageIndex) {
2275
- this.updateAddCheckedRows(row);
2276
- return;
2277
- }
2278
- if (this.currentCheckedKeys.includes(row[this.primaryKey])) {
2279
- // 关项位于底部,再次点击已选中数据不取消勾选,批量及行级按钮要显示 且 重新加载该数据相关项
2280
- if (this.aboutPositionBtm) {
2281
- this.$emit('preRowdblclick', row, {}, true, true);
2282
- return;
2283
- }
2284
- this.removeCheckedRows([row]);
2285
- return;
2286
- }
2287
- this.updateAddCheckedRows(row);
2288
- },
2289
- /* 多选相关 */
2290
- setAllCheckedRows(rows) {
2291
- if (this.isNestTable) return;
2292
- if (rows && rows.length) {
2293
- const copy = vexutils.handleBigArrayCopy(rows)?.filter(item => !item.forbiddenBatchSelect);
2294
- // 备份全选数据
2295
- this.allCheckedRows = copy;
2296
- // 全选的时候, 取消某个勾选会操作splice
2297
- this.checkedRows = copy;
2298
-
2299
- let table = this.$refs.xGrid;
2300
- table.setAllCheckboxRow(true);
2301
- }
2302
- },
2303
- removeCheckedRows(rows, isCheckedChange) {
2304
- this.removeCheckedDisabledRows();
2305
- let checkedRows = this.checkedRows;
2306
- let needRemoveIndexs = [];
2307
-
2308
- for (let i = 0; i < rows.length; i++) {
2309
- let row = rows[i];
2310
- let removeIndex = this.currentCheckedKeys.findIndex(item => {
2311
- return item === row[this.primaryKey];
2312
- });
2313
-
2314
- removeIndex >= 0 && needRemoveIndexs.push(removeIndex);
2315
- }
2316
-
2317
- needRemoveIndexs.sort((a, b) => b - a); // 从后往前删除
2318
-
2319
- this.$emit('selectionChangeLocal', {
2320
- isAdd: false,
2321
- isCheckedChange,
2322
- needRemoveIndexs,
2323
- newCheckedRows: [], // 防止报错
2324
- checkedRows
2325
- });
2326
- },
2327
- addCheckedRows(rows) {
2328
- this.removeCheckedDisabledRows();
2329
- let checkedRows = this.checkedRows;
2330
-
2331
- if (this.currentCheckedKeys.length + rows.length > this.MAX_CHECK_SIZE) {
2332
- this.$message.warning(`为了保证系统安全,单次操作数据量限额为${this.MAX_CHECK_SIZE}条,你可以通过高级筛选过滤后再次尝试`);
2333
- return false;
2334
- }
2335
-
2336
- let newCheckedRows = rows.filter(row => {
2337
- return !this.currentCheckedKeys.includes(row[this.primaryKey]);
2338
- });
2339
- checkedRows.push(...newCheckedRows);
2340
-
2341
- this.$emit('selectionChangeLocal', {
2342
- isAdd: true,
2343
- isCheckedChange: true,
2344
- newCheckedRows,
2345
- checkedRows
2346
- });
2347
- },
2348
- updateAddCheckedRows(rows, isTree = false) {
2349
- let obj = {
2350
- isUpdate: true,
2351
- updateRows: rows,
2352
- isTree
2353
- };
2354
- if (isTree) {
2355
- Object.assign(obj, {
2356
- isTree,
2357
- isCheckedChange: true,
2358
- checkedRows: this.checkedRows
2359
- });
2360
- }
2361
- this.$emit('selectionChangeLocal', obj);
2362
- },
2363
- treeTableSelectionChange(records) {
2364
- if (this.isTree == 0) {
2365
- return false;
2366
- }
2367
-
2368
- this.pubCheckChange(records, {setTreeData: true});
2369
- return true;
2370
- },
2371
- setTableCurrentRow(table, row, isSet) {
2372
- if (!this.aboutPositionBtm && !isSet) return;
2373
- setTimeout(() => {
2374
- table.setCurrentRow(row);
2375
- }, 30);
2376
- },
2377
- selectionChange({ checked, row, records }) {
2378
- // HACK: 防止点击多选框时,触发cell-click(行选中)事件
2379
- // $event.stopPropagation、$event.preventDefault,点击多选框列的空白处触发多选事件,无法阻止事件冒泡触发cell-click事件
2380
- let table = this.$refs.xGrid;
2381
-
2382
- // 相关项在底部,只选中一条的情况下,复选框不让去掉
2383
- if (this.aboutPositionBtm && this.checkedRows?.length === 1 && !checked) {
2384
- return false;
2385
- }
2386
-
2387
- this.isTriggerSelectionChange = true;
2388
- setTimeout(() => {
2389
- this.isTriggerSelectionChange = false;
2390
- }, 0);
2391
-
2392
- const newRecords = vexutils.clone(records, true);
2393
- if (this.isCheckStrictly) {
2394
- if (row.childrenList?.length) {
2395
- this.setCheckRow(row.childrenList, newRecords, checked);
2396
- } else {
2397
- this.setParentCheckRow(row, newRecords, checked);
2398
- }
2399
-
2400
- // 设置全选
2401
- const { tableData } = table.getTableData();
2402
- const allChild = this.getAllChild(tableData);
2403
- const isAllChecked = allChild.length === newRecords.filter(r => !r.childrenList?.length).length;
2404
- table.setAllCheckboxRow(isAllChecked);
2405
- // 依据以前逻辑,树表无需设置checkedRows
2406
- // this.$set(this, 'checkedRows', [...newRecords]);
2407
- }
2408
-
2409
- if (this.treeTableSelectionChange(newRecords)) return;
2410
-
2411
- if (checked) {
2412
- this.setTableCurrentRow(table, row);
2413
- this.addCheckedRows([row]);
2414
- } else {
2415
- table.clearCurrentRow();
2416
- this.removeCheckedRows([row], true);
2417
- }
2418
-
2419
- this.setCurrentCheckedLength();
2420
- },
2421
- selectionChangeAll({ checked, records }) {
2422
- const newRecords = vexutils.clone(records, true);
2423
- if (this.isCheckStrictly) {
2424
- const table = this.$refs.xGrid;
2425
- const { tableData } = table.getTableData();
2426
- this.setCheckRow(tableData, newRecords, checked);
2427
- // 注意,以下方法失效:https://gitee.com/xuliangzhan_admin/vxe-table/issues/I5XAEC
2428
- // table.setAllCheckboxRow(checked);
2429
- // const _records = table.getCheckboxRecords(true);
2430
- }
2431
-
2432
- if (this.treeTableSelectionChange(newRecords)) return;
2433
-
2434
- if (checked) {
2435
- this.addCheckedRows(newRecords);
2436
- } else {
2437
- this.removeCheckedRows(this.data);
2438
- }
2439
-
2440
- this.setCurrentCheckedLength();
2441
- },
2442
- pubCheckChange(rows = [], config = {}) {
2443
- // 树表格, 选中与单击行有出入, 用新变量保存一下
2444
- const {setTreeData, ...others} = config
2445
- if (this.isTreeTable) {
2446
- if (setTreeData) {
2447
- let filterTreeTable = rows.filter(item => {
2448
- let isGroupRow = vexutils.has(item, GROUP_TITLE_KEY);
2449
- return !isGroupRow;
2450
- })
2451
- this.treeTableLength = filterTreeTable.length;
2452
- this.treeTableData = filterTreeTable;
2453
- } else {
2454
- this.treeTableLength = 0;
2455
- this.treeTableData = [];
2456
- }
2457
- this.$emit("setTreeSelectRow", this.treeTableData)
2458
- }
2459
- this.visibleTreeCheck = rows.length > 1;
2460
- this.$emit('selectionChange', rows, others);
2461
- },
2462
- setCurrentPageRowChecked() {
2463
- let table = this.$refs.xGrid;
2464
- if (!table) return;
2465
- if(!this.currentCheckedKeys?.length) return;
2466
-
2467
- let currentPageTableData = table.getTableData()?.tableData;
2468
- let currentPageSelectedRows = currentPageTableData.filter(row => {
2469
- return this.currentCheckedKeys.includes(row[this.primaryKey]);
2470
- });
2471
- this.setCurrentCheckedLength();
2472
- if (!currentPageSelectedRows || !currentPageSelectedRows.length) {
2473
- table.setAllCheckboxRow(false);
2474
- return;
2475
- }
2476
- table.setCheckboxRow(currentPageSelectedRows, true);
2477
- },
2478
- /* 全选相关 */
2479
- handleCheckAll() {
2480
- if (this.pageVO.total > this.MAX_CHECK_SIZE) {
2481
- let text = `当前列表共${this.pageVO.total}条数据,为了确保系统安全,只能单次操作${this.MAX_CHECK_SIZE}条,你可以通过高级筛选过滤再次尝试`;
2482
- this.$message.warning(text);
2483
- // return false;
2484
- }
2485
-
2486
- this.$emit('selectionChangeAll');
2487
- },
2488
- handleCancelAllCheck() {
2489
- this.$emit('selectionChangeAllCancel', { type: 'cancelAll' });
2490
- },
2491
- setCurrentCheckedLength() {
2492
- let table = this.$refs.xGrid;
2493
- let currentPageTableData = table.getTableData().fullData;
2494
- let currentPageSelectedRows = currentPageTableData.filter(row => {
2495
- return this.currentCheckedKeys.includes(row[this.primaryKey]);
2496
- });
2497
-
2498
- this.currentPageSelectedLength = currentPageSelectedRows.length;
2499
- },
2500
- /* */
2501
- bindDocumentClick() {
2502
- hideAllWrap = this.hideAllWrap.bind(this);
2503
- window.document.addEventListener('click', hideAllWrap, true);
2504
- },
2505
- unBindDocumentClick() {
2506
- window.document.removeEventListener('click', hideAllWrap, true);
2507
- },
2508
- hideAllWrap(e) {
2509
- const path = e.path || (e.composedPath && e.composedPath());
2510
- const noWrap = className => {
2511
- return !path.some(p => {
2512
- return p.className && p.className.includes && p.className.includes(className);
2513
- });
2514
- };
2515
-
2516
- let notFilterWrap = noWrap('big-table-filter-wrap');
2517
- if (notFilterWrap) {
2518
- this.hideFilterWrap();
2519
- }
2520
- },
2521
- hideFilterWrap() {
2522
- let values = Object.values(this.filterFields);
2523
- values.forEach(item => {
2524
- item.visible = false;
2525
- });
2526
-
2527
- this.setFilterStatus();
2528
- },
2529
- // 排序
2530
- sortChange({ property, order }) {
2531
- if (this.isInlineOperating) return false;
2532
- // 重置自定义表头排序
2533
- Object.values(this.filterFields).forEach(item => (item.filterSort = null));
2534
-
2535
- this.$emit('sortChange', { prop: property, order });
2536
- },
2537
- // 齿轮设置按钮
2538
- showDrawer() {
2539
- const theads = this.$refs['xGrid'].$el.childNodes[0].childNodes[1].childNodes[0].getElementsByClassName('mycolumn');
2540
- this.$emit('setNestTableClickSetting', this.isNestTable);
2541
- this.$emit('showDrawer', theads);
2542
- },
2543
- handlePreView(data, i, e) {
2544
- e.preventDefault();
2545
- e.stopPropagation();
2546
- if (!data) data = require('./assets/img/xb_big.png');
2547
- this.$emit('handlePreView', data, i);
2548
- },
2549
- switchBtnOnChange(e, r, i, index) {
2550
- this.$emit('switchBtnOnChange', e, r, i, index);
2551
- },
2552
- hanldeCopyContent(e, value) {
2553
- e.preventDefault();
2554
- e.stopPropagation();
2555
- this.$emit('hanldeCopyContent', e, value);
2556
- },
2557
- // 链接按钮详情
2558
- linkDetail(row, col, index, e) {
2559
- if (this.isInlineOperating) return false;
2560
- let vxeTable = this.$refs.xGrid;
2561
- e.preventDefault();
2562
- // e.stopPropagation();
2563
- // 方晶晶验收2.5.12需求, 要求link字段第一次可选中checkbox, 第二次点击不取消选中
2564
- let isCheckedByCheckboxRow = vxeTable.isCheckedByCheckboxRow(row);
2565
- // 不冒泡 手动触发方法
2566
- if (!isCheckedByCheckboxRow) {
2567
- this.handlerClickRow({ row, rowIndex: index, source: 'linkDetail', column: col });
2568
- }
2569
- e.stopPropagation();
2570
- vxeTable.setCurrentRow(row);
2571
- this.$emit('setNestTableClick', this.isNestTable);
2572
- this.$emit('setCurRowIndex', index);
2573
- this.$emit('linkDetail', row, col, row[this.handlePrimaryKey], null, false, index, {isCheckedSameRow: isCheckedByCheckboxRow});
2574
- },
2575
- // 按钮事件
2576
- clickBtn(row, btn, index, e, j) {
2577
- e.preventDefault();
2578
- e.stopPropagation();
2579
- this.recordClickBtnInfo(row, index);
2580
- this.$emit('setNestTableClick', this.isNestTable);
2581
- this.$emit('setCurRowIndex', index);
2582
- this.$emit('clickBtn', row, btn, row[this.handlePrimaryKey], index);
2583
- let trigger_type = btn.settingObj?.[0]?.trigger_type;
2584
- if (trigger_type === 'EDIT_ROW') {
2585
- this.checkedRows = [row];
2586
- }
2587
- },
2588
- recordClickBtnInfo(row, index) {
2589
- this.currentClickBtnInfo = {
2590
- row,
2591
- index
2592
- };
2593
- },
2594
- // 统计
2595
- footerMethod({ columns, data }) {
2596
- let that = this;
2597
- // 原统计逻辑
2598
- if (!this.groupCountFields || !this.groupCountFields.length) {
2599
- return [
2600
- columns.map((column, index) => {
2601
- if (index === 0) {
2602
- return that.$root.$t('1.1.8.2.5');
2603
- }
2604
- return null;
2605
- })
2606
- ];
2607
- }
2608
- // 分组统计
2609
- let groupText = this.getFooterGroup(columns, data);
2610
- let groupColumns = columns.map((column, index) => {
2611
- if (index === 0) {
2612
- return that.$root.$t('1.1.8.2.5');
2613
- } else if (index === 1) {
2614
- return groupText;
2615
- }
2616
- return null;
2617
- });
2618
- this.$emit('setGroupText', groupText);
2619
- this.groupText = groupText;
2620
- return [groupColumns];
2621
- },
2622
-
2623
- getFooterGroup(columns, data) {
2624
- let { groupCountMap } = this;
2625
- let res = [];
2626
- this.groupCountFields.forEach(item => {
2627
- let tips = item.tips;
2628
- let color = item.color || '#000';
2629
- // 全部页
2630
- let value;
2631
- if (item.range == 'all') {
2632
- value = groupCountMap[item.key];
2633
- } else if (item.range == 'page') {
2634
- // 当前页
2635
- // avg 平均值 sum 合计 count 数量
2636
- let { sum = 0, count = 0 } = this.footerFieldSum(data, item.field, item.conObj);
2637
- value = count;
2638
- if (item.method == 'avg') {
2639
- value = sum / count || 0;
2640
- } else if (item.method == 'sum') {
2641
- value = sum;
2642
- }
2643
- }
2644
- // 保留四位小数
2645
- value = vexutils.round(value, 4);
2646
- res.push(`<span style="color: ${color}">${tips}:${value}</span>`);
2647
- });
2648
- return res.join('、');
2649
- },
2650
- footerFieldSum(list, field, conObj = []) {
2651
- let sum = 0,
2652
- count = 0;
2653
- let { fieldList = [] } = this.columnConfig;
2654
- list.forEach(i => {
2655
- this.DFS(i, node => {
2656
- if (!node.childrenList || !node.childrenList.length) {
2657
- let isShow = true;
2658
- // conObj 过滤单条数据 是否显示
2659
- if (conObj.length) {
2660
- let paramObj = {
2661
- table: node,
2662
- form: {},
2663
- sys: this?.userInfo?.map?.sysParams || {}
2664
- };
2665
- isShow = vexutils.parseCondition(conObj, paramObj, fieldList);
2666
- }
2667
- if (isShow) {
2668
- let value = node[field] || 0;
2669
- sum += Number(value);
2670
- ++count;
2671
- }
2672
- }
2673
- });
2674
- });
2675
- return { sum, count };
2676
- },
2677
- // 深度遍历tree
2678
- DFS(node, fn) {
2679
- if (!node) return;
2680
- const stack = [node];
2681
- while (stack.length > 0) {
2682
- const first = stack.shift();
2683
- if (first) {
2684
- fn(first);
2685
- }
2686
- first.childrenList &&
2687
- first.childrenList.reverse().forEach(child => {
2688
- stack.unshift(child);
2689
- });
2690
- }
2691
- },
2692
- toggleCellTreeExpand(data, table){
2693
- const {row} = data;
2694
- if(!row.hasChildren) return;
2695
- let isTreeExpandByRow = table.isTreeExpandByRow(row);
2696
- if(isTreeExpandByRow) return;
2697
- table.setTreeExpand(row, true)
2698
- },
2699
- // 懒加载树子节点
2700
- loadChildrenMethod({ row }) {
2701
- // vxe-table v2.x 未根据 checkMethod 禁用逻辑 直接根据父级决定子级checked状态
2702
- // 所以先设置 父级 checked false 再 恢复原状 顺便选中子级
2703
- const fixCheckedStatus = children => {
2704
- const needFix = this.selectType == 'checkbox' && row.checked && children.findIndex(item => !this.checkMethod({ row: item })) >= 0;
2705
- if (needFix) {
2706
- needFix && (row.checked = false);
2707
- setTimeout(() => {
2708
- this.$refs.xGrid?.setCheckboxRow(row, true);
2709
- }, 0);
2710
- }
2711
- };
2712
- if (this.isTree == 2) {
2713
- const { tableId, page, pageSize, autograph, isTreeOrList } = this.tableParams;
2714
- const { extraParams = {} } = this.listCountParams || {};
2715
- let tempExtra = {};
2716
- if (vexutils.isJSON(extraParams)) {
2717
- tempExtra = JSON.parse(extraParams);
2718
- }
2719
- // 20220725 测试要求懒加载树请求时带上父级的extraParams
2720
- const params = {
2721
- levelLazyLoadPrimaryKeyValue: row[this.primaryKey],
2722
- tableId,
2723
- page,
2724
- pageSize,
2725
- autograph,
2726
- isTreeOrList,
2727
- extraParams,
2728
- ...tempExtra
2729
- };
2730
-
2731
- return this.getAsyncTableData(params).then(({ data }) => {
2732
- if (data.result == 'SUCCESS') {
2733
- let cloneRows = JSON.parse(JSON.stringify(data.map.rows));
2734
- let { fieldList, btnList, showButtonTop } = this.columnConfig;
2735
- let rowNodes = this.formatData({
2736
- tableList: data.map.rows,
2737
- fieldList,
2738
- btnList,
2739
- oldtableData: cloneRows,
2740
- showButtonTop
2741
- });
2742
- rowNodes = this.setChecklist(rowNodes);
2743
- this.$emit('refreshOldTableData', cloneRows);
2744
- fixCheckedStatus(rowNodes);
2745
- return rowNodes;
2746
- }
2747
- });
2748
- } else {
2749
- fixCheckedStatus(row.childrenList);
2750
- return Promise.resolve(row.childrenList);
2751
- }
2752
- },
2753
- // 懒加载请求子集
2754
- getAsyncTableData(params) {
2755
- return this.axios.post('/tableReader/getTableData', this.$qs.stringify(params));
2756
- },
2757
- hanldeClickRefresh() {
2758
- this.$emit('pubTableRefresh');
2759
- },
2760
-
2761
- getOtherConfigInit() {
2762
- let tableOptions = this.$attrs?.tableOptions || this.tableOptions || {};
2763
- const config = tableOptions?.config || {};
2764
- return config || undefined;
2765
- },
2766
- // 单选
2767
- radioOnChange(rowData = {}) {
2768
- let { data, row, rowIndex } = rowData;
2769
- this.$emit('selectionChange', [{ ...row }]);
2770
- this.isradioChange = true;
2771
- },
2772
-
2773
- // 设置 单元格字体颜色
2774
- getCellStyle({ row }) {
2775
- if (row.fontColor) {
2776
- let fontRGBA = vexutils.hexToRGBA(row.fontColor, 1);
2777
- let cellFont = `rgba(${fontRGBA.r}, ${fontRGBA.g}, ${fontRGBA.b}, ${fontRGBA.a})`;
2778
- return { color: cellFont };
2779
- }
2780
- return null;
2781
- },
2782
-
2783
- // 设置 行样式
2784
- getRowStyle({ row }) {
2785
- if (row.rowColor) {
2786
- let rowRGBA = vexutils.hexToRGBA(row.rowColor, 0.2);
2787
- let rowBg = `rgba(${rowRGBA.r}, ${rowRGBA.g}, ${rowRGBA.b}, ${rowRGBA.a})`;
2788
- return `background-color:${rowBg}`;
2789
- }
2790
- return null;
2791
- },
2792
-
2793
- // 清除多选
2794
- clearChecked() {
2795
- this.checkedRows = [];
2796
- this.$refs.xGrid.clearCheckboxReserve();
2797
- this.$refs.xGrid.clearCheckboxRow();
2798
- this.$refs.xGrid.clearRadioReserve();
2799
- this.$refs.xGrid.clearRadioRow();
2800
- this.visibleTreeCheck = false;
2801
- this.treeTableLength = 0;
2802
- this.treeTableData = [];
2803
- this.$emit("setTreeSelectRow", this.treeTableData)
2804
- },
2805
-
2806
- handlerScroll(params) {
2807
- if (params.isX) {
2808
- this.hideFilterWrap();
2809
- }
2810
- },
2811
- getFooterTooltipTitle(column) {
2812
- let t = '';
2813
- let IS_MONEY = 'MONEY' === this.getFieldAttrType(column);
2814
- if (vexutils.has(this.sumData, column.property)) {
2815
- let val = vexutils.round(Number(this.sumData[column.property]), 4);
2816
- t += `<p class="table-footer-tooltip-label-wrap">
2817
- <span class="table-footer-tooltip-label">求和:</span>
2818
- ${IS_MONEY ? val.toFixed(2) : val}
2819
- </p>`;
2820
- }
2821
- if (vexutils.has(this.avgData, column.property)) {
2822
- let val = vexutils.round(Number(this.avgData[column.property]), 4);
2823
- t += `<p class="table-footer-tooltip-label-wrap">
2824
- <span class="table-footer-tooltip-label">平均值:</span>
2825
- ${IS_MONEY ? val.toFixed(2) : val}</p>`;
2826
- }
2827
-
2828
- return t;
2829
- },
2830
- getFooterTitle(column) {
2831
- let IS_MONEY = 'MONEY' === this.getFieldAttrType(column);
2832
- if (vexutils.has(this.sumData, column.property)) {
2833
- let val = vexutils.round(Number(this.sumData[column.property]), 2);
2834
- return IS_MONEY ? val.toFixed(2) : val;
2835
- }
2836
- if (vexutils.has(this.avgData, column.property)) {
2837
- let val = vexutils.round(Number(this.avgData[column.property]), 2);
2838
- return IS_MONEY ? val.toFixed(2) : val;
2839
- }
2840
- return null;
2841
- },
2842
- getFieldAttrType(column) {
2843
- let fieldKeyMap = this?.fieldKeyMap || {};
2844
- let field = fieldKeyMap[column.property];
2845
- return field?.attrType || field?.settingObj?.attr;
2846
- },
2847
- refreshTable() {
2848
- this.hasRefresh = false;
2849
- this.$emit('refreshTable');
2850
- // this.DELETE_TABLE_REFRESH_CACHE(this.tableParams.tableId);
2851
- },
2852
- // 针对非异步加载的树
2853
- triggerExpand(e, isExpand) {
2854
- e.preventDefault();
2855
- e.stopPropagation();
2856
- let table = this.$refs.xGrid;
2857
- if (this.total > 1000) {
2858
- this.$message.warning('当前数据量超过1000条,无法全部展开!');
2859
- } else {
2860
- this.isExpand = !isExpand;
2861
- if (isExpand) {
2862
- table.clearTreeExpand();
2863
- } else {
2864
- this.$emit('triggerSpinning', true);
2865
- setTimeout(() => {
2866
- table.setAllTreeExpand(true).then(() => {
2867
- this.$emit('triggerSpinning', false);
2868
- });
2869
- }, 100);
2870
- }
2871
- }
2872
- },
2873
- setRowStatus(vxeTable, rowIndex, value) {
2874
- /**
2875
- * 行编辑状态切换,样式修改
2876
- * 目前行编辑的状态行高度为66px,普通状态的高度应取配置值(如果有)
2877
- */
2878
- if (!vxeTable) return false;
2879
-
2880
- let tableWrap = [
2881
- vxeTable.querySelector('.vxe-table--main-wrapper'),
2882
- vxeTable.querySelector('.vxe-table--fixed-left-wrapper'),
2883
- vxeTable.querySelector('.vxe-table--fixed-right-wrapper'),
2884
- vxeTable.querySelector('.vxe-table--body-wrapper')
2885
- ].filter(item => item);
2886
-
2887
- let rowWrap = [];
2888
- tableWrap.forEach(table => {
2889
- let row = [...table.querySelectorAll('.vxe-body--row')];
2890
- rowWrap.push(row[rowIndex]);
2891
- });
2892
-
2893
- rowWrap = rowWrap.filter(item => item);
2894
-
2895
- let height = value ? `${value}px` : value;
2896
- let lineHeight = value ? `${value - 14}px` : value;
2897
- // 如value 没有值,则是恢复默认的行高
2898
- if (!value) {
2899
- let rowheight = this?.tableAttrs?.rowConfig?.height;
2900
- if (rowheight) {
2901
- height = `${rowheight}px`;
2902
- lineHeight = '30px';
2903
- }
2904
- }
2905
- rowWrap.forEach(wrap => {
2906
- let rowItemWrap = [...wrap.querySelectorAll('.vxe-cell')];
2907
- rowItemWrap.push(...[...wrap.querySelectorAll('.vxe-body--column')]);
2908
- rowItemWrap.forEach(dom => {
2909
- dom.style.setProperty('height', height, value ? 'important' : undefined);
2910
- dom.style.lineHeight = lineHeight;
2911
- if (value) {
2912
- dom.style.backgroundColor = '#EFF5FF';
2913
- setTimeout(() => {
2914
- dom.title = '';
2915
- }, 1000);
2916
- } else {
2917
- dom.style.backgroundColor = null;
2918
- }
2919
- });
2920
- });
2921
- },
2922
- handleTableHeight() {
2923
- if (!this.isNestTable) return this.height;
2924
- // 嵌套子表需要根据行数设置高
2925
- let tableHeight = this.styleSetting?.tableHeight || 'table-simple';
2926
- let dataLen = this.data?.length || 1;
2927
- let height = this.checkWidth[tableHeight] * dataLen + 90;
2928
- return `${height}px`;
2929
- },
2930
- /**
2931
- * 列表单条新增
2932
- */
2933
- tableAddData(data) {
2934
- if (this.isNestTable) return;
2935
- let formatData = this.setChecklist(data);
2936
- let vxeTable = this.$refs.xGrid;
2937
- vxeTable.insert(formatData);
2938
- // 性能模式新增后需要更改列表total
2939
- this.$emit('asyncTableChange', 'add');
2940
- this.$emit('triggerSpinning', false);
2941
- },
2942
- /**
2943
- * 列表单条删除
2944
- */
2945
- tableRemoveData(oldRow) {
2946
- if (this.isNestTable) return;
2947
- let id = oldRow[this.handleRowId];
2948
- let vxeTable = this.$refs.xGrid;
2949
- let row = vxeTable.getRowById(id);
2950
- vxeTable.remove(row);
2951
- // 性能模式新增后需要更改列表total
2952
- this.$emit('asyncTableChange', 'remove');
2953
- this.$emit('triggerSpinning', false);
2954
- },
2955
- /**
2956
- * 列表单条更新
2957
- */
2958
- tableUpdateData(data, oldIndex) {
2959
- if (this.isNestTable) return;
2960
- if (!this.originFormatList[oldIndex]) return;
2961
- let formatData = this.setChecklist(data) || [];
2962
- let vxeTable = this.$refs.xGrid;
2963
- this.originFormatList.splice(oldIndex, 1, formatData[0]);
2964
- vxeTable.loadData(this.originFormatList);
2965
- this.$emit('triggerSpinning', false);
2966
- this.$emit('handlerClickRow', formatData[0], oldIndex);
2967
- },
2968
-
2969
- },
2970
- });
2971
- </script>
2972
- <style lang="less" scoped>
2973
- @import './assets/style/table-base.less';
2974
- </style>
2975
- <style lang="less">
2976
- @import './assets/style/table-global.less';
2977
- </style>