cnhis-design-vue 2.1.58 → 2.1.59

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (572) hide show
  1. package/.prettierrc.js +27 -27
  2. package/CHANGELOG.md +2610 -2641
  3. package/README.md +90 -90
  4. package/commitlint.config.js +1 -1
  5. package/es/affix/index.js +8 -8
  6. package/es/age/index.js +18 -18
  7. package/es/alert/index.js +8 -8
  8. package/es/anchor/index.js +8 -8
  9. package/es/auto-complete/index.js +8 -8
  10. package/es/avatar/index.js +8 -8
  11. package/es/back-top/index.js +8 -8
  12. package/es/badge/index.js +8 -8
  13. package/es/base/index.js +8 -8
  14. package/es/big-table/index.js +345 -333
  15. package/es/big-table/style.css +1 -1
  16. package/es/breadcrumb/index.js +8 -8
  17. package/es/button/index.js +31 -31
  18. package/es/calendar/index.js +8 -8
  19. package/es/captcha/index.js +7 -7
  20. package/es/card/index.js +8 -8
  21. package/es/carousel/index.js +8 -8
  22. package/es/cascader/index.js +8 -8
  23. package/es/checkbox/index.js +17 -17
  24. package/es/col/index.js +8 -8
  25. package/es/collapse/index.js +8 -8
  26. package/es/color-picker/index.js +5 -5
  27. package/es/comment/index.js +8 -8
  28. package/es/config-provider/index.js +8 -8
  29. package/es/date-picker/index.js +30 -30
  30. package/es/descriptions/index.js +8 -8
  31. package/es/divider/index.js +8 -8
  32. package/es/drag-layout/index.js +5 -5
  33. package/es/drawer/index.js +8 -8
  34. package/es/dropdown/index.js +8 -8
  35. package/es/editor/index.js +1 -1
  36. package/es/ellipsis/index.js +1 -1
  37. package/es/empty/index.js +8 -8
  38. package/es/fabric-chart/index.js +724 -436
  39. package/es/fabric-chart/style.css +1 -1
  40. package/es/form/index.js +8 -8
  41. package/es/form-model/index.js +8 -8
  42. package/es/form-table/index.js +144 -144
  43. package/es/grid/index.js +4 -4
  44. package/es/index/index.js +1965 -1650
  45. package/es/index/style.css +1 -1
  46. package/es/input/index.js +11 -11
  47. package/es/input-number/index.js +8 -8
  48. package/es/keep-cache/index.js +9 -9
  49. package/es/layout/index.js +8 -8
  50. package/es/list/index.js +8 -8
  51. package/es/locale-provider/index.js +8 -8
  52. package/es/map/index.js +13 -13
  53. package/es/mentions/index.js +8 -8
  54. package/es/menu/index.js +8 -8
  55. package/es/message/index.js +8 -8
  56. package/es/multi-chat/index.js +116 -116
  57. package/es/multi-chat-client/index.js +110 -110
  58. package/es/multi-chat-history/index.js +6 -6
  59. package/es/multi-chat-record/index.js +27 -27
  60. package/es/multi-chat-setting/index.js +43 -43
  61. package/es/multi-chat-sip/index.js +1 -1
  62. package/es/notification/index.js +8 -8
  63. package/es/page-header/index.js +8 -8
  64. package/es/pagination/index.js +8 -8
  65. package/es/popconfirm/index.js +8 -8
  66. package/es/popover/index.js +8 -8
  67. package/es/progress/index.js +8 -8
  68. package/es/radio/index.js +17 -17
  69. package/es/rate/index.js +8 -8
  70. package/es/result/index.js +8 -8
  71. package/es/row/index.js +8 -8
  72. package/es/scale-container/index.js +1 -1
  73. package/es/scale-view/index.js +158 -158
  74. package/es/select/index.js +44 -44
  75. package/es/select-label/index.js +50 -50
  76. package/es/select-person/index.js +20 -20
  77. package/es/shortcut-setter/index.js +10 -10
  78. package/es/skeleton/index.js +8 -8
  79. package/es/slider/index.js +8 -8
  80. package/es/space/index.js +8 -8
  81. package/es/spin/index.js +8 -8
  82. package/es/statistic/index.js +8 -8
  83. package/es/steps/index.js +8 -8
  84. package/es/switch/index.js +8 -8
  85. package/es/table-filter/index.js +253 -238
  86. package/es/table-filter/style.css +1 -1
  87. package/es/tabs/index.js +8 -8
  88. package/es/tag/index.js +9 -9
  89. package/es/time-picker/index.js +8 -8
  90. package/es/timeline/index.js +8 -8
  91. package/es/tooltip/index.js +8 -8
  92. package/es/transfer/index.js +8 -8
  93. package/es/tree/index.js +8 -8
  94. package/es/tree-select/index.js +8 -8
  95. package/es/upload/index.js +8 -8
  96. package/es/utils/clickoutside.js +7 -7
  97. package/es/utils/kty.min-1.0.0.js +5 -5
  98. package/es/utils/time-domain.js +16 -16
  99. package/es/utils/utils-map.js +32 -32
  100. package/es/utils/vexutils.js +27 -27
  101. package/es/verification-code/index.js +2 -2
  102. package/lib/cui.common.js +2045 -1730
  103. package/lib/cui.umd.js +2045 -1730
  104. package/lib/cui.umd.min.js +20 -20
  105. package/package.json +110 -110
  106. package/packages/affix/index.js +12 -12
  107. package/packages/affix/src/Affix.jsx +12 -12
  108. package/packages/age/index.js +27 -27
  109. package/packages/age/src/age/index.vue +139 -139
  110. package/packages/age/src/age-com/index.vue +209 -209
  111. package/packages/alert/index.js +12 -12
  112. package/packages/alert/src/Alert.jsx +11 -11
  113. package/packages/anchor/index.js +18 -18
  114. package/packages/anchor/src/Anchor.jsx +11 -11
  115. package/packages/anchor/src/Link.jsx +11 -11
  116. package/packages/auto-complete/index.js +12 -12
  117. package/packages/auto-complete/src/AutoComplete.jsx +12 -12
  118. package/packages/avatar/index.js +12 -12
  119. package/packages/avatar/src/Avatar.jsx +11 -11
  120. package/packages/back-top/index.js +12 -12
  121. package/packages/back-top/src/BackTop.jsx +11 -11
  122. package/packages/badge/index.js +12 -12
  123. package/packages/badge/src/Badge.jsx +11 -11
  124. package/packages/base/index.js +3 -3
  125. package/packages/big-table/index.js +16 -16
  126. package/packages/big-table/src/BigTable.vue +3150 -3144
  127. package/packages/big-table/src/Fieldset.vue +2067 -2067
  128. package/packages/big-table/src/assets/iconfont/iconfont.css +21 -21
  129. package/packages/big-table/src/assets/style/table-base.less +385 -385
  130. package/packages/big-table/src/assets/style/table-global.less +175 -175
  131. package/packages/big-table/src/components/AutoLayoutButton.vue +279 -279
  132. package/packages/big-table/src/components/NoData.vue +81 -81
  133. package/packages/big-table/src/components/TextOverTooltip.vue +120 -120
  134. package/packages/big-table/src/components/edit-form/EditForm.vue +509 -509
  135. package/packages/big-table/src/components/edit-form/edit-component/config-data/index.js +68 -68
  136. package/packages/big-table/src/components/edit-form/edit-component/edit-date-picker/edit-date-picker.vue +60 -60
  137. package/packages/big-table/src/components/edit-form/edit-component/edit-digital/edit-digital.vue +54 -54
  138. package/packages/big-table/src/components/edit-form/edit-component/edit-input/edit-input.vue +39 -39
  139. package/packages/big-table/src/components/edit-form/edit-component/edit-input-password/edit-input-password.vue +79 -79
  140. package/packages/big-table/src/components/edit-form/edit-component/edit-month-picker/edit-month-picker.vue +37 -37
  141. package/packages/big-table/src/components/edit-form/edit-component/edit-search/edit-search.vue +82 -82
  142. package/packages/big-table/src/components/edit-form/edit-component/edit-search-more/edit-search-more.vue +95 -95
  143. package/packages/big-table/src/components/edit-form/edit-component/edit-select/edit-select.vue +40 -40
  144. package/packages/big-table/src/components/edit-form/edit-component/edit-select-multiple/edit-select-multiple.vue +55 -55
  145. package/packages/big-table/src/components/edit-form/edit-component/edit-switch/edit-switch.vue +43 -43
  146. package/packages/big-table/src/components/edit-form/edit-component/edit-textarea/edit-textarea.vue +41 -41
  147. package/packages/big-table/src/components/edit-form/edit-component/edit-time-picker/edit-time-picker.vue +40 -40
  148. package/packages/big-table/src/components/edit-form/edit-component/mixins/bound-date.js +3 -3
  149. package/packages/big-table/src/components/edit-form/edit-component/mixins/dateType.js +217 -217
  150. package/packages/big-table/src/components/edit-form/edit-component/mixins/item-default.js +639 -639
  151. package/packages/big-table/src/components/edit-form/edit-component/mixins/search.js +1247 -1247
  152. package/packages/big-table/src/components/edit-form/edit-component/register-com.js +26 -26
  153. package/packages/big-table/src/components/edit-form/edit-item/form-event.js +80 -80
  154. package/packages/big-table/src/components/edit-form/edit-item/global-props.js +33 -33
  155. package/packages/big-table/src/components/edit-form/edit-item/index.js +4 -4
  156. package/packages/big-table/src/components/edit-form/edit-item/render-methods.js +28 -28
  157. package/packages/big-table/src/components/edit-form/edit-item/validate-rules.js +463 -463
  158. package/packages/big-table/src/components/edit-form/edit-mixins/form-commom.js +673 -673
  159. package/packages/big-table/src/components/edit-form/edit-mixins/index.js +3 -3
  160. package/packages/big-table/src/components/edit-form/edit-utils/index.js +112 -112
  161. package/packages/big-table/src/components/password-com.vue +58 -58
  162. package/packages/big-table/src/components/player-vod/index.vue +57 -57
  163. package/packages/big-table/src/components/player-vod/player.vue +189 -189
  164. package/packages/big-table/src/components/player-vod/video-list.vue +265 -265
  165. package/packages/big-table/src/components/player-vod/video-modal.vue +126 -126
  166. package/packages/big-table/src/utils/CustomPagination.vue +86 -86
  167. package/packages/big-table/src/utils/batchEditing.js +610 -610
  168. package/packages/big-table/src/utils/bigTableProps.js +103 -103
  169. package/packages/big-table/src/utils/format.js +557 -557
  170. package/packages/big-table/src/utils/nestTable.js +109 -109
  171. package/packages/big-table/src/utils/tableParse.js +234 -234
  172. package/packages/breadcrumb/index.js +21 -21
  173. package/packages/breadcrumb/src/Breadcrumb.jsx +11 -11
  174. package/packages/breadcrumb/src/BreadcrumbItem.jsx +11 -11
  175. package/packages/breadcrumb/src/BreadcrumbSeparator.jsx +11 -11
  176. package/packages/button/index.js +21 -21
  177. package/packages/button/src/Button.jsx +11 -11
  178. package/packages/button/src/ButtonGroup.jsx +11 -11
  179. package/packages/button/src/ButtonPrint/components/IdentityVerification.vue +181 -181
  180. package/packages/button/src/ButtonPrint/index.vue +766 -766
  181. package/packages/button/src/ButtonPrint/mixin/his-print.js +95 -95
  182. package/packages/calendar/index.js +12 -12
  183. package/packages/calendar/src/Calendar.jsx +11 -11
  184. package/packages/captcha/index.js +9 -9
  185. package/packages/captcha/src/Captcha.vue +164 -164
  186. package/packages/captcha/src/Index.vue +47 -47
  187. package/packages/captcha/src/SlideVerify.vue +285 -285
  188. package/packages/card/index.js +21 -21
  189. package/packages/card/src/Card.jsx +12 -12
  190. package/packages/card/src/CardGrid.js +7 -7
  191. package/packages/card/src/CardMeta.js +7 -7
  192. package/packages/carousel/index.js +12 -12
  193. package/packages/carousel/src/Carousel.jsx +12 -12
  194. package/packages/cascader/index.js +12 -12
  195. package/packages/cascader/src/Cascader.jsx +11 -11
  196. package/packages/checkbox/index.js +30 -30
  197. package/packages/checkbox/src/Checkbox.jsx +11 -11
  198. package/packages/checkbox/src/CheckboxImg/index.vue +141 -141
  199. package/packages/checkbox/src/Group.jsx +11 -11
  200. package/packages/col/index.js +13 -13
  201. package/packages/col/src/Col.jsx +11 -11
  202. package/packages/collapse/index.js +18 -18
  203. package/packages/collapse/src/Collapse.jsx +11 -11
  204. package/packages/collapse/src/Panel.jsx +11 -11
  205. package/packages/color-picker/index.js +10 -10
  206. package/packages/color-picker/src/color-picker.vue +191 -191
  207. package/packages/color-picker/src/style.less +109 -109
  208. package/packages/comment/index.js +12 -12
  209. package/packages/comment/src/Comment.jsx +11 -11
  210. package/packages/config-provider/index.js +12 -12
  211. package/packages/config-provider/src/ConfigProvider.jsx +11 -11
  212. package/packages/date-picker/index.js +26 -26
  213. package/packages/date-picker/src/DatePicker.jsx +12 -12
  214. package/packages/date-picker/src/MonthPicker.jsx +11 -11
  215. package/packages/date-picker/src/RangePicker.jsx +11 -11
  216. package/packages/date-picker/src/WeekPicker.jsx +11 -11
  217. package/packages/date-picker/src/utils/index.js +374 -374
  218. package/packages/descriptions/index.js +18 -18
  219. package/packages/descriptions/src/Descriptions.jsx +11 -11
  220. package/packages/descriptions/src/Item.jsx +11 -11
  221. package/packages/divider/index.js +12 -12
  222. package/packages/divider/src/Divider.jsx +11 -11
  223. package/packages/drag-layout/DragFormLeftItem.vue +173 -173
  224. package/packages/drag-layout/DragFormRightItem.vue +284 -284
  225. package/packages/drag-layout/I18n-mixins.js +10 -10
  226. package/packages/drag-layout/drag-layout.vue +778 -778
  227. package/packages/drag-layout/index.js +12 -12
  228. package/packages/drawer/index.js +12 -12
  229. package/packages/drawer/src/Drawer.jsx +11 -11
  230. package/packages/dropdown/index.js +12 -12
  231. package/packages/dropdown/src/Dropdown.jsx +11 -11
  232. package/packages/editor/index.js +9 -9
  233. package/packages/ellipsis/index.js +8 -8
  234. package/packages/ellipsis/src/Ellipsis.vue +65 -65
  235. package/packages/empty/index.js +12 -12
  236. package/packages/empty/src/Empty.jsx +11 -11
  237. package/packages/fabric-chart/index.js +9 -9
  238. package/packages/fabric-chart/src/FabricGrid.vue +67 -66
  239. package/packages/fabric-chart/src/components/DropPopup.vue +90 -90
  240. package/packages/fabric-chart/src/components/MouseRightClick.vue +168 -168
  241. package/packages/fabric-chart/src/components/TimeScaleValue.vue +114 -115
  242. package/packages/fabric-chart/src/const/defaultVaule.js +60 -59
  243. package/packages/fabric-chart/src/fabric-chart/FabricCanvas.vue +43 -9
  244. package/packages/fabric-chart/src/fabric-chart/FabricLines.vue +579 -552
  245. package/packages/fabric-chart/src/fabric-chart/FabricPolylines.vue +1142 -1126
  246. package/packages/fabric-chart/src/fabric-chart/FabricScaleValue.vue +134 -134
  247. package/packages/fabric-chart/src/fabric-chart/FabricTextGroup.vue +574 -566
  248. package/packages/fabric-chart/src/mixins/eventCommon.js +34 -1
  249. package/packages/fabric-chart/src/mixins/fabricCommon.js +95 -95
  250. package/packages/fabric-chart/src/mixins/fabricObject.js +193 -193
  251. package/packages/fabric-chart/src/mixins/type.js +5 -5
  252. package/packages/form/index.js +16 -16
  253. package/packages/form/src/Form.jsx +11 -11
  254. package/packages/form/src/Item.jsx +11 -11
  255. package/packages/form-model/index.js +14 -14
  256. package/packages/form-model/src/FormModel.jsx +11 -11
  257. package/packages/form-model/src/Item.jsx +11 -11
  258. package/packages/form-table/index.js +16 -16
  259. package/packages/form-table/src/FormTable.vue +1110 -1110
  260. package/packages/form-table/src/components/table-component/config-data/index.js +80 -80
  261. package/packages/form-table/src/components/table-component/global-props.js +22 -22
  262. package/packages/form-table/src/components/table-component/index.js +8 -8
  263. package/packages/form-table/src/components/table-component/mixins/bound-date.js +455 -455
  264. package/packages/form-table/src/components/table-component/mixins/dateType.js +217 -217
  265. package/packages/form-table/src/components/table-component/mixins/item-default.js +257 -257
  266. package/packages/form-table/src/components/table-component/mixins/search.js +1242 -1242
  267. package/packages/form-table/src/components/table-component/register-com.js +30 -30
  268. package/packages/form-table/src/components/table-component/table-age/table-age.vue +175 -175
  269. package/packages/form-table/src/components/table-component/table-date-picker/table-date-picker.vue +87 -87
  270. package/packages/form-table/src/components/table-component/table-digital/table-digital.vue +93 -93
  271. package/packages/form-table/src/components/table-component/table-input/table-input.vue +81 -81
  272. package/packages/form-table/src/components/table-component/table-input-password/table-input-password.vue +126 -126
  273. package/packages/form-table/src/components/table-component/table-month-picker/table-month-picker.vue +55 -55
  274. package/packages/form-table/src/components/table-component/table-search/table-search.vue +174 -174
  275. package/packages/form-table/src/components/table-component/table-search-more/table-search-more.vue +191 -191
  276. package/packages/form-table/src/components/table-component/table-select/table-select.vue +64 -64
  277. package/packages/form-table/src/components/table-component/table-select-multiple/table-select-multiple.vue +81 -81
  278. package/packages/form-table/src/components/table-component/table-textarea/table-textarea.vue +76 -76
  279. package/packages/form-table/src/components/table-component/table-time-picker/table-time-picker.vue +55 -55
  280. package/packages/form-table/src/components/table-component/table-tree-select/table-tree-select.vue +135 -135
  281. package/packages/form-table/src/components/table-component/text-over-tooltip/TextOverTooltip.vue +97 -97
  282. package/packages/form-table/src/components/table-item/form-event.js +81 -81
  283. package/packages/form-table/src/components/table-item/global-props.js +27 -27
  284. package/packages/form-table/src/components/table-item/index.js +4 -4
  285. package/packages/form-table/src/components/table-item/render-methods.js +28 -28
  286. package/packages/form-table/src/components/table-item/validate-rules.js +520 -520
  287. package/packages/form-table/src/components/table-mixins/form-commom.js +98 -98
  288. package/packages/form-table/src/components/table-mixins/index.js +3 -3
  289. package/packages/form-table/src/components/table-utils/index.js +112 -112
  290. package/packages/form-table/src/disabledDetail.less +46 -46
  291. package/packages/grid/index.js +10 -10
  292. package/packages/grid/src/grid.js +28 -28
  293. package/packages/icon/index.js +10 -10
  294. package/packages/icon/src/icon.js +13 -13
  295. package/packages/index.js +313 -313
  296. package/packages/input/index.js +30 -30
  297. package/packages/input/src/Group.jsx +11 -11
  298. package/packages/input/src/Input.jsx +11 -11
  299. package/packages/input/src/Password.jsx +11 -11
  300. package/packages/input/src/Search.jsx +11 -11
  301. package/packages/input/src/TextArea.jsx +11 -11
  302. package/packages/input/src/input-quick/components/quick-item.vue +284 -284
  303. package/packages/input/src/input-quick/components/quick-popover.vue +596 -596
  304. package/packages/input/src/input-quick/index.vue +137 -137
  305. package/packages/input-number/index.js +12 -12
  306. package/packages/input-number/src/InputNumber.jsx +11 -11
  307. package/packages/keep-cache/KeepCache.js +236 -236
  308. package/packages/keep-cache/index.css +2 -2
  309. package/packages/keep-cache/index.js +8 -8
  310. package/packages/layout/index.js +27 -27
  311. package/packages/layout/src/Content.jsx +11 -11
  312. package/packages/layout/src/Footer.jsx +11 -11
  313. package/packages/layout/src/Header.jsx +11 -11
  314. package/packages/layout/src/Layout.jsx +11 -11
  315. package/packages/layout/src/Sider.jsx +11 -11
  316. package/packages/list/index.js +21 -21
  317. package/packages/list/src/Item.jsx +11 -11
  318. package/packages/list/src/ItemMeta.jsx +11 -11
  319. package/packages/list/src/List.jsx +11 -11
  320. package/packages/locale-provider/index.js +12 -12
  321. package/packages/locale-provider/src/LocaleProvider.jsx +11 -11
  322. package/packages/map/index.js +9 -9
  323. package/packages/map/src/Map.vue +484 -484
  324. package/packages/map/src/popup-map.vue +53 -53
  325. package/packages/mentions/index.js +18 -18
  326. package/packages/mentions/src/Mentions.jsx +11 -11
  327. package/packages/mentions/src/Option.jsx +11 -11
  328. package/packages/menu/index.js +27 -27
  329. package/packages/menu/src/Divider.jsx +11 -11
  330. package/packages/menu/src/Item.jsx +11 -11
  331. package/packages/menu/src/ItemGroup.jsx +11 -11
  332. package/packages/menu/src/Menu.jsx +11 -11
  333. package/packages/menu/src/SubMenu.jsx +11 -11
  334. package/packages/message/index.js +8 -8
  335. package/packages/modal/index.js +10 -10
  336. package/packages/modal/src/Modal.js +7 -7
  337. package/packages/multi-chat/chat/addConference.vue +200 -200
  338. package/packages/multi-chat/chat/addMembers.vue +411 -411
  339. package/packages/multi-chat/chat/advancedFilter.vue +372 -372
  340. package/packages/multi-chat/chat/calling.vue +246 -246
  341. package/packages/multi-chat/chat/chatFooter.vue +1596 -1596
  342. package/packages/multi-chat/chat/chatHistory.vue +605 -605
  343. package/packages/multi-chat/chat/chatMain.vue +1486 -1486
  344. package/packages/multi-chat/chat/client/index.vue +149 -149
  345. package/packages/multi-chat/chat/delay.vue +177 -177
  346. package/packages/multi-chat/chat/evaluate.vue +343 -343
  347. package/packages/multi-chat/chat/messageRecord.vue +324 -324
  348. package/packages/multi-chat/chat/mixins/NoData.js +20 -20
  349. package/packages/multi-chat/chat/mixins/base.js +97 -97
  350. package/packages/multi-chat/chat/mixins/uniRTCAPI.js +80 -80
  351. package/packages/multi-chat/chat/mixins/viewerOptions.js +67 -67
  352. package/packages/multi-chat/chat/quickReply.vue +439 -439
  353. package/packages/multi-chat/chat/robot/index.vue +312 -312
  354. package/packages/multi-chat/chat/scrollList.vue +1238 -1238
  355. package/packages/multi-chat/chat/videoVoiceList.vue +348 -348
  356. package/packages/multi-chat/chat/voice.vue +431 -431
  357. package/packages/multi-chat/components/avatar.vue +113 -113
  358. package/packages/multi-chat/components/chat-tabs-header.vue +251 -251
  359. package/packages/multi-chat/components/classify-tabs.vue +185 -185
  360. package/packages/multi-chat/components/empty.vue +24 -24
  361. package/packages/multi-chat/components/modal-refuse-reason.vue +112 -112
  362. package/packages/multi-chat/components/modal-sip.vue +160 -160
  363. package/packages/multi-chat/components/modal-user-transfer.vue +98 -98
  364. package/packages/multi-chat/components/msg-describe.vue +138 -138
  365. package/packages/multi-chat/components/msg-picture.vue +68 -68
  366. package/packages/multi-chat/components/msg-prescription.vue +205 -205
  367. package/packages/multi-chat/components/read-record.vue +133 -133
  368. package/packages/multi-chat/components/read-status.vue +34 -34
  369. package/packages/multi-chat/components/user-status.vue +198 -198
  370. package/packages/multi-chat/index.js +7 -7
  371. package/packages/multi-chat/setting/authority/index.vue +156 -156
  372. package/packages/multi-chat/setting/authority/roleSetting.vue +204 -204
  373. package/packages/multi-chat/setting/baseInfo/index.vue +1316 -1316
  374. package/packages/multi-chat/setting/customerService/batchSelect.vue +403 -403
  375. package/packages/multi-chat/setting/customerService/index.vue +273 -273
  376. package/packages/multi-chat/setting/event/edit/condition.vue +128 -128
  377. package/packages/multi-chat/setting/event/edit/index.vue +437 -437
  378. package/packages/multi-chat/setting/event/edit/notice.vue +129 -129
  379. package/packages/multi-chat/setting/event/edit/strategy.vue +98 -98
  380. package/packages/multi-chat/setting/event/index.vue +249 -249
  381. package/packages/multi-chat/setting/index.vue +269 -269
  382. package/packages/multi-chat/setting/page.vue +14 -14
  383. package/packages/multi-chat/setting/sessionList/index.vue +412 -412
  384. package/packages/multi-chat/setting/sessionList/messageRecord.vue +372 -372
  385. package/packages/multi-chat/setting/userConfig/index.vue +124 -124
  386. package/packages/multi-chat/setting/worktime/index.vue +274 -274
  387. package/packages/multi-chat/store/actions.js +452 -452
  388. package/packages/multi-chat/store/getters.js +371 -371
  389. package/packages/multi-chat/store/helper.js +66 -66
  390. package/packages/multi-chat/store/index.js +50 -50
  391. package/packages/multi-chat/store/mutation.js +296 -296
  392. package/packages/multi-chat/store/state.js +117 -117
  393. package/packages/multi-chat/style/emoji.css +315 -315
  394. package/packages/multi-chat/style/message.mixin.less +38 -38
  395. package/packages/multi-chat/utils/chatSock.js +93 -93
  396. package/packages/multi-chat/utils/compressImage.js +115 -115
  397. package/packages/multi-chat/utils/emoji.json +68 -68
  398. package/packages/multi-chat/utils/index.js +259 -259
  399. package/packages/multi-chat/utils/observer-scroll.js +49 -49
  400. package/packages/multi-chat/utils/panelsetting.js +48 -48
  401. package/packages/multi-chat-client/index.js +7 -7
  402. package/packages/multi-chat-history/index.js +7 -7
  403. package/packages/multi-chat-record/index.js +7 -7
  404. package/packages/multi-chat-setting/index.js +7 -7
  405. package/packages/multi-chat-sip/index.js +6 -6
  406. package/packages/notification/index.js +8 -8
  407. package/packages/page-header/index.js +12 -12
  408. package/packages/page-header/src/PageHeader.jsx +11 -11
  409. package/packages/pagination/index.js +12 -12
  410. package/packages/pagination/src/Pagination.jsx +11 -11
  411. package/packages/popconfirm/index.js +12 -12
  412. package/packages/popconfirm/src/Popconfirm.jsx +11 -11
  413. package/packages/popover/index.js +12 -12
  414. package/packages/popover/src/Popover.jsx +11 -11
  415. package/packages/progress/index.js +12 -12
  416. package/packages/progress/src/Progress.jsx +11 -11
  417. package/packages/radio/index.js +33 -33
  418. package/packages/radio/src/Group.jsx +11 -11
  419. package/packages/radio/src/Radio.jsx +11 -11
  420. package/packages/radio/src/RadioButton.jsx +11 -11
  421. package/packages/radio/src/RadioImg/index.vue +124 -124
  422. package/packages/rate/index.js +12 -12
  423. package/packages/rate/src/Rate.jsx +11 -11
  424. package/packages/result/index.js +12 -12
  425. package/packages/result/src/Result.jsx +11 -11
  426. package/packages/row/index.js +12 -12
  427. package/packages/row/src/Row.jsx +11 -11
  428. package/packages/scale-container/index.js +8 -8
  429. package/packages/scale-container/src/ScaleContainer.vue +197 -197
  430. package/packages/scale-view/NoData.vue +81 -81
  431. package/packages/scale-view/answerParse.vue +133 -133
  432. package/packages/scale-view/customList.vue +801 -801
  433. package/packages/scale-view/data.js +80 -80
  434. package/packages/scale-view/evaluateCountdown.vue +155 -155
  435. package/packages/scale-view/evaluatePage.vue +202 -202
  436. package/packages/scale-view/formitem/data.js +3991 -3991
  437. package/packages/scale-view/formitem/index.js +6 -6
  438. package/packages/scale-view/formitem/r-address.vue +238 -238
  439. package/packages/scale-view/formitem/r-choice.vue +726 -726
  440. package/packages/scale-view/formitem/r-input.vue +92 -92
  441. package/packages/scale-view/formitem/r-prompt.vue +52 -52
  442. package/packages/scale-view/formitem/r-time.vue +285 -285
  443. package/packages/scale-view/formitem/r-upload-custom-list.vue +242 -242
  444. package/packages/scale-view/formitem/r-upload.vue +287 -287
  445. package/packages/scale-view/formitem/text-over-tooltip/TextOverTooltip.vue +98 -98
  446. package/packages/scale-view/index.js +17 -17
  447. package/packages/scale-view/mixin/NoData.js +38 -38
  448. package/packages/scale-view/mixin/evaluate.js +146 -146
  449. package/packages/scale-view/mixin/index.js +337 -337
  450. package/packages/scale-view/mixin/judgeTypes.js +267 -267
  451. package/packages/scale-view/scaleView.vue +2010 -2010
  452. package/packages/select/index.js +27 -27
  453. package/packages/select/src/CustomSelect/index.vue +130 -130
  454. package/packages/select/src/OptGroup.jsx +11 -11
  455. package/packages/select/src/Option.jsx +11 -11
  456. package/packages/select/src/Select/Select.vue +231 -231
  457. package/packages/select/src/Select/index.js +12 -12
  458. package/packages/select/src/TableSelect/index.vue +514 -514
  459. package/packages/select-label/index.js +14 -14
  460. package/packages/select-label/label-classify.vue +129 -129
  461. package/packages/select-label/labelFormContent.vue +787 -787
  462. package/packages/select-label/select-label.vue +581 -581
  463. package/packages/select-person/index.js +10 -10
  464. package/packages/select-person/search-tree.vue +373 -373
  465. package/packages/select-person/select-person.vue +1696 -1696
  466. package/packages/shortcut-setter/index.js +12 -12
  467. package/packages/shortcut-setter/src/ShortcutSetter.vue +55 -55
  468. package/packages/shortcut-setter/src/ShortcutSetterItem.vue +84 -84
  469. package/packages/shortcut-setter/src/utils/index.js +63 -63
  470. package/packages/skeleton/index.js +12 -12
  471. package/packages/skeleton/src/Skeleton.jsx +11 -11
  472. package/packages/slider/index.js +12 -12
  473. package/packages/slider/src/Slider.jsx +11 -11
  474. package/packages/space/index.js +12 -12
  475. package/packages/space/src/Space.jsx +11 -11
  476. package/packages/spin/index.js +12 -12
  477. package/packages/spin/src/Spin.jsx +11 -11
  478. package/packages/statistic/index.js +18 -18
  479. package/packages/statistic/src/Countdown.jsx +11 -11
  480. package/packages/statistic/src/Statistic.jsx +11 -11
  481. package/packages/steps/index.js +18 -18
  482. package/packages/steps/src/Step.jsx +11 -11
  483. package/packages/steps/src/Steps.jsx +11 -11
  484. package/packages/switch/index.js +12 -12
  485. package/packages/switch/src/Switch.jsx +11 -11
  486. package/packages/table-filter/index.js +27 -27
  487. package/packages/table-filter/src/base-search-com/BaseSearch.vue +2572 -2572
  488. package/packages/table-filter/src/classification/Classification-com.vue +1756 -1756
  489. package/packages/table-filter/src/classification/search-class-name.vue +266 -266
  490. package/packages/table-filter/src/classification/search-professional-model.vue +680 -680
  491. package/packages/table-filter/src/components/TextOverTooltip.vue +107 -107
  492. package/packages/table-filter/src/components/age-com/index.vue +205 -205
  493. package/packages/table-filter/src/components/button-group/ButtonGroup.vue +162 -162
  494. package/packages/table-filter/src/components/button-icon/button-icon.js +33 -33
  495. package/packages/table-filter/src/components/button-icon/getBtnIcon.js +34 -34
  496. package/packages/table-filter/src/components/c-tree-select/tree-select.vue +336 -336
  497. package/packages/table-filter/src/components/drop-button/drop-button.vue +224 -224
  498. package/packages/table-filter/src/components/drop-button/head-btn-icon.js +33 -33
  499. package/packages/table-filter/src/components/drop-view/drop-view.vue +89 -89
  500. package/packages/table-filter/src/components/multi-select/multi-select.vue +227 -227
  501. package/packages/table-filter/src/components/out-quick-search/out-quick-search.vue +340 -340
  502. package/packages/table-filter/src/components/range-age/index.vue +172 -172
  503. package/packages/table-filter/src/components/search-condition/SearchCondition.vue +1897 -1897
  504. package/packages/table-filter/src/components/search-condition/fieldTypeList.js +169 -169
  505. package/packages/table-filter/src/components/search-filter/SearchFilter.vue +278 -278
  506. package/packages/table-filter/src/components/search-modal/set-classification.vue +310 -310
  507. package/packages/table-filter/src/components/table-modal/TableModal.vue +473 -463
  508. package/packages/table-filter/src/const/dataOptions.js +43 -43
  509. package/packages/table-filter/src/const/index.js +1 -1
  510. package/packages/table-filter/src/index.vue +584 -584
  511. package/packages/table-filter/src/mixins/mixins.js +694 -694
  512. package/packages/table-filter/src/mixins/tableSearchCon.js +128 -128
  513. package/packages/table-filter/src/mixins/wordBookutils.js +102 -102
  514. package/packages/table-filter/src/quick-search/QuickSearch.vue +2125 -2125
  515. package/packages/tabs/index.js +18 -18
  516. package/packages/tabs/src/TabPane.jsx +11 -11
  517. package/packages/tabs/src/Tabs.jsx +11 -11
  518. package/packages/tag/index.js +21 -21
  519. package/packages/tag/src/CheckableTag.jsx +11 -11
  520. package/packages/tag/src/Tag.jsx +11 -11
  521. package/packages/tag/src/TagGroup.vue +621 -621
  522. package/packages/time-picker/index.js +12 -12
  523. package/packages/time-picker/src/TimePicker.jsx +11 -11
  524. package/packages/timeline/index.js +14 -14
  525. package/packages/timeline/src/Item.jsx +11 -11
  526. package/packages/timeline/src/Timeline.jsx +11 -11
  527. package/packages/tooltip/index.js +12 -12
  528. package/packages/tooltip/src/Tooltip.jsx +11 -11
  529. package/packages/transfer/index.js +12 -12
  530. package/packages/transfer/src/Transfer.jsx +11 -11
  531. package/packages/tree/index.js +18 -18
  532. package/packages/tree/src/Tree.jsx +11 -11
  533. package/packages/tree/src/TreeNode.jsx +11 -11
  534. package/packages/tree-select/index.js +18 -18
  535. package/packages/tree-select/src/TreeNode.jsx +11 -11
  536. package/packages/tree-select/src/TreeSelect.jsx +11 -11
  537. package/packages/upload/chunk-upload/chunk-upload-new.vue +1001 -1001
  538. package/packages/upload/chunk-upload/vod-chunk-upload.vue +749 -749
  539. package/packages/upload/chunk-upload/vod-upload-modal.vue +100 -100
  540. package/packages/upload/index.js +12 -12
  541. package/packages/upload/src/Upload.jsx +11 -11
  542. package/packages/verification-code/SlideVerify.vue +306 -306
  543. package/packages/verification-code/index.js +17 -17
  544. package/packages/verification-code/verification-code.vue +147 -147
  545. package/src/component/player-vod/index.vue +57 -57
  546. package/src/component/player-vod/player.vue +188 -188
  547. package/src/component/player-vod/video-list.vue +262 -262
  548. package/src/component/player-vod/video-modal.vue +128 -128
  549. package/src/component/select-options/index.vue +430 -430
  550. package/src/component/select-pages/index.vue +95 -95
  551. package/src/component/svg/index.vue +59 -59
  552. package/src/core/create.js +6 -6
  553. package/src/core/event.js +23 -23
  554. package/src/core/table-methods.js +444 -444
  555. package/src/directive/flexibleResize.js +151 -151
  556. package/src/directive/preventReClick.js +12 -12
  557. package/src/directive/scroll.js +230 -230
  558. package/src/global/variable.js +2 -2
  559. package/src/style/normalize.css +424 -424
  560. package/src/style/style.less +49 -49
  561. package/src/utils/UniRTCv2.js +626 -626
  562. package/src/utils/chatFetch.js +61 -61
  563. package/src/utils/clickoutside.js +75 -75
  564. package/src/utils/crypto.js +25 -25
  565. package/src/utils/index.js +81 -81
  566. package/src/utils/kty-sdk.js +582 -582
  567. package/src/utils/kty.min-1.0.0.js +14378 -14378
  568. package/src/utils/sip-device.js +79 -79
  569. package/src/utils/time-domain.js +193 -193
  570. package/src/utils/trtc.js +1 -1
  571. package/src/utils/utils-map.js +484 -484
  572. package/src/utils/vexutils.js +836 -836
