cnhis-design-vue 0.2.64-beta → 0.3.2-beta

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