@@ -1,1238 +1,1238 @@
1
- <script>
2
- import Grid from '~/grid';
3
- import infiniteScroll from 'vue-infinite-scroll';
4
- import { mapGetters, mapMutations, mapActions } from '../store/helper';
5
- import { getRecallText } from '../utils';
6
- import Avatar from '../components/avatar';
7
- import vexutils, { moment } from '@/utils/vexutils';
8
- import fetch, { qs } from '@/utils/chatFetch';
9
- import { Popover, Spin, Tooltip } from 'ant-design-vue';
10
- import SvgIcon from '@/component/svg/index.vue';
11
-
12
- export default {
13
- inject: ['store', 'i18nText', 'dispatchEvent'],
14
- components: {
15
- [Tooltip.name]: Tooltip,
16
- [Spin.name]: Spin,
17
- [Popover.name]: Popover,
18
- [Grid.name]: Grid,
19
- SvgIcon,
20
- Avatar
21
- },
22
- data() {
23
- return {
24
- scrollList: [],
25
- defaultAvatar: require('../img/default.png'),
26
- busy: false,
27
- pageSize: 20,
28
- pageNum: 1,
29
- infiniteMsgShow: true
30
- };
31
- },
32
- computed: {
33
- ...mapGetters(['userInfo']),
34
- ...mapGetters([
35
- 'assemblyId',
36
- 'classify',
37
- 'isScrollListChange',
38
- 'listChangeItem',
39
- 'currentTab',
40
- 'sessionId',
41
- 'keywords',
42
- 'searchKeywords',
43
- 'enable',
44
- 'panelParams',
45
- 'assemblySetting',
46
- 'clientId',
47
- 'clientParams',
48
- 'serviceId',
49
- 'msgList',
50
- 'queueItem',
51
- 'sdkInfo'
52
- ]),
53
- foldTheme() {
54
- return this.theme === 'fold';
55
- },
56
- tableTheme() {
57
- return this.theme === 'table';
58
- },
59
- classifyIcon() {
60
- const { classify, assemblySetting } = this;
61
- if (!classify) return '';
62
- const isListClassify = assemblySetting?.isListClassify === 'Y';
63
- const target = isListClassify ? assemblySetting?.listClassify?.find(item => item.classify === classify) : null;
64
- return target?.icon;
65
- },
66
- isListClassify() {
67
- return this.assemblySetting.isListClassify === 'Y';
68
- },
69
- tabChange() {
70
- let { searchKeywords, classify } = this;
71
- return {
72
- searchKeywords,
73
- classify
74
- };
75
- },
76
- tableColumns() {
77
- const tableLayout = this.assemblySetting?.listLayoutSetting?.tableLayout;
78
- if (tableLayout && tableLayout.length) {
79
- const htmlField = ['${lastContent}'];
80
- return tableLayout.map((item, i) => {
81
- let { title = '', name = '' } = item;
82
- title = title || name;
83
- const w = Math.max((title?.length || 1) * 14 + 22, 60);
84
- const key = name || i;
85
- const data = {
86
- ...item,
87
- title,
88
- // width: w,
89
- field: `_${key}_`,
90
- showHeaderOverflow: true,
91
- showOverflow: true
92
- };
93
- if (htmlField.includes(item.value) || item.mapping?.length > 0) {
94
- data.type = 'html';
95
- }
96
- return data;
97
- });
98
- }
99
- return [];
100
- },
101
- // 根据后台配置信息进行排序
102
- processedScrollList() {
103
- let processedScrollList = [];
104
- let settingList = [];
105
- if (this.tableTheme) {
106
- settingList = this.tableColumns.map(item => [item.field, item]);
107
- } else {
108
- let setting = this.assemblySetting.listLayoutSetting || {};
109
- if (setting.timeSetting) {
110
- setting = Object.assign({}, setting, {
111
- timeSettingTip: setting.timeSetting // 时间类型 tooltip 展示的值和原值不同 额外处理
112
- });
113
- }
114
- settingList = Object.entries(setting);
115
- }
116
- let reg = /\$\{(.+)\}/;
117
- const { currentTab, keywords, classify, isListClassify } = this;
118
- processedScrollList = this.scrollList.reduce((list, item) => {
119
- if (item.kind == 2 || !this.showScrollItem(item, currentTab, keywords, classify, isListClassify)) return list; // <- 通话记录跳过
120
- const layoutData = {};
121
- for (let [key, value] of settingList) {
122
- const isTip = /.+Tip$/.test(key);
123
- let parseValue = (value.value || '').replace(/\$\{([^}]+)\}/g, (_v, $1) => {
124
- let key = $1;
125
- let param;
126
- if (key.startsWith('form.')) {
127
- key = key.split('.')[1];
128
- let params = JSON.parse(item.params || '{}');
129
- param = params[key] || this.getMsgFieldValue(key, item, isTip);
130
- } else {
131
- param = this.getMsgFieldValue(key, item, isTip);
132
- }
133
- if (value.mapping) {
134
- // param = this.getMappingHTML(value.mapping[param]);
135
- param = this.getMappingHTML(value.mapping.find( v => v.value == param) || {});
136
- }
137
- return param || '';
138
- });
139
- layoutData[key] = parseValue;
140
- }
141
- list.push({ ...item, ...layoutData });
142
- return list;
143
- }, []);
144
-
145
- // 排队列表排序(1.等级2.创建时间)
146
- const sortTabs = ['queue', 'session'];
147
- const sortKeys = ['queueSortSetting', 'sessionSortSetting'];
148
- const sortIndex = sortTabs.indexOf(currentTab);
149
- if (sortIndex >= 0) {
150
- // 获取对应sortsetting, listSortSetting兼容旧数据
151
- const sortSetting = this.assemblySetting[sortKeys[sortIndex]] || this.assemblySetting.listSortSetting;
152
- if (sortSetting) {
153
- let { isParams, descOrAsc, orderBy } = sortSetting;
154
- orderBy = orderBy ? orderBy.replace(reg, '$1') : orderBy; // 去除 ${}
155
- let hasLevel = [],
156
- noLevel = [];
157
- processedScrollList.forEach(item => {
158
- let value;
159
- if (isParams) {
160
- value = JSON.parse(item.params || '{}')[orderBy];
161
- } else {
162
- value = item[orderBy];
163
- }
164
- vexutils.isUndefined(value) ? noLevel.push(item) : hasLevel.push(item);
165
- });
166
- hasLevel.sort((a, b) => {
167
- let aLevel = JSON.parse(a.params || '{}')[orderBy] || a[orderBy];
168
- let bLevel = JSON.parse(b.params || '{}')[orderBy] || b[orderBy];
169
- if (aLevel === bLevel) {
170
- return Number(a.createdTime) - Number(b.createdTime);
171
- }
172
- // return descOrAsc === 'desc' ? aLevel - bLevel : bLevel - aLevel;
173
- return descOrAsc === 'desc' ? bLevel - aLevel : aLevel - bLevel;
174
- });
175
- noLevel.sort((a, b) => Number(a.createdTime) - Number(b.createdTime));
176
- processedScrollList = [...hasLevel, ...noLevel];
177
- } else {
178
- processedScrollList.sort((a, b) => Number(a.createdTime) - Number(b.createdTime));
179
- }
180
- }
181
- return processedScrollList;
182
- }
183
- },
184
- props: {
185
- // 日期过滤条件
186
- dateParams: {
187
- type: Array,
188
- default: () => []
189
- },
190
- theme: {
191
- type: String,
192
- default: ''
193
- },
194
- // 默认会话id
195
- defSessionId: {
196
- type: [String, Number]
197
- },
198
- type: {
199
- type: String
200
- }
201
- },
202
- methods: {
203
- ...mapMutations([
204
- 'setSessionId',
205
- 'setIsScrollListChange',
206
- 'setListChangeItem',
207
- 'setCurrentTab',
208
- 'setClientId',
209
- 'setOnChating',
210
- 'setClientParams',
211
- 'setQueueItem',
212
- 'setScrollTo',
213
- 'setSessionHistoryList',
214
- 'setSessionEnd',
215
- 'setQueueStatistic',
216
- 'setSessionStatistic',
217
- 'offlineSessionStatistic',
218
- 'appendList',
219
- 'setSessionType',
220
- 'setOfflineClassifyCount',
221
- 'setScrollQueueId',
222
- 'setLastClassify',
223
- 'setLastCurrentTab',
224
- 'setFooterMessage',
225
- 'setCurScrollItem',
226
- 'setDisableOperate',
227
- 'setClassify',
228
- 'setOfflineSessionStatistic',
229
- 'setClosedSession'
230
- ]),
231
- ...mapMutations({
232
- clearMsgList: 'setMsgList'
233
- }),
234
- ...mapActions(['setMsgList', 'setChatTimer']),
235
- isActive(item) {
236
- let res = this.sessionId === item.id || (item.username && item.username === this.clientId);
237
- return res;
238
- },
239
- formatBrief(item) {
240
- let { lastContentRecallFlag } = item;
241
- if (lastContentRecallFlag == 1) {
242
- const content = JSON.parse(item.lastContent);
243
- const flag = this.serviceId == item.fromId;
244
- return getRecallText(this, { content }, flag);
245
- }
246
- let lastItem;
247
- try {
248
- lastItem = JSON.parse(item.lastContent || '{}');
249
- } catch {
250
- console.log(item.lastContent.value);
251
- }
252
- if (!lastItem) return '';
253
- let { type, content } = lastItem;
254
- if (type === 1) {
255
- return `[${this.i18nText('1.9.181')}]`;
256
- } else if (type === 0) {
257
- return content;
258
- } else if (type === 2) {
259
- // return `[${this.i18nText("1.9.388")}]`;
260
- return '[视频通话]';
261
- } else if (type === 5) {
262
- return '[语音通话]';
263
- } else if (type === 6) {
264
- return '[语音消息]';
265
- } else if (type === 3) {
266
- return JSON.parse(content)?.type == 2 ? `[${this.i18nText('1.9.389')}]` : `[${this.i18nText('1.9.390')}]`;
267
- } else if (type === 4) {
268
- let title = content.title ? content.title : JSON.parse(content).title;
269
- return `[${title}]`;
270
- } else {
271
- return '';
272
- }
273
- },
274
- showScrollItem(item, currentTab, keywords, classify, isListClassify) {
275
- if (currentTab == 'end') return true;
276
- return (!keywords || (item.name || item.toName || item.title).includes(keywords)) && (item.classify === classify || !isListClassify);
277
- },
278
- handleInfiniteOnLoad() {
279
- if (this.busy) return;
280
- if (this.currentTab !== 'end') {
281
- this.busy = true;
282
- this.infiniteMsgShow = false;
283
- return;
284
- }
285
- this.busy = true;
286
- this.infiniteMsgShow = true;
287
- // 发送请求有时间间隔第一个滚动时间结束后才发送第二个请求
288
- this.pageNum++; // 滚动之后加载第二页
289
- this.getScrollList(true);
290
- },
291
- async getScrollList(flag) {
292
- switch (this.currentTab) {
293
- case 'queue':
294
- this.getQueueUsers();
295
- break;
296
- case 'session':
297
- await this.getSessionList();
298
- this.handleSelectItem();
299
- break;
300
- case 'end':
301
- // this.getSessionList(flag);
302
- this.getData(1, flag);
303
- }
304
- },
305
- /* 获取会话列表 */
306
- getSessionList() {
307
- let params = {
308
- ...this.getDateParams(),
309
- assemblyId: this.assemblyId,
310
- onlineType: this.currentTab === 'session' ? 1 : 0
311
- };
312
- if (this.isListClassify) {
313
- this.assemblySetting.listClassify.forEach(item => {
314
- this.$set(item, 'count', '');
315
- });
316
- }
317
- return fetch
318
- .get('/chat/service/getMySessionList', {
319
- params
320
- })
321
- .then(({ data }) => {
322
- if (data.result === 'SUCCESS') {
323
- this.scrollList = data.map.list;
324
- if (this.isListClassify) {
325
- this.assemblySetting.listClassify.forEach(item => {
326
- let count = data.map.list.filter(i => i.classify === item.classify).length;
327
- this.$set(item, 'count', count);
328
- });
329
- }
330
- if (data.map.listStatistic) {
331
- if (this.currentTab === 'end') {
332
- this.setOfflineSessionStatistic(data.map.listStatistic);
333
- } else {
334
- this.setSessionStatistic(data.map.listStatistic);
335
- }
336
- }
337
- } else {
338
- this.$message.warning(data.resultMsg);
339
- }
340
- });
341
- },
342
- async getData(type, flag) {
343
- try {
344
- let res = await this.handleDataRequest(type);
345
- let { data = {} } = res;
346
- if (data.result === 'SUCCESS') {
347
- let { list = [] } = data.map;
348
- if (flag) {
349
- if (!list || !list.length) {
350
- this.busy = true;
351
- this.infiniteMsgShow = false;
352
- } else {
353
- this.busy = false;
354
- this.scrollList = this.scrollList.concat(list);
355
- }
356
- return;
357
- } else {
358
- this.infiniteMsgShow = false;
359
- this.busy = false;
360
- this.scrollList = list;
361
- }
362
- if (this.isListClassify) {
363
- this.assemblySetting.listClassify.forEach(item => {
364
- let count = list.filter(i => i.classify === item.classify).length;
365
- this.$set(item, 'count', count);
366
- });
367
- }
368
- let { classifyStatistic = {} } = data.map || {};
369
- if (Object.keys(classifyStatistic).length) {
370
- this.setOfflineClassifyCount(classifyStatistic);
371
- }
372
- } else {
373
- this.infiniteMsgShow = false;
374
- this.$message.warning(data.resultMsg);
375
- }
376
- this.handleSelectItem();
377
- } catch (err) {
378
- this.infiniteMsgShow = false;
379
- console.log(err);
380
- }
381
- },
382
- getDateParams() {
383
- let params = {};
384
- const dateParams = this.dateParams;
385
- if (dateParams?.length) {
386
- const fmt = 'YYYY-MM-DD';
387
- params.startDate = dateParams[0].format(fmt) + ' 00:00:00';
388
- params.endDate = dateParams[1].format(fmt) + ' 23:59:59';
389
- }
390
- return params;
391
- },
392
- handleDataRequest(type) {
393
- let url = type == 1 ? '/chat/service/getMySessionList' : '/chat/service/getQueueUsers';
394
- let params = {
395
- ...this.getDateParams(),
396
- assemblyId: this.assemblyId,
397
- pageSize: this.pageSize,
398
- pageNum: this.pageNum
399
- };
400
- if (type == 1) {
401
- params.onlineType = this.currentTab === 'session' ? 1 : 0;
402
- }
403
- if (this.currentTab == 'end') {
404
- params.keyword = this.searchKeywords;
405
- params.classify = this.classify;
406
- }
407
- if (this.isListClassify) {
408
- this.assemblySetting.listClassify.forEach(item => {
409
- this.$set(item, 'count', '');
410
- });
411
- }
412
- return fetch.get(url, {
413
- params
414
- });
415
- },
416
- /* 获取排队列表 */
417
- getQueueUsers() {
418
- if (this.isListClassify) {
419
- this.assemblySetting.listClassify.forEach(item => {
420
- this.$set(item, 'count', '');
421
- });
422
- }
423
- // let params = { assemblyId: this.assemblyId };
424
- let params = {
425
- ...this.getDateParams(),
426
- assemblyId: this.assemblyId,
427
- };
428
- fetch
429
- .get('/chat/service/getQueueUsers', {
430
- params
431
- })
432
- .then(({ data }) => {
433
- if (data.result === 'SUCCESS') {
434
- this.scrollList = data.map.list;
435
- if (this.isListClassify) {
436
- this.assemblySetting.listClassify.forEach(item => {
437
- let count = data.map.list.filter(i => i.classify === item.classify).length;
438
- this.$set(item, 'count', count);
439
- });
440
- }
441
- if (data.map.listStatistic) {
442
- this.setQueueStatistic(data.map.listStatistic);
443
- }
444
- } else {
445
- this.$message.warning(data.resultMsg);
446
- }
447
- });
448
- },
449
- /* 点击列表项 */
450
- handleClick(item) {
451
- this.setLastClassify(this.classify);
452
- this.setLastCurrentTab(this.currentTab);
453
- this.setCurScrollItem(item);
454
- this.setClosedSession(this.type === 'end');
455
- switch (this.type) {
456
- case 'queue':
457
- this.accessChat(item);
458
- break;
459
- case 'session':
460
- this.getMsgList(item);
461
- break;
462
- case 'end':
463
- if (item.msgCount > 0) {
464
- this.cleanSessionCount(item);
465
- }
466
- this.getEndMsgList(item);
467
- }
468
- this.dispatchEvent('click_sessionListUser', JSON.parse(JSON.stringify(item)));
469
- },
470
- handleTableCellClick({ row }) {
471
- this.handleClick(row);
472
- },
473
- tableRowClass({ row }) {
474
- return this.isActive(row) ? 'active' : '';
475
- },
476
- handleTableScroll(args) {
477
- let target;
478
- if (this.currentTab == 'end' && !this.busy && (target = args.$event.target) && target.scrollHeight - target.clientHeight - args.scrollTop <= 10) {
479
- this.handleInfiniteOnLoad();
480
- }
481
- },
482
- cleanSessionCount(item) {
483
- let params = {
484
- sessionId: item.id,
485
- orgId: this.userInfo?.sysParams?.orgId,
486
- assemblyId: this.assemblyId
487
- };
488
- fetch.post('/chat/service/cleanSessionCount', qs.stringify(params)).then(({ data }) => {
489
- if (data.result === 'SUCCESS') {
490
- item.msgCount = 0;
491
- }
492
- });
493
- },
494
- /* 查看结束历史消息 */
495
- getEndMsgList(item) {
496
- let { id, toId } = item;
497
- this.setClientId(toId);
498
- this.setSessionId(id);
499
- this.clearMsgList();
500
- this.setMsgList({ validate: this.getMsgValidateFn(toId) });
501
- this.setOnChating(false);
502
- this.setChatTimer();
503
- let clientParams = JSON.parse(item.params || '{}');
504
- this.setClientParams(clientParams);
505
- // this.getSessionHistoryList();
506
- this.setQueueItem(null);
507
- },
508
- /* 客服点击会话列表进入会话, id:会话id, toId:客户id */
509
- getMsgList(item) {
510
- let { id, toId, params: cParams } = item;
511
- let lastSessionId = this.sessionId;
512
- this.setQueueItem(null);
513
- item.msgCount = 0;
514
- let params = {
515
- sessionId: id,
516
- lastSessionId,
517
- assemblyId: this.assemblyId
518
- };
519
- // 心跳
520
- fetch.post(
521
- '/chat/service/sessionHeart',
522
- qs.stringify({
523
- assemblyId: this.assemblyId,
524
- sessionId: id
525
- })
526
- );
527
- this.setDisableOperate(true);
528
- fetch
529
- .post('/chat/service/accessSession', qs.stringify(params))
530
- .then(({ data }) => {
531
- this.setScrollQueueId('');
532
- this.setSessionId(id);
533
- if (data.result === 'SUCCESS') {
534
- let { countdown, clientParams, sessionType, countdownDesc } = data.map;
535
- this.setClientId(toId);
536
- this.clearMsgList();
537
- this.setMsgList({ validate: this.getMsgValidateFn(toId) });
538
- this.setOnChating(true);
539
- this.setChatTimer({ countdown, countdownDesc });
540
- this.setSessionEnd(false);
541
- this.setClientParams(clientParams || JSON.parse(cParams || '{}'));
542
- this.getSessionHistoryList();
543
- this.setSessionType(sessionType);
544
- this.setFooterMessage('');
545
- } else {
546
- this.$message.warning(data.resultMsg);
547
- }
548
- })
549
- .finally(() => {
550
- this.setDisableOperate(false);
551
- });
552
- },
553
- getMsgValidateFn(id) {
554
- return () => id === this.clientId;
555
- },
556
- scrollToItem(sessionId) {
557
- if (!sessionId) return;
558
- this.$nextTick(() => {
559
- const target = this.$el.querySelector(`#item_id_${sessionId}`);
560
- if (!target) return;
561
- target.scrollIntoView(true);
562
- });
563
- },
564
- getSessionHistoryList() {
565
- if (this.assemblySetting?.type == 'staff') return;
566
- this.setSessionHistoryList([]);
567
- if (this.assemblySetting.recordScopeSetting === 'CURRENT') return;
568
- fetch
569
- .get('/chat/service/getPastSessionList', {
570
- params: { sessionId: this.sessionId }
571
- })
572
- .then(({ data }) => {
573
- if (data.result === 'SUCCESS') {
574
- let list = data.list.map(item => {
575
- if (item.fromId === this.serviceId) {
576
- item.onChating = true;
577
- }
578
- return item;
579
- });
580
- this.setSessionHistoryList(list);
581
- }
582
- });
583
- },
584
- /* 客服点击排队列表进入会话 */
585
- accessChat(item) {
586
- this.getQueueMsgList(item);
587
- },
588
- /* 排队消息 */
589
- getQueueMsgList(item) {
590
- let { bid: userId, userType, username, params: clientParams } = item;
591
- let params = {
592
- assemblyId: this.assemblyId,
593
- userId,
594
- userType,
595
- relateId: JSON.parse(clientParams || '{}').relateId
596
- };
597
- fetch.get('/chat/service/getQueueUser', { params }).then(({ data }) => {
598
- if (data.result === 'SUCCESS') {
599
- const obj = data.obj || {};
600
- this.currentTab === 'queue' && this.dispatchEvent('click_queueListUser', JSON.parse(JSON.stringify(obj.messages || [])));
601
- let messages = (obj.messages || []).map(item => {
602
- item.fromName = obj.name;
603
- item.content = JSON.parse(JSON.stringify(item));
604
- return item;
605
- });
606
- let robotMessages = this.handleRobotMessages(obj.robotMessages, obj.name);
607
- this.setScrollQueueId(obj.bid);
608
- this.setClientParams(JSON.parse(clientParams || '{}'));
609
- this.setClientId(username);
610
- this.setSessionId(null);
611
- this.setSessionHistoryList([]);
612
- this.clearMsgList([...robotMessages, ...messages]);
613
- this.setQueueItem(item);
614
- this.setChatTimer();
615
- this.$nextTick(() => {
616
- this.setScrollTo('bottom');
617
- });
618
- }
619
- });
620
- },
621
- handleRobotMessages(robotMessages, name) {
622
- if (!robotMessages || robotMessages.length === 0) return [];
623
- return robotMessages.map(item => {
624
- let content = item.content;
625
- if (item.content && vexutils.isJSON(item.content)) {
626
- content = JSON.parse(item.content);
627
- }
628
- item.content = content;
629
- item.fromName = name;
630
- return item;
631
- });
632
- },
633
- // queue: 排队列表, session: 会话列表, end: 已结束列表
634
- updateScrollList() {
635
- const v = this.listChangeItem;
636
- if (!v) return;
637
- // 存在队列id 更新排队列表
638
- if (v.queueId) {
639
- this.updateQueueList();
640
- } else if (v.sessionId) {
641
- // 存在会话id 更新排队列表
642
- this.updateSessionList();
643
- } else {
644
- this.updateEndList();
645
- }
646
- },
647
- /* 更新咨询结束列表 */
648
- updateEndList() {
649
- let { lastTime, lastContent, opt, sessionId, username, name } = this.listChangeItem;
650
- if (opt === 2) {
651
- this.scrollList.unshift({
652
- toId: username,
653
- lastTime,
654
- lastContent,
655
- toName: name,
656
- id: sessionId
657
- });
658
- }
659
- },
660
- /* 更新会话列表 */
661
- updateSessionList() {
662
- let { msgCount = undefined, lastContent, opt, from, to, sendTime, sessionId, lastTime, lastContentRecallFlag = undefined } = this.listChangeItem;
663
- lastContent = vexutils.isJSON(lastContent) ? JSON.parse(lastContent) : lastContent;
664
- // 0: 新增, 1: 更新, 2: 删除
665
- if (opt === 0) {
666
- this.scrollList.unshift(
667
- Object.assign(
668
- {},
669
- this.listChangeItem,
670
- {
671
- lastContent: JSON.stringify(lastContent)
672
- },
673
- { id: sessionId, lastTime: sendTime, fromId: from, toId: to }
674
- )
675
- );
676
- } else if (opt === 1) {
677
- let realIndex = this.scrollList.findIndex(item => item.id === sessionId);
678
- if (realIndex === -1) return;
679
- let res = {
680
- lastTime: sendTime || lastTime,
681
- sendTime,
682
- lastContentRecallFlag
683
- };
684
- if (lastContentRecallFlag != 1) {
685
- if (msgCount !== undefined) {
686
- res.msgCount = msgCount;
687
- }
688
- res.lastContent = JSON.stringify(lastContent);
689
- }
690
- let item = Object.assign({}, this.scrollList[realIndex], res);
691
- this.scrollList.splice(realIndex, 1, item);
692
- } else if (opt === 2) {
693
- let realIndex = this.scrollList.findIndex(item => item.id === sessionId);
694
- if (realIndex === -1) return;
695
- this.scrollList.splice(realIndex, 1);
696
- }
697
- },
698
- /* 更新排队列表 */
699
- updateQueueList() {
700
- let { sendTime, sendName, receiveName, opt, name, username, bid, msgCount, messages = [], createdTime, userType, classify, params, lastTime, lastContent } = this.listChangeItem;
701
- if (messages.length === 0) {
702
- messages = [{ createdTime }];
703
- }
704
- lastTime = lastTime || sendTime;
705
- lastContent = vexutils.isPlainObject(lastContent) ? JSON.stringify(lastContent) : lastContent;
706
- let current_item = {
707
- sendName,
708
- receiveName,
709
- msgCount,
710
- username,
711
- bid,
712
- name,
713
- messages,
714
- createdTime: new Date(createdTime).getTime(),
715
- userType,
716
- classify,
717
- params,
718
- lastTime: new Date(lastTime).getTime(),
719
- lastContent
720
- };
721
- // 0: 新增, 1: 更新, 2: 删除
722
- if (opt === 0) {
723
- this.scrollList.unshift(current_item);
724
- } else if (opt === 2) {
725
- let realIndex = this.scrollList.findIndex(item => item.username == username);
726
- this.scrollList.splice(realIndex, 1);
727
- } else if (opt === 1) {
728
- let realIndex = this.scrollList.findIndex(item => item.username == username);
729
- this.scrollList.splice(realIndex, 1, current_item);
730
- // 排队消息更新
731
- if (this.queueItem && username === this.queueItem.username) {
732
- this.clearMsgList([
733
- ...this.msgList,
734
- {
735
- fromName: name,
736
- content: Object.assign(JSON.parse(lastContent), { lastTime })
737
- }
738
- ]);
739
- this.appendList([
740
- {
741
- fromName: name,
742
- content: Object.assign(JSON.parse(lastContent), { lastTime })
743
- }
744
- ]);
745
- }
746
- }
747
- },
748
- getMappingHTML(value) {
749
- if (!vexutils.isObject(value)) return value;
750
- const { icon = '', desc, color } = value;
751
- let str = '';
752
- if (icon) {
753
- str += `<svg aria-hidden="true" style="font-size 20px;width: 1em;height: 1em;" class={svg-icon}><use xlinkhref={#icon-${icon}}></use></svg>`;
754
- }
755
- if (desc) {
756
- str += `<span style="color:#fff;padding:0 4px;${color ? 'background:' + color : ''}">${desc}</span>`;
757
- }
758
- return str;
759
- },
760
- // 获取聊天字段对应的值(部分字段需要格式化处理)
761
- getMsgFieldValue(key, item, isTip = false) {
762
- let val = item[key];
763
- switch (key) {
764
- case 'createdTime':
765
- case 'lastTime':
766
- val = this.formatDate(val || item.createdTime, isTip);
767
- break;
768
- case 'lastContent':
769
- val = this.formatBrief(item);
770
- break;
771
- }
772
- return val;
773
- },
774
- handleSelectItem() {
775
- let sessionId = this.defSessionId;
776
- if (!sessionId || this._selected) return;
777
- let matchItem = this.processedScrollList.find(item => item.id === sessionId);
778
- if (!matchItem) return;
779
- this._selected = 1;
780
- this.setClassify(matchItem.classify);
781
- this.handleClick(matchItem);
782
- this.$nextTick(() => {
783
- const target = this.$el.querySelector(`#item_id_${sessionId}`);
784
- if (!target) return;
785
- target.scrollIntoView(true);
786
- });
787
- },
788
- formatDate(date, showDetail) {
789
- let input;
790
- if (!isNaN(Number(date))) {
791
- input = moment(Number(date));
792
- } else {
793
- input = moment(new Date(date));
794
- }
795
- if (showDetail) {
796
- return input.format('YYYY年M月D日 HH:mm:ss');
797
- }
798
- // let input = moment(new Date(date));
799
- let now = moment();
800
- let today = moment(now.toArray().slice(0, 3));
801
- let yestoday = moment(today).subtract(1, 'days');
802
- let thisYear = moment(now.toArray().slice(0, 1));
803
- let inToday = today.isBefore(input);
804
- let inYestoday = input.isBetween(yestoday, today);
805
- let inThisYear = thisYear.isBefore(input);
806
- if (inToday) {
807
- return '今天' + input.format('HH:mm');
808
- } else if (inYestoday) {
809
- return '昨天' + input.format('HH:mm');
810
- } else if (inThisYear) {
811
- return input.format('M月D日');
812
- } else {
813
- return input.format('YYYY年M月D日');
814
- }
815
- // return vexutils.formatDate(date);
816
- }
817
- },
818
- directives: {
819
- infiniteScroll
820
- },
821
- filters: {
822
- formatName(item) {
823
- if (item.title) return item.title;
824
- // if (item.type == 2) {
825
- // return item.toName;
826
- // }
827
- let name = ''
828
- if (item.params) {
829
- name = JSON.parse(item.params || {})?.name || "";
830
- }
831
- return item.titleSetting || item.name || name;
832
- },
833
- formatTime(item) {
834
- return item.timeSetting || item.createdTime;
835
- },
836
- formatCount(item) {
837
- return item.msgCount || 0;
838
- }
839
- },
840
- watch: {
841
- /* 列表更新 */
842
- isScrollListChange: {
843
- handler(isScrollListChange) {
844
- if (isScrollListChange) {
845
- this.updateScrollList();
846
- this.setIsScrollListChange(false);
847
- this.setListChangeItem(null);
848
- // 分类
849
- if (this.assemblySetting.isListClassify !== 'Y') return;
850
- this.assemblySetting.listClassify.forEach(item => {
851
- let count = this.scrollList.filter(i => i.classify === item.classify).length;
852
- this.$set(item, 'count', count);
853
- });
854
- }
855
- }
856
- },
857
- dateParams() {
858
- if (this.enable) {
859
- if (this.currentTab === 'end') {
860
- this.pageNum = 1;
861
- this.getData(1);
862
- } else {
863
- this.getScrollList();
864
- }
865
- }
866
- },
867
- /* 组件更新 */
868
- currentTab: {
869
- immediate: true,
870
- handler(val) {
871
- if (this.enable) {
872
- this.pageNum = 1;
873
- if (val == 'end') return;
874
- this.getScrollList();
875
- }
876
- }
877
- },
878
- tabChange: {
879
- immediate: true,
880
- deep: true,
881
- handler(val) {
882
- if (!val || !Object.keys(val).length) return;
883
- if (this.currentTab != 'end') return;
884
- this.pageNum = 1;
885
- this.getData(1);
886
- }
887
- }
888
- },
889
- render(_h) {
890
- if (this.tableTheme) {
891
- return (
892
- <c-grid
893
- class="chat-scroll-session__table"
894
- resizable
895
- max-height="100%"
896
- auto-resize
897
- data={this.processedScrollList}
898
- columns={this.tableColumns}
899
- scroll-y={{ enabled: false }}
900
- scroll-x={{ enabled: false }}
901
- row-class-name={this.tableRowClass}
902
- on-cell-click={this.handleTableCellClick}
903
- on-scroll={this.handleTableScroll}
904
- ></c-grid>
905
- );
906
- }
907
- const { theme, currentTab, processedScrollList, handleInfiniteOnLoad, busy, infiniteMsgShow, foldTheme, classifyIcon } = this;
908
- const isEnd = currentTab === 'end';
909
- const isNoData = !processedScrollList?.length;
910
- const filters = this.$options.filters;
911
- const directives = [
912
- {
913
- name: 'infiniteScroll',
914
- value: handleInfiniteOnLoad
915
- }
916
- ];
917
- const _this = this
918
- // 默认不显示在线状态,只有南通瑞慈显示
919
- function getAvatar(item) {
920
- return <Avatar className="avatar" src={item.portrait} name={item.name || item.toName || item.title || item.titleSetting} len={2} status={item.onlineStatus} isShowStatus={_this.currentTab === 'session' && _this.sdkInfo?.vendor == 3} />;
921
- }
922
- function getContent(item, filters, fold, classifyIcon) {
923
- const { formatName, formatCount } = filters;
924
- const name = formatName(item);
925
- const sendName = item.sendName;
926
- const receiveName = item.receiveName;
927
- const msgCount = item.msgCount;
928
- const statusSetting = item.statusSetting;
929
- return (
930
- <div class={{ 'chat-scroll-session__item': true, fold: fold }}>
931
- <div class="chat-scroll-session__name-time">
932
- <div class="chat-scroll-session__name-zhuanjie">
933
- <a-tooltip placement="topLeft">
934
- <template slot="title">{name}</template>
935
- <span class="chat-scroll-session__name">{name}</span>
936
- </a-tooltip>
937
- {fold && classifyIcon ? <svg-icon icon-class={classifyIcon} style="margin-left:4px"></svg-icon> : null}
938
- {sendName ? (
939
- <a-tooltip placement="topLeft">
940
- <template slot="title">{sendName + '转接给了你'}</template>
941
- <span class="chat-scroll-session__zhuanjie">
942
- <svg-icon icon-class="liaotian-zhuanchu" style="fontSize: 16px"></svg-icon>
943
- {sendName}
944
- </span>
945
- </a-tooltip>
946
- ) : null}
947
- {receiveName ? (
948
- <a-tooltip placement="topLeft">
949
- <template slot="title">{'你转接给了' + receiveName}</template>
950
- <span class="chat-scroll-session__zhuanchu">
951
- <svg-icon icon-class="liaotian-zhuanru" style="fontSize: 16px"></svg-icon>
952
- {receiveName}
953
- </span>
954
- </a-tooltip>
955
- ) : null}
956
- </div>
957
- <a-tooltip placement="topRight" title={item.timeSettingTip}>
958
- <span class="chat-scroll-session__time">{item.timeSetting}</span>
959
- </a-tooltip>
960
- </div>
961
- <div class="chat-scroll-session__remark">{item.remarkSetting}</div>
962
- <div class="chat-scroll-session__brief-count">
963
- <div class="chat-scroll-session__brief" domPropsInnerHTML={item.contentSetting}></div>
964
- {msgCount ? <span class="chat-scroll-session__count">{msgCount > 99 ? <a-tooltip title={msgCount}>99+</a-tooltip> : formatCount(item)}</span> : null}
965
- {statusSetting ? <span class="chat-scroll-session__level" domPropsInnerHTML={statusSetting}></span> : null}
966
- </div>
967
- </div>
968
- );
969
- }
970
-
971
- return (
972
- <div class={[theme, 'chat-scroll-container']}>
973
- <ul class="chat-scroll-session__list">
974
- {processedScrollList.map((item, index) => {
975
- const msgCount = item.msgCount;
976
- return (
977
- <li class={{ 'scroll-item': true, active: this.isActive(item) }} key={item.id || item.bid || index} onClick={() => this.handleClick(item)} id={'item_id_' + item.id}>
978
- {foldTheme
979
- ? [
980
- <a-popover overlayClassName="chat-list-popover--fold" placement="right" destroyTooltipOnHide={true}>
981
- <template slot="content">{getContent(item, filters, foldTheme, classifyIcon)}</template>
982
- {getAvatar(item)}
983
- </a-popover>,
984
- msgCount ? <div class="chat-scroll-session__num">{msgCount > 99 ? '99+' : msgCount}</div> : null
985
- ]
986
- : [getAvatar(item), getContent(item, filters, foldTheme, classifyIcon)]}
987
- </li>
988
- );
989
- })}
990
- </ul>
991
-
992
- {isEnd ? (
993
- <div {...{ directives }} infinite-scroll-immediate-check="immediate" infinite-scroll-disabled={busy} infinite-scroll-distance={10}>
994
- <div class="infinite-wrap" style={infiniteMsgShow ? '' : 'display:none'}>
995
- <a-spin size="small" />
996
- {foldTheme ? '' : '加载中'}
997
- </div>
998
- </div>
999
- ) : null}
1000
-
1001
- {isNoData && ((isEnd && !infiniteMsgShow) || !isEnd) ? (
1002
- <div class={[theme, 'no-data']}>
1003
- <img src={require('../img/no-data2.png')} />
1004
- <span>{this.i18nText('1.1.6.11')}</span>
1005
- </div>
1006
- ) : null}
1007
- </div>
1008
- );
1009
- }
1010
- };
1011
- </script>
1012
-
1013
- <style lang="less">
1014
- .no-data {
1015
- flex: 1;
1016
- display: flex;
1017
- flex-direction: column;
1018
- justify-content: center;
1019
- align-items: center;
1020
- & > img {
1021
- width: 160px;
1022
- }
1023
- &.fold > img {
1024
- width: 80%;
1025
- }
1026
- span {
1027
- display: inline-block;
1028
- font-size: 14px;
1029
- }
1030
- &.fold span {
1031
- font-size: 12px;
1032
- }
1033
- }
1034
- .chat-scroll-container {
1035
- height: 100%;
1036
- overflow-y: auto;
1037
- &::-webkit-scrollbar {
1038
- width: 5px;
1039
- }
1040
- .infinite-wrap {
1041
- padding: 16px;
1042
- text-align: center;
1043
- font-size: 14px;
1044
- color: #000000;
1045
- line-height: 20px;
1046
- .ant-spin {
1047
- margin-right: 8px;
1048
- }
1049
- }
1050
- }
1051
- .chat-scroll-session__list {
1052
- margin-bottom: -1px;
1053
- overflow: hidden;
1054
- .scroll-item {
1055
- position: relative;
1056
- display: flex;
1057
- align-items: center;
1058
- height: 82px;
1059
- padding: 15px 8px;
1060
- background: #fff;
1061
- border-bottom: 1px solid #d5d5d5;
1062
- &:hover {
1063
- background-color: #f4f4f4;
1064
- }
1065
- &.active {
1066
- background: #ebebeb;
1067
- .chat-scroll-session__name-time .chat-scroll-session__time {
1068
- color: #666;
1069
- }
1070
- }
1071
- .avatar {
1072
- margin-right: 20px;
1073
- }
1074
- }
1075
- }
1076
-
1077
- .chat-scroll-container.fold .chat-scroll-session__list {
1078
- .scroll-item {
1079
- border-bottom: 0;
1080
- justify-content: center;
1081
- background-color: transparent;
1082
- padding: 8px;
1083
- height: auto;
1084
- }
1085
- .avatar {
1086
- margin-right: 0;
1087
- }
1088
- }
1089
- .chat-list-popover--fold {
1090
- .ant-popover-content {
1091
- max-width: 300px;
1092
- }
1093
- .ant-popover-arrow {
1094
- display: none;
1095
- }
1096
- }
1097
-
1098
- .chat-scroll-session__item {
1099
- flex: 1;
1100
- width: 0;
1101
- &.fold {
1102
- width: 192px;
1103
- .chat-scroll-session__time {
1104
- font-size: 12px;
1105
- }
1106
- }
1107
- }
1108
- .chat-scroll-session__name-time {
1109
- display: flex;
1110
- justify-content: space-between;
1111
- align-items: center;
1112
- margin-bottom: 4px;
1113
- .chat-scroll-session__name {
1114
- cursor: pointer;
1115
- font-size: 16px;
1116
- color: #212121;
1117
- height: 26px;
1118
- font-weight: 600;
1119
- line-height: 26px;
1120
- flex: 1;
1121
- text-align: left;
1122
- white-space: nowrap;
1123
- text-overflow: ellipsis;
1124
- overflow: hidden;
1125
- word-break: break-all;
1126
- text-align: left;
1127
- }
1128
- .chat-scroll-session__time {
1129
- padding-left: 4px;
1130
- cursor: pointer;
1131
- color: #b3b3b3;
1132
- text-align: right;
1133
- white-space: nowrap;
1134
- text-overflow: ellipsis;
1135
- overflow: hidden;
1136
- word-break: break-all;
1137
- }
1138
- .chat-scroll-session__name-zhuanjie {
1139
- display: flex;
1140
- justify-content: flex-start;
1141
- align-items: center;
1142
- max-width: 65%;
1143
- }
1144
- .chat-scroll-session__zhuanchu,
1145
- .chat-scroll-session__zhuanjie {
1146
- line-height: 16px;
1147
- height: 18px;
1148
- display: flex;
1149
- align-items: center;
1150
- margin-left: 8px;
1151
- border: 1px solid #37d39f;
1152
- color: #37d39f;
1153
- border-radius: 2px;
1154
- font-size: 12px;
1155
- padding: 0 4px 0 2px;
1156
- border-radius: 2px;
1157
- }
1158
- .chat-scroll-session__zhuanchu {
1159
- color: #2d7aff;
1160
- border: 1px solid #2d7aff;
1161
- }
1162
- }
1163
- .chat-scroll-session__remark {
1164
- width: 100%;
1165
- text-overflow: ellipsis;
1166
- overflow: hidden;
1167
- white-space: nowrap;
1168
- }
1169
- .chat-scroll-session__brief-count {
1170
- display: flex;
1171
- justify-content: space-between;
1172
- align-items: center;
1173
- overflow: hidden;
1174
- height: 20px;
1175
- .chat-scroll-session__brief {
1176
- flex: 1;
1177
- width: 0;
1178
- height: 20px;
1179
- font-size: 14px;
1180
- color: rgba(33, 33, 33, 0.6);
1181
- line-height: 20px;
1182
- text-align: left;
1183
- white-space: nowrap;
1184
- text-overflow: ellipsis;
1185
- overflow: hidden;
1186
- word-break: break-all;
1187
- padding-right: 8px;
1188
- > div {
1189
- white-space: nowrap;
1190
- text-overflow: ellipsis;
1191
- overflow: hidden;
1192
- word-break: break-all;
1193
- }
1194
- }
1195
- .chat-scroll-session__level {
1196
- flex: 0 0 60px;
1197
- display: flex;
1198
- white-space: nowrap;
1199
- overflow: hidden;
1200
- }
1201
- }
1202
- .chat-scroll-session__num,
1203
- .chat-scroll-session__count {
1204
- display: block;
1205
- min-width: 28px;
1206
- height: 28px;
1207
- line-height: 28px;
1208
- text-align: center;
1209
- border-radius: 14px;
1210
- background: #e54949;
1211
- padding: 0 2px;
1212
- color: #fff;
1213
- font-size: 20px;
1214
- transform: scale(0.5);
1215
- }
1216
- .chat-scroll-session__num {
1217
- position: absolute;
1218
- right: 0;
1219
- top: 8px;
1220
- margin-right: 12px;
1221
- }
1222
- .chat-scroll-session__table {
1223
- .vxe-table--render-default .vxe-body--column.col--ellipsis,
1224
- .vxe-table--render-default.vxe-editable .vxe-body--column,
1225
- .vxe-table--render-default .vxe-footer--column.col--ellipsis,
1226
- .vxe-table--render-default .vxe-header--column.col--ellipsis {
1227
- height: 40px;
1228
- }
1229
- .vxe-table--render-default.border--default .vxe-table--header-wrapper,
1230
- .vxe-table--render-default.border--full .vxe-table--header-wrapper,
1231
- .vxe-table--render-default.border--outer .vxe-table--header-wrapper {
1232
- background-color: #fff;
1233
- }
1234
- .vxe-body--row.active {
1235
- background-color: #f2f2f2;
1236
- }
1237
- }
1238
- </style>
1
+ <script>
2
+ import Grid from '~/grid';
3
+ import infiniteScroll from 'vue-infinite-scroll';
4
+ import { mapGetters, mapMutations, mapActions } from '../store/helper';
5
+ import { getRecallText } from '../utils';
6
+ import Avatar from '../components/avatar';
7
+ import vexutils, { moment } from '@/utils/vexutils';
8
+ import fetch, { qs } from '@/utils/chatFetch';
9
+ import { Popover, Spin, Tooltip } from 'ant-design-vue';
10
+ import SvgIcon from '@/component/svg/index.vue';
11
+
12
+ export default {
13
+ inject: ['store', 'i18nText', 'dispatchEvent'],
14
+ components: {
15
+ [Tooltip.name]: Tooltip,
16
+ [Spin.name]: Spin,
17
+ [Popover.name]: Popover,
18
+ [Grid.name]: Grid,
19
+ SvgIcon,
20
+ Avatar
21
+ },
22
+ data() {
23
+ return {
24
+ scrollList: [],
25
+ defaultAvatar: require('../img/default.png'),
26
+ busy: false,
27
+ pageSize: 20,
28
+ pageNum: 1,
29
+ infiniteMsgShow: true
30
+ };
31
+ },
32
+ computed: {
33
+ ...mapGetters(['userInfo']),
34
+ ...mapGetters([
35
+ 'assemblyId',
36
+ 'classify',
37
+ 'isScrollListChange',
38
+ 'listChangeItem',
39
+ 'currentTab',
40
+ 'sessionId',
41
+ 'keywords',
42
+ 'searchKeywords',
43
+ 'enable',
44
+ 'panelParams',
45
+ 'assemblySetting',
46
+ 'clientId',
47
+ 'clientParams',
48
+ 'serviceId',
49
+ 'msgList',
50
+ 'queueItem',
51
+ 'sdkInfo'
52
+ ]),
53
+ foldTheme() {
54
+ return this.theme === 'fold';
55
+ },
56
+ tableTheme() {
57
+ return this.theme === 'table';
58
+ },
59
+ classifyIcon() {
60
+ const { classify, assemblySetting } = this;
61
+ if (!classify) return '';
62
+ const isListClassify = assemblySetting?.isListClassify === 'Y';
63
+ const target = isListClassify ? assemblySetting?.listClassify?.find(item => item.classify === classify) : null;
64
+ return target?.icon;
65
+ },
66
+ isListClassify() {
67
+ return this.assemblySetting.isListClassify === 'Y';
68
+ },
69
+ tabChange() {
70
+ let { searchKeywords, classify } = this;
71
+ return {
72
+ searchKeywords,
73
+ classify
74
+ };
75
+ },
76
+ tableColumns() {
77
+ const tableLayout = this.assemblySetting?.listLayoutSetting?.tableLayout;
78
+ if (tableLayout && tableLayout.length) {
79
+ const htmlField = ['${lastContent}'];
80
+ return tableLayout.map((item, i) => {
81
+ let { title = '', name = '' } = item;
82
+ title = title || name;
83
+ const w = Math.max((title?.length || 1) * 14 + 22, 60);
84
+ const key = name || i;
85
+ const data = {
86
+ ...item,
87
+ title,
88
+ // width: w,
89
+ field: `_${key}_`,
90
+ showHeaderOverflow: true,
91
+ showOverflow: true
92
+ };
93
+ if (htmlField.includes(item.value) || item.mapping?.length > 0) {
94
+ data.type = 'html';
95
+ }
96
+ return data;
97
+ });
98
+ }
99
+ return [];
100
+ },
101
+ // 根据后台配置信息进行排序
102
+ processedScrollList() {
103
+ let processedScrollList = [];
104
+ let settingList = [];
105
+ if (this.tableTheme) {
106
+ settingList = this.tableColumns.map(item => [item.field, item]);
107
+ } else {
108
+ let setting = this.assemblySetting.listLayoutSetting || {};
109
+ if (setting.timeSetting) {
110
+ setting = Object.assign({}, setting, {
111
+ timeSettingTip: setting.timeSetting // 时间类型 tooltip 展示的值和原值不同 额外处理
112
+ });
113
+ }
114
+ settingList = Object.entries(setting);
115
+ }
116
+ let reg = /\$\{(.+)\}/;
117
+ const { currentTab, keywords, classify, isListClassify } = this;
118
+ processedScrollList = this.scrollList.reduce((list, item) => {
119
+ if (item.kind == 2 || !this.showScrollItem(item, currentTab, keywords, classify, isListClassify)) return list; // <- 通话记录跳过
120
+ const layoutData = {};
121
+ for (let [key, value] of settingList) {
122
+ const isTip = /.+Tip$/.test(key);
123
+ let parseValue = (value.value || '').replace(/\$\{([^}]+)\}/g, (_v, $1) => {
124
+ let key = $1;
125
+ let param;
126
+ if (key.startsWith('form.')) {
127
+ key = key.split('.')[1];
128
+ let params = JSON.parse(item.params || '{}');
129
+ param = params[key] || this.getMsgFieldValue(key, item, isTip);
130
+ } else {
131
+ param = this.getMsgFieldValue(key, item, isTip);
132
+ }
133
+ if (value.mapping) {
134
+ // param = this.getMappingHTML(value.mapping[param]);
135
+ param = this.getMappingHTML(value.mapping.find( v => v.value == param) || {});
136
+ }
137
+ return param || '';
138
+ });
139
+ layoutData[key] = parseValue;
140
+ }
141
+ list.push({ ...item, ...layoutData });
142
+ return list;
143
+ }, []);
144
+
145
+ // 排队列表排序(1.等级2.创建时间)
146
+ const sortTabs = ['queue', 'session'];
147
+ const sortKeys = ['queueSortSetting', 'sessionSortSetting'];
148
+ const sortIndex = sortTabs.indexOf(currentTab);
149
+ if (sortIndex >= 0) {
150
+ // 获取对应sortsetting, listSortSetting兼容旧数据
151
+ const sortSetting = this.assemblySetting[sortKeys[sortIndex]] || this.assemblySetting.listSortSetting;
152
+ if (sortSetting) {
153
+ let { isParams, descOrAsc, orderBy } = sortSetting;
154
+ orderBy = orderBy ? orderBy.replace(reg, '$1') : orderBy; // 去除 ${}
155
+ let hasLevel = [],
156
+ noLevel = [];
157
+ processedScrollList.forEach(item => {
158
+ let value;
159
+ if (isParams) {
160
+ value = JSON.parse(item.params || '{}')[orderBy];
161
+ } else {
162
+ value = item[orderBy];
163
+ }
164
+ vexutils.isUndefined(value) ? noLevel.push(item) : hasLevel.push(item);
165
+ });
166
+ hasLevel.sort((a, b) => {
167
+ let aLevel = JSON.parse(a.params || '{}')[orderBy] || a[orderBy];
168
+ let bLevel = JSON.parse(b.params || '{}')[orderBy] || b[orderBy];
169
+ if (aLevel === bLevel) {
170
+ return Number(a.createdTime) - Number(b.createdTime);
171
+ }
172
+ // return descOrAsc === 'desc' ? aLevel - bLevel : bLevel - aLevel;
173
+ return descOrAsc === 'desc' ? bLevel - aLevel : aLevel - bLevel;
174
+ });
175
+ noLevel.sort((a, b) => Number(a.createdTime) - Number(b.createdTime));
176
+ processedScrollList = [...hasLevel, ...noLevel];
177
+ } else {
178
+ processedScrollList.sort((a, b) => Number(a.createdTime) - Number(b.createdTime));
179
+ }
180
+ }
181
+ return processedScrollList;
182
+ }
183
+ },
184
+ props: {
185
+ // 日期过滤条件
186
+ dateParams: {
187
+ type: Array,
188
+ default: () => []
189
+ },
190
+ theme: {
191
+ type: String,
192
+ default: ''
193
+ },
194
+ // 默认会话id
195
+ defSessionId: {
196
+ type: [String, Number]
197
+ },
198
+ type: {
199
+ type: String
200
+ }
201
+ },
202
+ methods: {
203
+ ...mapMutations([
204
+ 'setSessionId',
205
+ 'setIsScrollListChange',
206
+ 'setListChangeItem',
207
+ 'setCurrentTab',
208
+ 'setClientId',
209
+ 'setOnChating',
210
+ 'setClientParams',
211
+ 'setQueueItem',
212
+ 'setScrollTo',
213
+ 'setSessionHistoryList',
214
+ 'setSessionEnd',
215
+ 'setQueueStatistic',
216
+ 'setSessionStatistic',
217
+ 'offlineSessionStatistic',
218
+ 'appendList',
219
+ 'setSessionType',
220
+ 'setOfflineClassifyCount',
221
+ 'setScrollQueueId',
222
+ 'setLastClassify',
223
+ 'setLastCurrentTab',
224
+ 'setFooterMessage',
225
+ 'setCurScrollItem',
226
+ 'setDisableOperate',
227
+ 'setClassify',
228
+ 'setOfflineSessionStatistic',
229
+ 'setClosedSession'
230
+ ]),
231
+ ...mapMutations({
232
+ clearMsgList: 'setMsgList'
233
+ }),
234
+ ...mapActions(['setMsgList', 'setChatTimer']),
235
+ isActive(item) {
236
+ let res = this.sessionId === item.id || (item.username && item.username === this.clientId);
237
+ return res;
238
+ },
239
+ formatBrief(item) {
240
+ let { lastContentRecallFlag } = item;
241
+ if (lastContentRecallFlag == 1) {
242
+ const content = JSON.parse(item.lastContent);
243
+ const flag = this.serviceId == item.fromId;
244
+ return getRecallText(this, { content }, flag);
245
+ }
246
+ let lastItem;
247
+ try {
248
+ lastItem = JSON.parse(item.lastContent || '{}');
249
+ } catch {
250
+ console.log(item.lastContent.value);
251
+ }
252
+ if (!lastItem) return '';
253
+ let { type, content } = lastItem;
254
+ if (type === 1) {
255
+ return `[${this.i18nText('1.9.181')}]`;
256
+ } else if (type === 0) {
257
+ return content;
258
+ } else if (type === 2) {
259
+ // return `[${this.i18nText("1.9.388")}]`;
260
+ return '[视频通话]';
261
+ } else if (type === 5) {
262
+ return '[语音通话]';
263
+ } else if (type === 6) {
264
+ return '[语音消息]';
265
+ } else if (type === 3) {
266
+ return JSON.parse(content)?.type == 2 ? `[${this.i18nText('1.9.389')}]` : `[${this.i18nText('1.9.390')}]`;
267
+ } else if (type === 4) {
268
+ let title = content.title ? content.title : JSON.parse(content).title;
269
+ return `[${title}]`;
270
+ } else {
271
+ return '';
272
+ }
273
+ },
274
+ showScrollItem(item, currentTab, keywords, classify, isListClassify) {
275
+ if (currentTab == 'end') return true;
276
+ return (!keywords || (item.name || item.toName || item.title).includes(keywords)) && (item.classify === classify || !isListClassify);
277
+ },
278
+ handleInfiniteOnLoad() {
279
+ if (this.busy) return;
280
+ if (this.currentTab !== 'end') {
281
+ this.busy = true;
282
+ this.infiniteMsgShow = false;
283
+ return;
284
+ }
285
+ this.busy = true;
286
+ this.infiniteMsgShow = true;
287
+ // 发送请求有时间间隔第一个滚动时间结束后才发送第二个请求
288
+ this.pageNum++; // 滚动之后加载第二页
289
+ this.getScrollList(true);
290
+ },
291
+ async getScrollList(flag) {
292
+ switch (this.currentTab) {
293
+ case 'queue':
294
+ this.getQueueUsers();
295
+ break;
296
+ case 'session':
297
+ await this.getSessionList();
298
+ this.handleSelectItem();
299
+ break;
300
+ case 'end':
301
+ // this.getSessionList(flag);
302
+ this.getData(1, flag);
303
+ }
304
+ },
305
+ /* 获取会话列表 */
306
+ getSessionList() {
307
+ let params = {
308
+ ...this.getDateParams(),
309
+ assemblyId: this.assemblyId,
310
+ onlineType: this.currentTab === 'session' ? 1 : 0
311
+ };
312
+ if (this.isListClassify) {
313
+ this.assemblySetting.listClassify.forEach(item => {
314
+ this.$set(item, 'count', '');
315
+ });
316
+ }
317
+ return fetch
318
+ .get('/chat/service/getMySessionList', {
319
+ params
320
+ })
321
+ .then(({ data }) => {
322
+ if (data.result === 'SUCCESS') {
323
+ this.scrollList = data.map.list;
324
+ if (this.isListClassify) {
325
+ this.assemblySetting.listClassify.forEach(item => {
326
+ let count = data.map.list.filter(i => i.classify === item.classify).length;
327
+ this.$set(item, 'count', count);
328
+ });
329
+ }
330
+ if (data.map.listStatistic) {
331
+ if (this.currentTab === 'end') {
332
+ this.setOfflineSessionStatistic(data.map.listStatistic);
333
+ } else {
334
+ this.setSessionStatistic(data.map.listStatistic);
335
+ }
336
+ }
337
+ } else {
338
+ this.$message.warning(data.resultMsg);
339
+ }
340
+ });
341
+ },
342
+ async getData(type, flag) {
343
+ try {
344
+ let res = await this.handleDataRequest(type);
345
+ let { data = {} } = res;
346
+ if (data.result === 'SUCCESS') {
347
+ let { list = [] } = data.map;
348
+ if (flag) {
349
+ if (!list || !list.length) {
350
+ this.busy = true;
351
+ this.infiniteMsgShow = false;
352
+ } else {
353
+ this.busy = false;
354
+ this.scrollList = this.scrollList.concat(list);
355
+ }
356
+ return;
357
+ } else {
358
+ this.infiniteMsgShow = false;
359
+ this.busy = false;
360
+ this.scrollList = list;
361
+ }
362
+ if (this.isListClassify) {
363
+ this.assemblySetting.listClassify.forEach(item => {
364
+ let count = list.filter(i => i.classify === item.classify).length;
365
+ this.$set(item, 'count', count);
366
+ });
367
+ }
368
+ let { classifyStatistic = {} } = data.map || {};
369
+ if (Object.keys(classifyStatistic).length) {
370
+ this.setOfflineClassifyCount(classifyStatistic);
371
+ }
372
+ } else {
373
+ this.infiniteMsgShow = false;
374
+ this.$message.warning(data.resultMsg);
375
+ }
376
+ this.handleSelectItem();
377
+ } catch (err) {
378
+ this.infiniteMsgShow = false;
379
+ console.log(err);
380
+ }
381
+ },
382
+ getDateParams() {
383
+ let params = {};
384
+ const dateParams = this.dateParams;
385
+ if (dateParams?.length) {
386
+ const fmt = 'YYYY-MM-DD';
387
+ params.startDate = dateParams[0].format(fmt) + ' 00:00:00';
388
+ params.endDate = dateParams[1].format(fmt) + ' 23:59:59';
389
+ }
390
+ return params;
391
+ },
392
+ handleDataRequest(type) {
393
+ let url = type == 1 ? '/chat/service/getMySessionList' : '/chat/service/getQueueUsers';
394
+ let params = {
395
+ ...this.getDateParams(),
396
+ assemblyId: this.assemblyId,
397
+ pageSize: this.pageSize,
398
+ pageNum: this.pageNum
399
+ };
400
+ if (type == 1) {
401
+ params.onlineType = this.currentTab === 'session' ? 1 : 0;
402
+ }
403
+ if (this.currentTab == 'end') {
404
+ params.keyword = this.searchKeywords;
405
+ params.classify = this.classify;
406
+ }
407
+ if (this.isListClassify) {
408
+ this.assemblySetting.listClassify.forEach(item => {
409
+ this.$set(item, 'count', '');
410
+ });
411
+ }
412
+ return fetch.get(url, {
413
+ params
414
+ });
415
+ },
416
+ /* 获取排队列表 */
417
+ getQueueUsers() {
418
+ if (this.isListClassify) {
419
+ this.assemblySetting.listClassify.forEach(item => {
420
+ this.$set(item, 'count', '');
421
+ });
422
+ }
423
+ // let params = { assemblyId: this.assemblyId };
424
+ let params = {
425
+ ...this.getDateParams(),
426
+ assemblyId: this.assemblyId,
427
+ };
428
+ fetch
429
+ .get('/chat/service/getQueueUsers', {
430
+ params
431
+ })
432
+ .then(({ data }) => {
433
+ if (data.result === 'SUCCESS') {
434
+ this.scrollList = data.map.list;
435
+ if (this.isListClassify) {
436
+ this.assemblySetting.listClassify.forEach(item => {
437
+ let count = data.map.list.filter(i => i.classify === item.classify).length;
438
+ this.$set(item, 'count', count);
439
+ });
440
+ }
441
+ if (data.map.listStatistic) {
442
+ this.setQueueStatistic(data.map.listStatistic);
443
+ }
444
+ } else {
445
+ this.$message.warning(data.resultMsg);
446
+ }
447
+ });
448
+ },
449
+ /* 点击列表项 */
450
+ handleClick(item) {
451
+ this.setLastClassify(this.classify);
452
+ this.setLastCurrentTab(this.currentTab);
453
+ this.setCurScrollItem(item);
454
+ this.setClosedSession(this.type === 'end');
455
+ switch (this.type) {
456
+ case 'queue':
457
+ this.accessChat(item);
458
+ break;
459
+ case 'session':
460
+ this.getMsgList(item);
461
+ break;
462
+ case 'end':
463
+ if (item.msgCount > 0) {
464
+ this.cleanSessionCount(item);
465
+ }
466
+ this.getEndMsgList(item);
467
+ }
468
+ this.dispatchEvent('click_sessionListUser', JSON.parse(JSON.stringify(item)));
469
+ },
470
+ handleTableCellClick({ row }) {
471
+ this.handleClick(row);
472
+ },
473
+ tableRowClass({ row }) {
474
+ return this.isActive(row) ? 'active' : '';
475
+ },
476
+ handleTableScroll(args) {
477
+ let target;
478
+ if (this.currentTab == 'end' && !this.busy && (target = args.$event.target) && target.scrollHeight - target.clientHeight - args.scrollTop <= 10) {
479
+ this.handleInfiniteOnLoad();
480
+ }
481
+ },
482
+ cleanSessionCount(item) {
483
+ let params = {
484
+ sessionId: item.id,
485
+ orgId: this.userInfo?.sysParams?.orgId,
486
+ assemblyId: this.assemblyId
487
+ };
488
+ fetch.post('/chat/service/cleanSessionCount', qs.stringify(params)).then(({ data }) => {
489
+ if (data.result === 'SUCCESS') {
490
+ item.msgCount = 0;
491
+ }
492
+ });
493
+ },
494
+ /* 查看结束历史消息 */
495
+ getEndMsgList(item) {
496
+ let { id, toId } = item;
497
+ this.setClientId(toId);
498
+ this.setSessionId(id);
499
+ this.clearMsgList();
500
+ this.setMsgList({ validate: this.getMsgValidateFn(toId) });
501
+ this.setOnChating(false);
502
+ this.setChatTimer();
503
+ let clientParams = JSON.parse(item.params || '{}');
504
+ this.setClientParams(clientParams);
505
+ // this.getSessionHistoryList();
506
+ this.setQueueItem(null);
507
+ },
508
+ /* 客服点击会话列表进入会话, id:会话id, toId:客户id */
509
+ getMsgList(item) {
510
+ let { id, toId, params: cParams } = item;
511
+ let lastSessionId = this.sessionId;
512
+ this.setQueueItem(null);
513
+ item.msgCount = 0;
514
+ let params = {
515
+ sessionId: id,
516
+ lastSessionId,
517
+ assemblyId: this.assemblyId
518
+ };
519
+ // 心跳
520
+ fetch.post(
521
+ '/chat/service/sessionHeart',
522
+ qs.stringify({
523
+ assemblyId: this.assemblyId,
524
+ sessionId: id
525
+ })
526
+ );
527
+ this.setDisableOperate(true);
528
+ fetch
529
+ .post('/chat/service/accessSession', qs.stringify(params))
530
+ .then(({ data }) => {
531
+ this.setScrollQueueId('');
532
+ this.setSessionId(id);
533
+ if (data.result === 'SUCCESS') {
534
+ let { countdown, clientParams, sessionType, countdownDesc } = data.map;
535
+ this.setClientId(toId);
536
+ this.clearMsgList();
537
+ this.setMsgList({ validate: this.getMsgValidateFn(toId) });
538
+ this.setOnChating(true);
539
+ this.setChatTimer({ countdown, countdownDesc });
540
+ this.setSessionEnd(false);
541
+ this.setClientParams(clientParams || JSON.parse(cParams || '{}'));
542
+ this.getSessionHistoryList();
543
+ this.setSessionType(sessionType);
544
+ this.setFooterMessage('');
545
+ } else {
546
+ this.$message.warning(data.resultMsg);
547
+ }
548
+ })
549
+ .finally(() => {
550
+ this.setDisableOperate(false);
551
+ });
552
+ },
553
+ getMsgValidateFn(id) {
554
+ return () => id === this.clientId;
555
+ },
556
+ scrollToItem(sessionId) {
557
+ if (!sessionId) return;
558
+ this.$nextTick(() => {
559
+ const target = this.$el.querySelector(`#item_id_${sessionId}`);
560
+ if (!target) return;
561
+ target.scrollIntoView(true);
562
+ });
563
+ },
564
+ getSessionHistoryList() {
565
+ if (this.assemblySetting?.type == 'staff') return;
566
+ this.setSessionHistoryList([]);
567
+ if (this.assemblySetting.recordScopeSetting === 'CURRENT') return;
568
+ fetch
569
+ .get('/chat/service/getPastSessionList', {
570
+ params: { sessionId: this.sessionId }
571
+ })
572
+ .then(({ data }) => {
573
+ if (data.result === 'SUCCESS') {
574
+ let list = data.list.map(item => {
575
+ if (item.fromId === this.serviceId) {
576
+ item.onChating = true;
577
+ }
578
+ return item;
579
+ });
580
+ this.setSessionHistoryList(list);
581
+ }
582
+ });
583
+ },
584
+ /* 客服点击排队列表进入会话 */
585
+ accessChat(item) {
586
+ this.getQueueMsgList(item);
587
+ },
588
+ /* 排队消息 */
589
+ getQueueMsgList(item) {
590
+ let { bid: userId, userType, username, params: clientParams } = item;
591
+ let params = {
592
+ assemblyId: this.assemblyId,
593
+ userId,
594
+ userType,
595
+ relateId: JSON.parse(clientParams || '{}').relateId
596
+ };
597
+ fetch.get('/chat/service/getQueueUser', { params }).then(({ data }) => {
598
+ if (data.result === 'SUCCESS') {
599
+ const obj = data.obj || {};
600
+ this.currentTab === 'queue' && this.dispatchEvent('click_queueListUser', JSON.parse(JSON.stringify(obj.messages || [])));
601
+ let messages = (obj.messages || []).map(item => {
602
+ item.fromName = obj.name;
603
+ item.content = JSON.parse(JSON.stringify(item));
604
+ return item;
605
+ });
606
+ let robotMessages = this.handleRobotMessages(obj.robotMessages, obj.name);
607
+ this.setScrollQueueId(obj.bid);
608
+ this.setClientParams(JSON.parse(clientParams || '{}'));
609
+ this.setClientId(username);
610
+ this.setSessionId(null);
611
+ this.setSessionHistoryList([]);
612
+ this.clearMsgList([...robotMessages, ...messages]);
613
+ this.setQueueItem(item);
614
+ this.setChatTimer();
615
+ this.$nextTick(() => {
616
+ this.setScrollTo('bottom');
617
+ });
618
+ }
619
+ });
620
+ },
621
+ handleRobotMessages(robotMessages, name) {
622
+ if (!robotMessages || robotMessages.length === 0) return [];
623
+ return robotMessages.map(item => {
624
+ let content = item.content;
625
+ if (item.content && vexutils.isJSON(item.content)) {
626
+ content = JSON.parse(item.content);
627
+ }
628
+ item.content = content;
629
+ item.fromName = name;
630
+ return item;
631
+ });
632
+ },
633
+ // queue: 排队列表, session: 会话列表, end: 已结束列表
634
+ updateScrollList() {
635
+ const v = this.listChangeItem;
636
+ if (!v) return;
637
+ // 存在队列id 更新排队列表
638
+ if (v.queueId) {
639
+ this.updateQueueList();
640
+ } else if (v.sessionId) {
641
+ // 存在会话id 更新排队列表
642
+ this.updateSessionList();
643
+ } else {
644
+ this.updateEndList();
645
+ }
646
+ },
647
+ /* 更新咨询结束列表 */
648
+ updateEndList() {
649
+ let { lastTime, lastContent, opt, sessionId, username, name } = this.listChangeItem;
650
+ if (opt === 2) {
651
+ this.scrollList.unshift({
652
+ toId: username,
653
+ lastTime,
654
+ lastContent,
655
+ toName: name,
656
+ id: sessionId
657
+ });
658
+ }
659
+ },
660
+ /* 更新会话列表 */
661
+ updateSessionList() {
662
+ let { msgCount = undefined, lastContent, opt, from, to, sendTime, sessionId, lastTime, lastContentRecallFlag = undefined } = this.listChangeItem;
663
+ lastContent = vexutils.isJSON(lastContent) ? JSON.parse(lastContent) : lastContent;
664
+ // 0: 新增, 1: 更新, 2: 删除
665
+ if (opt === 0) {
666
+ this.scrollList.unshift(
667
+ Object.assign(
668
+ {},
669
+ this.listChangeItem,
670
+ {
671
+ lastContent: JSON.stringify(lastContent)
672
+ },
673
+ { id: sessionId, lastTime: sendTime, fromId: from, toId: to }
674
+ )
675
+ );
676
+ } else if (opt === 1) {
677
+ let realIndex = this.scrollList.findIndex(item => item.id === sessionId);
678
+ if (realIndex === -1) return;
679
+ let res = {
680
+ lastTime: sendTime || lastTime,
681
+ sendTime,
682
+ lastContentRecallFlag
683
+ };
684
+ if (lastContentRecallFlag != 1) {
685
+ if (msgCount !== undefined) {
686
+ res.msgCount = msgCount;
687
+ }
688
+ res.lastContent = JSON.stringify(lastContent);
689
+ }
690
+ let item = Object.assign({}, this.scrollList[realIndex], res);
691
+ this.scrollList.splice(realIndex, 1, item);
692
+ } else if (opt === 2) {
693
+ let realIndex = this.scrollList.findIndex(item => item.id === sessionId);
694
+ if (realIndex === -1) return;
695
+ this.scrollList.splice(realIndex, 1);
696
+ }
697
+ },
698
+ /* 更新排队列表 */
699
+ updateQueueList() {
700
+ let { sendTime, sendName, receiveName, opt, name, username, bid, msgCount, messages = [], createdTime, userType, classify, params, lastTime, lastContent } = this.listChangeItem;
701
+ if (messages.length === 0) {
702
+ messages = [{ createdTime }];
703
+ }
704
+ lastTime = lastTime || sendTime;
705
+ lastContent = vexutils.isPlainObject(lastContent) ? JSON.stringify(lastContent) : lastContent;
706
+ let current_item = {
707
+ sendName,
708
+ receiveName,
709
+ msgCount,
710
+ username,
711
+ bid,
712
+ name,
713
+ messages,
714
+ createdTime: new Date(createdTime).getTime(),
715
+ userType,
716
+ classify,
717
+ params,
718
+ lastTime: new Date(lastTime).getTime(),
719
+ lastContent
720
+ };
721
+ // 0: 新增, 1: 更新, 2: 删除
722
+ if (opt === 0) {
723
+ this.scrollList.unshift(current_item);
724
+ } else if (opt === 2) {
725
+ let realIndex = this.scrollList.findIndex(item => item.username == username);
726
+ this.scrollList.splice(realIndex, 1);
727
+ } else if (opt === 1) {
728
+ let realIndex = this.scrollList.findIndex(item => item.username == username);
729
+ this.scrollList.splice(realIndex, 1, current_item);
730
+ // 排队消息更新
731
+ if (this.queueItem && username === this.queueItem.username) {
732
+ this.clearMsgList([
733
+ ...this.msgList,
734
+ {
735
+ fromName: name,
736
+ content: Object.assign(JSON.parse(lastContent), { lastTime })
737
+ }
738
+ ]);
739
+ this.appendList([
740
+ {
741
+ fromName: name,
742
+ content: Object.assign(JSON.parse(lastContent), { lastTime })
743
+ }
744
+ ]);
745
+ }
746
+ }
747
+ },
748
+ getMappingHTML(value) {
749
+ if (!vexutils.isObject(value)) return value;
750
+ const { icon = '', desc, color } = value;
751
+ let str = '';
752
+ if (icon) {
753
+ str += `<svg aria-hidden="true" style="font-size 20px;width: 1em;height: 1em;" class={svg-icon}><use xlinkhref={#icon-${icon}}></use></svg>`;
754
+ }
755
+ if (desc) {
756
+ str += `<span style="color:#fff;padding:0 4px;${color ? 'background:' + color : ''}">${desc}</span>`;
757
+ }
758
+ return str;
759
+ },
760
+ // 获取聊天字段对应的值(部分字段需要格式化处理)
761
+ getMsgFieldValue(key, item, isTip = false) {
762
+ let val = item[key];
763
+ switch (key) {
764
+ case 'createdTime':
765
+ case 'lastTime':
766
+ val = this.formatDate(val || item.createdTime, isTip);
767
+ break;
768
+ case 'lastContent':
769
+ val = this.formatBrief(item);
770
+ break;
771
+ }
772
+ return val;
773
+ },
774
+ handleSelectItem() {
775
+ let sessionId = this.defSessionId;
776
+ if (!sessionId || this._selected) return;
777
+ let matchItem = this.processedScrollList.find(item => item.id === sessionId);
778
+ if (!matchItem) return;
779
+ this._selected = 1;
780
+ this.setClassify(matchItem.classify);
781
+ this.handleClick(matchItem);
782
+ this.$nextTick(() => {
783
+ const target = this.$el.querySelector(`#item_id_${sessionId}`);
784
+ if (!target) return;
785
+ target.scrollIntoView(true);
786
+ });
787
+ },
788
+ formatDate(date, showDetail) {
789
+ let input;
790
+ if (!isNaN(Number(date))) {
791
+ input = moment(Number(date));
792
+ } else {
793
+ input = moment(new Date(date));
794
+ }
795
+ if (showDetail) {
796
+ return input.format('YYYY年M月D日 HH:mm:ss');
797
+ }
798
+ // let input = moment(new Date(date));
799
+ let now = moment();
800
+ let today = moment(now.toArray().slice(0, 3));
801
+ let yestoday = moment(today).subtract(1, 'days');
802
+ let thisYear = moment(now.toArray().slice(0, 1));
803
+ let inToday = today.isBefore(input);
804
+ let inYestoday = input.isBetween(yestoday, today);
805
+ let inThisYear = thisYear.isBefore(input);
806
+ if (inToday) {
807
+ return '今天' + input.format('HH:mm');
808
+ } else if (inYestoday) {
809
+ return '昨天' + input.format('HH:mm');
810
+ } else if (inThisYear) {
811
+ return input.format('M月D日');
812
+ } else {
813
+ return input.format('YYYY年M月D日');
814
+ }
815
+ // return vexutils.formatDate(date);
816
+ }
817
+ },
818
+ directives: {
819
+ infiniteScroll
820
+ },
821
+ filters: {
822
+ formatName(item) {
823
+ if (item.title) return item.title;
824
+ // if (item.type == 2) {
825
+ // return item.toName;
826
+ // }
827
+ let name = ''
828
+ if (item.params) {
829
+ name = JSON.parse(item.params || {})?.name || "";
830
+ }
831
+ return item.titleSetting || item.name || name;
832
+ },
833
+ formatTime(item) {
834
+ return item.timeSetting || item.createdTime;
835
+ },
836
+ formatCount(item) {
837
+ return item.msgCount || 0;
838
+ }
839
+ },
840
+ watch: {
841
+ /* 列表更新 */
842
+ isScrollListChange: {
843
+ handler(isScrollListChange) {
844
+ if (isScrollListChange) {
845
+ this.updateScrollList();
846
+ this.setIsScrollListChange(false);
847
+ this.setListChangeItem(null);
848
+ // 分类
849
+ if (this.assemblySetting.isListClassify !== 'Y') return;
850
+ this.assemblySetting.listClassify.forEach(item => {
851
+ let count = this.scrollList.filter(i => i.classify === item.classify).length;
852
+ this.$set(item, 'count', count);
853
+ });
854
+ }
855
+ }
856
+ },
857
+ dateParams() {
858
+ if (this.enable) {
859
+ if (this.currentTab === 'end') {
860
+ this.pageNum = 1;
861
+ this.getData(1);
862
+ } else {
863
+ this.getScrollList();
864
+ }
865
+ }
866
+ },
867
+ /* 组件更新 */
868
+ currentTab: {
869
+ immediate: true,
870
+ handler(val) {
871
+ if (this.enable) {
872
+ this.pageNum = 1;
873
+ if (val == 'end') return;
874
+ this.getScrollList();
875
+ }
876
+ }
877
+ },
878
+ tabChange: {
879
+ immediate: true,
880
+ deep: true,
881
+ handler(val) {
882
+ if (!val || !Object.keys(val).length) return;
883
+ if (this.currentTab != 'end') return;
884
+ this.pageNum = 1;
885
+ this.getData(1);
886
+ }
887
+ }
888
+ },
889
+ render(_h) {
890
+ if (this.tableTheme) {
891
+ return (
892
+ <c-grid
893
+ class="chat-scroll-session__table"
894
+ resizable
895
+ max-height="100%"
896
+ auto-resize
897
+ data={this.processedScrollList}
898
+ columns={this.tableColumns}
899
+ scroll-y={{ enabled: false }}
900
+ scroll-x={{ enabled: false }}
901
+ row-class-name={this.tableRowClass}
902
+ on-cell-click={this.handleTableCellClick}
903
+ on-scroll={this.handleTableScroll}
904
+ ></c-grid>
905
+ );
906
+ }
907
+ const { theme, currentTab, processedScrollList, handleInfiniteOnLoad, busy, infiniteMsgShow, foldTheme, classifyIcon } = this;
908
+ const isEnd = currentTab === 'end';
909
+ const isNoData = !processedScrollList?.length;
910
+ const filters = this.$options.filters;
911
+ const directives = [
912
+ {
913
+ name: 'infiniteScroll',
914
+ value: handleInfiniteOnLoad
915
+ }
916
+ ];
917
+ const _this = this
918
+ // 默认不显示在线状态,只有南通瑞慈显示
919
+ function getAvatar(item) {
920
+ return <Avatar className="avatar" src={item.portrait} name={item.name || item.toName || item.title || item.titleSetting} len={2} status={item.onlineStatus} isShowStatus={_this.currentTab === 'session' && _this.sdkInfo?.vendor == 3} />;
921
+ }
922
+ function getContent(item, filters, fold, classifyIcon) {
923
+ const { formatName, formatCount } = filters;
924
+ const name = formatName(item);
925
+ const sendName = item.sendName;
926
+ const receiveName = item.receiveName;
927
+ const msgCount = item.msgCount;
928
+ const statusSetting = item.statusSetting;
929
+ return (
930
+ <div class={{ 'chat-scroll-session__item': true, fold: fold }}>
931
+ <div class="chat-scroll-session__name-time">
932
+ <div class="chat-scroll-session__name-zhuanjie">
933
+ <a-tooltip placement="topLeft">
934
+ <template slot="title">{name}</template>
935
+ <span class="chat-scroll-session__name">{name}</span>
936
+ </a-tooltip>
937
+ {fold && classifyIcon ? <svg-icon icon-class={classifyIcon} style="margin-left:4px"></svg-icon> : null}
938
+ {sendName ? (
939
+ <a-tooltip placement="topLeft">
940
+ <template slot="title">{sendName + '转接给了你'}</template>
941
+ <span class="chat-scroll-session__zhuanjie">
942
+ <svg-icon icon-class="liaotian-zhuanchu" style="fontSize: 16px"></svg-icon>
943
+ {sendName}
944
+ </span>
945
+ </a-tooltip>
946
+ ) : null}
947
+ {receiveName ? (
948
+ <a-tooltip placement="topLeft">
949
+ <template slot="title">{'你转接给了' + receiveName}</template>
950
+ <span class="chat-scroll-session__zhuanchu">
951
+ <svg-icon icon-class="liaotian-zhuanru" style="fontSize: 16px"></svg-icon>
952
+ {receiveName}
953
+ </span>
954
+ </a-tooltip>
955
+ ) : null}
956
+ </div>
957
+ <a-tooltip placement="topRight" title={item.timeSettingTip}>
958
+ <span class="chat-scroll-session__time">{item.timeSetting}</span>
959
+ </a-tooltip>
960
+ </div>
961
+ <div class="chat-scroll-session__remark">{item.remarkSetting}</div>
962
+ <div class="chat-scroll-session__brief-count">
963
+ <div class="chat-scroll-session__brief" domPropsInnerHTML={item.contentSetting}></div>
964
+ {msgCount ? <span class="chat-scroll-session__count">{msgCount > 99 ? <a-tooltip title={msgCount}>99+</a-tooltip> : formatCount(item)}</span> : null}
965
+ {statusSetting ? <span class="chat-scroll-session__level" domPropsInnerHTML={statusSetting}></span> : null}
966
+ </div>
967
+ </div>
968
+ );
969
+ }
970
+
971
+ return (
972
+ <div class={[theme, 'chat-scroll-container']}>
973
+ <ul class="chat-scroll-session__list">
974
+ {processedScrollList.map((item, index) => {
975
+ const msgCount = item.msgCount;
976
+ return (
977
+ <li class={{ 'scroll-item': true, active: this.isActive(item) }} key={item.id || item.bid || index} onClick={() => this.handleClick(item)} id={'item_id_' + item.id}>
978
+ {foldTheme
979
+ ? [
980
+ <a-popover overlayClassName="chat-list-popover--fold" placement="right" destroyTooltipOnHide={true}>
981
+ <template slot="content">{getContent(item, filters, foldTheme, classifyIcon)}</template>
982
+ {getAvatar(item)}
983
+ </a-popover>,
984
+ msgCount ? <div class="chat-scroll-session__num">{msgCount > 99 ? '99+' : msgCount}</div> : null
985
+ ]
986
+ : [getAvatar(item), getContent(item, filters, foldTheme, classifyIcon)]}
987
+ </li>
988
+ );
989
+ })}
990
+ </ul>
991
+
992
+ {isEnd ? (
993
+ <div {...{ directives }} infinite-scroll-immediate-check="immediate" infinite-scroll-disabled={busy} infinite-scroll-distance={10}>
994
+ <div class="infinite-wrap" style={infiniteMsgShow ? '' : 'display:none'}>
995
+ <a-spin size="small" />
996
+ {foldTheme ? '' : '加载中'}
997
+ </div>
998
+ </div>
999
+ ) : null}
1000
+
1001
+ {isNoData && ((isEnd && !infiniteMsgShow) || !isEnd) ? (
1002
+ <div class={[theme, 'no-data']}>
1003
+ <img src={require('../img/no-data2.png')} />
1004
+ <span>{this.i18nText('1.1.6.11')}</span>
1005
+ </div>
1006
+ ) : null}
1007
+ </div>
1008
+ );
1009
+ }
1010
+ };
1011
+ </script>
1012
+
1013
+ <style lang="less">
1014
+ .no-data {
1015
+ flex: 1;
1016
+ display: flex;
1017
+ flex-direction: column;
1018
+ justify-content: center;
1019
+ align-items: center;
1020
+ & > img {
1021
+ width: 160px;
1022
+ }
1023
+ &.fold > img {
1024
+ width: 80%;
1025
+ }
1026
+ span {
1027
+ display: inline-block;
1028
+ font-size: 14px;
1029
+ }
1030
+ &.fold span {
1031
+ font-size: 12px;
1032
+ }
1033
+ }
1034
+ .chat-scroll-container {
1035
+ height: 100%;
1036
+ overflow-y: auto;
1037
+ &::-webkit-scrollbar {
1038
+ width: 5px;
1039
+ }
1040
+ .infinite-wrap {
1041
+ padding: 16px;
1042
+ text-align: center;
1043
+ font-size: 14px;
1044
+ color: #000000;
1045
+ line-height: 20px;
1046
+ .ant-spin {
1047
+ margin-right: 8px;
1048
+ }
1049
+ }
1050
+ }
1051
+ .chat-scroll-session__list {
1052
+ margin-bottom: -1px;
1053
+ overflow: hidden;
1054
+ .scroll-item {
1055
+ position: relative;
1056
+ display: flex;
1057
+ align-items: center;
1058
+ height: 82px;
1059
+ padding: 15px 8px;
1060
+ background: #fff;
1061
+ border-bottom: 1px solid #d5d5d5;
1062
+ &:hover {
1063
+ background-color: #f4f4f4;
1064
+ }
1065
+ &.active {
1066
+ background: #ebebeb;
1067
+ .chat-scroll-session__name-time .chat-scroll-session__time {
1068
+ color: #666;
1069
+ }
1070
+ }
1071
+ .avatar {
1072
+ margin-right: 20px;
1073
+ }
1074
+ }
1075
+ }
1076
+
1077
+ .chat-scroll-container.fold .chat-scroll-session__list {
1078
+ .scroll-item {
1079
+ border-bottom: 0;
1080
+ justify-content: center;
1081
+ background-color: transparent;
1082
+ padding: 8px;
1083
+ height: auto;
1084
+ }
1085
+ .avatar {
1086
+ margin-right: 0;
1087
+ }
1088
+ }
1089
+ .chat-list-popover--fold {
1090
+ .ant-popover-content {
1091
+ max-width: 300px;
1092
+ }
1093
+ .ant-popover-arrow {
1094
+ display: none;
1095
+ }
1096
+ }
1097
+
1098
+ .chat-scroll-session__item {
1099
+ flex: 1;
1100
+ width: 0;
1101
+ &.fold {
1102
+ width: 192px;
1103
+ .chat-scroll-session__time {
1104
+ font-size: 12px;
1105
+ }
1106
+ }
1107
+ }
1108
+ .chat-scroll-session__name-time {
1109
+ display: flex;
1110
+ justify-content: space-between;
1111
+ align-items: center;
1112
+ margin-bottom: 4px;
1113
+ .chat-scroll-session__name {
1114
+ cursor: pointer;
1115
+ font-size: 16px;
1116
+ color: #212121;
1117
+ height: 26px;
1118
+ font-weight: 600;
1119
+ line-height: 26px;
1120
+ flex: 1;
1121
+ text-align: left;
1122
+ white-space: nowrap;
1123
+ text-overflow: ellipsis;
1124
+ overflow: hidden;
1125
+ word-break: break-all;
1126
+ text-align: left;
1127
+ }
1128
+ .chat-scroll-session__time {
1129
+ padding-left: 4px;
1130
+ cursor: pointer;
1131
+ color: #b3b3b3;
1132
+ text-align: right;
1133
+ white-space: nowrap;
1134
+ text-overflow: ellipsis;
1135
+ overflow: hidden;
1136
+ word-break: break-all;
1137
+ }
1138
+ .chat-scroll-session__name-zhuanjie {
1139
+ display: flex;
1140
+ justify-content: flex-start;
1141
+ align-items: center;
1142
+ max-width: 65%;
1143
+ }
1144
+ .chat-scroll-session__zhuanchu,
1145
+ .chat-scroll-session__zhuanjie {
1146
+ line-height: 16px;
1147
+ height: 18px;
1148
+ display: flex;
1149
+ align-items: center;
1150
+ margin-left: 8px;
1151
+ border: 1px solid #37d39f;
1152
+ color: #37d39f;
1153
+ border-radius: 2px;
1154
+ font-size: 12px;
1155
+ padding: 0 4px 0 2px;
1156
+ border-radius: 2px;
1157
+ }
1158
+ .chat-scroll-session__zhuanchu {
1159
+ color: #2d7aff;
1160
+ border: 1px solid #2d7aff;
1161
+ }
1162
+ }
1163
+ .chat-scroll-session__remark {
1164
+ width: 100%;
1165
+ text-overflow: ellipsis;
1166
+ overflow: hidden;
1167
+ white-space: nowrap;
1168
+ }
1169
+ .chat-scroll-session__brief-count {
1170
+ display: flex;
1171
+ justify-content: space-between;
1172
+ align-items: center;
1173
+ overflow: hidden;
1174
+ height: 20px;
1175
+ .chat-scroll-session__brief {
1176
+ flex: 1;
1177
+ width: 0;
1178
+ height: 20px;
1179
+ font-size: 14px;
1180
+ color: rgba(33, 33, 33, 0.6);
1181
+ line-height: 20px;
1182
+ text-align: left;
1183
+ white-space: nowrap;
1184
+ text-overflow: ellipsis;
1185
+ overflow: hidden;
1186
+ word-break: break-all;
1187
+ padding-right: 8px;
1188
+ > div {
1189
+ white-space: nowrap;
1190
+ text-overflow: ellipsis;
1191
+ overflow: hidden;
1192
+ word-break: break-all;
1193
+ }
1194
+ }
1195
+ .chat-scroll-session__level {
1196
+ flex: 0 0 60px;
1197
+ display: flex;
1198
+ white-space: nowrap;
1199
+ overflow: hidden;
1200
+ }
1201
+ }
1202
+ .chat-scroll-session__num,
1203
+ .chat-scroll-session__count {
1204
+ display: block;
1205
+ min-width: 28px;
1206
+ height: 28px;
1207
+ line-height: 28px;
1208
+ text-align: center;
1209
+ border-radius: 14px;
1210
+ background: #e54949;
1211
+ padding: 0 2px;
1212
+ color: #fff;
1213
+ font-size: 20px;
1214
+ transform: scale(0.5);
1215
+ }
1216
+ .chat-scroll-session__num {
1217
+ position: absolute;
1218
+ right: 0;
1219
+ top: 8px;
1220
+ margin-right: 12px;
1221
+ }
1222
+ .chat-scroll-session__table {
1223
+ .vxe-table--render-default .vxe-body--column.col--ellipsis,
1224
+ .vxe-table--render-default.vxe-editable .vxe-body--column,
1225
+ .vxe-table--render-default .vxe-footer--column.col--ellipsis,
1226
+ .vxe-table--render-default .vxe-header--column.col--ellipsis {
1227
+ height: 40px;
1228
+ }
1229
+ .vxe-table--render-default.border--default .vxe-table--header-wrapper,
1230
+ .vxe-table--render-default.border--full .vxe-table--header-wrapper,
1231
+ .vxe-table--render-default.border--outer .vxe-table--header-wrapper {
1232
+ background-color: #fff;
1233
+ }
1234
+ .vxe-body--row.active {
1235
+ background-color: #f2f2f2;
1236
+ }
1237
+ }
1238
+ </style>