cnhis-design-vue 0.2.64-beta → 0.3.2-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -81
- package/env.d.ts +20 -0
- package/es/big-table/index.css +5 -0
- package/es/big-table/index.js +40448 -18673
- package/es/button-print/index.css +7 -0
- package/es/button-print/index.js +12820 -0
- package/es/drag-layout/index.css +10 -0
- package/es/drag-layout/index.js +12533 -4157
- package/es/grid/index.css +10 -0
- package/es/grid/index.js +30638 -3609
- package/es/index.css +10 -0
- package/es/index.js +43283 -0
- package/package.json +48 -85
- package/tsconfig.node.json +8 -0
- package/.prettierrc.js +0 -27
- package/commitlint.config.js +0 -1
- package/es/affix/index.js +0 -3008
- package/es/affix/style.css +0 -0
- package/es/age/index.js +0 -3767
- package/es/age/style.css +0 -1
- package/es/alert/index.js +0 -3008
- package/es/alert/style.css +0 -0
- package/es/anchor/index.js +0 -3021
- package/es/anchor/style.css +0 -0
- package/es/auto-complete/index.js +0 -3008
- package/es/auto-complete/style.css +0 -0
- package/es/avatar/index.js +0 -3008
- package/es/avatar/style.css +0 -0
- package/es/back-top/index.js +0 -3008
- package/es/back-top/style.css +0 -0
- package/es/badge/index.js +0 -3008
- package/es/badge/style.css +0 -0
- package/es/base/index.js +0 -2896
- package/es/base/style.css +0 -0
- package/es/big-table/style.css +0 -1
- package/es/breadcrumb/index.js +0 -3032
- package/es/breadcrumb/style.css +0 -0
- package/es/button/index.js +0 -9156
- package/es/button/style.css +0 -1
- package/es/calendar/index.js +0 -3008
- package/es/calendar/style.css +0 -0
- package/es/captcha/index.js +0 -3618
- package/es/captcha/style.css +0 -1
- package/es/card/index.js +0 -3032
- package/es/card/style.css +0 -0
- package/es/carousel/index.js +0 -3008
- package/es/carousel/style.css +0 -0
- package/es/cascader/index.js +0 -3008
- package/es/cascader/style.css +0 -0
- package/es/checkbox/index.js +0 -3343
- package/es/checkbox/style.css +0 -1
- package/es/col/index.js +0 -3009
- package/es/col/style.css +0 -0
- package/es/collapse/index.js +0 -3021
- package/es/collapse/style.css +0 -0
- package/es/color-picker/index.js +0 -3532
- package/es/color-picker/style.css +0 -1
- package/es/comment/index.js +0 -3008
- package/es/comment/style.css +0 -0
- package/es/config-provider/index.js +0 -3008
- package/es/config-provider/style.css +0 -0
- package/es/date-picker/index.js +0 -3043
- package/es/date-picker/style.css +0 -0
- package/es/descriptions/index.js +0 -3021
- package/es/descriptions/style.css +0 -0
- package/es/divider/index.js +0 -3008
- package/es/divider/style.css +0 -0
- package/es/drag-layout/style.css +0 -1
- package/es/drawer/index.js +0 -3008
- package/es/drawer/style.css +0 -0
- package/es/dropdown/index.js +0 -3008
- package/es/dropdown/style.css +0 -0
- package/es/editor/index.js +0 -3565
- package/es/editor/style.css +0 -1
- package/es/empty/index.js +0 -3008
- package/es/empty/style.css +0 -0
- package/es/fabric-chart/index.js +0 -10094
- package/es/fabric-chart/style.css +0 -1
- package/es/form/index.js +0 -3019
- package/es/form/style.css +0 -0
- package/es/form-model/index.js +0 -3018
- package/es/form-model/style.css +0 -0
- package/es/form-table/index.js +0 -12037
- package/es/form-table/style.css +0 -1
- package/es/grid/style.css +0 -0
- package/es/icon/index.js +0 -2962
- package/es/icon/style.css +0 -0
- package/es/img/calling.ba1a517f.png +0 -0
- package/es/img/failure.96c6f004.png +0 -0
- package/es/img/no-permission.3aa0dddb.png +0 -0
- package/es/img/nodata.bbccf960.png +0 -0
- package/es/index/index.js +0 -120175
- package/es/index/style.css +0 -1
- package/es/input/index.js +0 -4384
- package/es/input/style.css +0 -1
- package/es/input-number/index.js +0 -3008
- package/es/input-number/style.css +0 -0
- package/es/keep-cache/index.js +0 -3299
- package/es/keep-cache/style.css +0 -1
- package/es/layout/index.js +0 -3054
- package/es/layout/style.css +0 -0
- package/es/list/index.js +0 -3032
- package/es/list/style.css +0 -0
- package/es/locale-provider/index.js +0 -3008
- package/es/locale-provider/style.css +0 -0
- package/es/map/index.js +0 -3677
- package/es/map/style.css +0 -1
- package/es/media/msgTip.6865f0c7.mp3 +0 -0
- package/es/mentions/index.js +0 -3021
- package/es/mentions/style.css +0 -0
- package/es/menu/index.js +0 -3054
- package/es/menu/style.css +0 -0
- package/es/message/index.js +0 -2896
- package/es/message/style.css +0 -0
- package/es/modal/index.js +0 -2962
- package/es/modal/style.css +0 -0
- package/es/multi-chat/index.js +0 -24374
- package/es/multi-chat/style.css +0 -1
- package/es/multi-chat-client/index.js +0 -18383
- package/es/multi-chat-client/style.css +0 -1
- package/es/multi-chat-history/index.js +0 -4600
- package/es/multi-chat-history/style.css +0 -1
- package/es/multi-chat-record/index.js +0 -4864
- package/es/multi-chat-record/style.css +0 -1
- package/es/multi-chat-setting/index.js +0 -13540
- package/es/multi-chat-setting/style.css +0 -1
- package/es/multi-chat-sip/index.js +0 -3313
- package/es/multi-chat-sip/style.css +0 -1
- package/es/notification/index.js +0 -2896
- package/es/notification/style.css +0 -0
- package/es/page-header/index.js +0 -3008
- package/es/page-header/style.css +0 -0
- package/es/pagination/index.js +0 -3008
- package/es/pagination/style.css +0 -0
- package/es/popconfirm/index.js +0 -3008
- package/es/popconfirm/style.css +0 -0
- package/es/popover/index.js +0 -3008
- package/es/popover/style.css +0 -0
- package/es/progress/index.js +0 -3008
- package/es/progress/style.css +0 -0
- package/es/radio/index.js +0 -3334
- package/es/radio/style.css +0 -1
- package/es/rate/index.js +0 -3008
- package/es/rate/style.css +0 -0
- package/es/result/index.js +0 -3008
- package/es/result/style.css +0 -0
- package/es/row/index.js +0 -3008
- package/es/row/style.css +0 -0
- package/es/scale-view/index.js +0 -18420
- package/es/scale-view/style.css +0 -1
- package/es/select/index.js +0 -4785
- package/es/select/style.css +0 -1
- package/es/select-label/index.js +0 -5647
- package/es/select-label/style.css +0 -1
- package/es/select-person/index.js +0 -5427
- package/es/select-person/style.css +0 -1
- package/es/skeleton/index.js +0 -3008
- package/es/skeleton/style.css +0 -0
- package/es/slider/index.js +0 -3008
- package/es/slider/style.css +0 -0
- package/es/space/index.js +0 -3008
- package/es/space/style.css +0 -0
- package/es/spin/index.js +0 -3008
- package/es/spin/style.css +0 -0
- package/es/statistic/index.js +0 -3021
- package/es/statistic/style.css +0 -0
- package/es/steps/index.js +0 -3021
- package/es/steps/style.css +0 -0
- package/es/switch/index.js +0 -3008
- package/es/switch/style.css +0 -0
- package/es/table-filter/index.js +0 -24345
- package/es/table-filter/style.css +0 -1
- package/es/tabs/index.js +0 -3021
- package/es/tabs/style.css +0 -0
- package/es/tag/index.js +0 -3912
- package/es/tag/style.css +0 -1
- package/es/time-picker/index.js +0 -3008
- package/es/time-picker/style.css +0 -0
- package/es/timeline/index.js +0 -3018
- package/es/timeline/style.css +0 -0
- package/es/tooltip/index.js +0 -3008
- package/es/tooltip/style.css +0 -0
- package/es/transfer/index.js +0 -3008
- package/es/transfer/style.css +0 -0
- package/es/tree/index.js +0 -3021
- package/es/tree/style.css +0 -0
- package/es/tree-select/index.js +0 -3021
- package/es/tree-select/style.css +0 -0
- package/es/upload/index.js +0 -3008
- package/es/upload/style.css +0 -0
- package/es/utils/UniRTCv2.js +0 -586
- package/es/utils/chatFetch.js +0 -85
- package/es/utils/clickoutside.js +0 -76
- package/es/utils/crypto.js +0 -40
- package/es/utils/kty-sdk.js +0 -1030
- package/es/utils/kty.min-1.0.0.js +0 -6
- package/es/utils/sip-device.js +0 -112
- package/es/utils/time-domain.js +0 -195
- package/es/utils/utils-map.js +0 -547
- package/es/utils/vexutils.js +0 -977
- package/es/verification-code/index.js +0 -3487
- package/es/verification-code/style.css +0 -1
- package/packages/affix/index.js +0 -12
- package/packages/affix/src/Affix.jsx +0 -12
- package/packages/age/index.js +0 -27
- package/packages/age/src/age/index.vue +0 -140
- package/packages/age/src/age-com/index.vue +0 -210
- package/packages/alert/index.js +0 -12
- package/packages/alert/src/Alert.jsx +0 -11
- package/packages/anchor/index.js +0 -18
- package/packages/anchor/src/Anchor.jsx +0 -11
- package/packages/anchor/src/Link.jsx +0 -11
- package/packages/auto-complete/index.js +0 -12
- package/packages/auto-complete/src/AutoComplete.jsx +0 -12
- package/packages/avatar/index.js +0 -12
- package/packages/avatar/src/Avatar.jsx +0 -11
- package/packages/back-top/index.js +0 -12
- package/packages/back-top/src/BackTop.jsx +0 -11
- package/packages/badge/index.js +0 -12
- package/packages/badge/src/Badge.jsx +0 -11
- package/packages/base/index.js +0 -3
- package/packages/big-table/index.js +0 -16
- package/packages/big-table/src/BigTable.vue +0 -3051
- package/packages/big-table/src/Fieldset.vue +0 -2067
- package/packages/big-table/src/assets/iconfont/iconfont.css +0 -21
- package/packages/big-table/src/assets/iconfont/iconfont.ttf +0 -0
- package/packages/big-table/src/assets/img/failure.png +0 -0
- package/packages/big-table/src/assets/img/icon-asc.png +0 -0
- package/packages/big-table/src/assets/img/icon-desc.png +0 -0
- package/packages/big-table/src/assets/img/no-permission.png +0 -0
- package/packages/big-table/src/assets/img/nodata.png +0 -0
- package/packages/big-table/src/assets/img/notfound.png +0 -0
- package/packages/big-table/src/assets/img/qr.png +0 -0
- package/packages/big-table/src/assets/img/video_default_cover.png +0 -0
- package/packages/big-table/src/assets/img/xb_big.png +0 -0
- package/packages/big-table/src/assets/img/xb_small.png +0 -0
- package/packages/big-table/src/assets/style/table-base.less +0 -345
- package/packages/big-table/src/assets/style/table-global.less +0 -175
- package/packages/big-table/src/components/NoData.vue +0 -81
- package/packages/big-table/src/components/TextOverTooltip.vue +0 -120
- package/packages/big-table/src/components/edit-form/EditForm.vue +0 -491
- package/packages/big-table/src/components/edit-form/edit-component/config-data/index.js +0 -67
- package/packages/big-table/src/components/edit-form/edit-component/edit-date-picker/edit-date-picker.vue +0 -60
- package/packages/big-table/src/components/edit-form/edit-component/edit-digital/edit-digital.vue +0 -54
- package/packages/big-table/src/components/edit-form/edit-component/edit-input/edit-input.vue +0 -39
- package/packages/big-table/src/components/edit-form/edit-component/edit-input-password/edit-input-password.vue +0 -79
- package/packages/big-table/src/components/edit-form/edit-component/edit-month-picker/edit-month-picker.vue +0 -37
- package/packages/big-table/src/components/edit-form/edit-component/edit-search/edit-search.vue +0 -83
- package/packages/big-table/src/components/edit-form/edit-component/edit-search-more/edit-search-more.vue +0 -95
- package/packages/big-table/src/components/edit-form/edit-component/edit-select/edit-select.vue +0 -40
- package/packages/big-table/src/components/edit-form/edit-component/edit-select-multiple/edit-select-multiple.vue +0 -55
- package/packages/big-table/src/components/edit-form/edit-component/edit-textarea/edit-textarea.vue +0 -41
- package/packages/big-table/src/components/edit-form/edit-component/edit-time-picker/edit-time-picker.vue +0 -40
- package/packages/big-table/src/components/edit-form/edit-component/global-props.js +0 -33
- package/packages/big-table/src/components/edit-form/edit-component/index.js +0 -8
- package/packages/big-table/src/components/edit-form/edit-component/mixins/bound-date.js +0 -3
- package/packages/big-table/src/components/edit-form/edit-component/mixins/dateType.js +0 -216
- package/packages/big-table/src/components/edit-form/edit-component/mixins/item-default.js +0 -594
- package/packages/big-table/src/components/edit-form/edit-component/mixins/search.js +0 -1198
- package/packages/big-table/src/components/edit-form/edit-component/register-com.js +0 -26
- package/packages/big-table/src/components/edit-form/edit-item/form-event.js +0 -79
- package/packages/big-table/src/components/edit-form/edit-item/global-props.js +0 -33
- package/packages/big-table/src/components/edit-form/edit-item/index.js +0 -4
- package/packages/big-table/src/components/edit-form/edit-item/render-methods.js +0 -28
- package/packages/big-table/src/components/edit-form/edit-item/validate-rules.js +0 -463
- package/packages/big-table/src/components/edit-form/edit-mixins/form-commom.js +0 -668
- package/packages/big-table/src/components/edit-form/edit-mixins/index.js +0 -3
- package/packages/big-table/src/components/edit-form/edit-utils/index.js +0 -112
- package/packages/big-table/src/components/password-com.vue +0 -58
- package/packages/big-table/src/components/player-vod/index.vue +0 -57
- package/packages/big-table/src/components/player-vod/player.vue +0 -189
- package/packages/big-table/src/components/player-vod/video-list.vue +0 -264
- package/packages/big-table/src/components/player-vod/video-modal.vue +0 -126
- package/packages/big-table/src/utils/CustomPagination.vue +0 -86
- package/packages/big-table/src/utils/batchEditing.js +0 -534
- package/packages/big-table/src/utils/bigTableProps.js +0 -94
- package/packages/big-table/src/utils/format.js +0 -557
- package/packages/big-table/src/utils/nestTable.js +0 -109
- package/packages/big-table/src/utils/tableParse.js +0 -153
- package/packages/breadcrumb/index.js +0 -21
- package/packages/breadcrumb/src/Breadcrumb.jsx +0 -11
- package/packages/breadcrumb/src/BreadcrumbItem.jsx +0 -11
- package/packages/breadcrumb/src/BreadcrumbSeparator.jsx +0 -11
- package/packages/button/index.js +0 -21
- package/packages/button/src/Button.jsx +0 -11
- package/packages/button/src/ButtonGroup.jsx +0 -11
- package/packages/button/src/ButtonPrint/components/IdentityVerification.vue +0 -176
- package/packages/button/src/ButtonPrint/index.vue +0 -687
- package/packages/button/src/ButtonPrint/js/print.es.min.js +0 -1
- package/packages/button/src/ButtonPrint/mixin/his-print.js +0 -95
- package/packages/calendar/index.js +0 -12
- package/packages/calendar/src/Calendar.jsx +0 -11
- package/packages/captcha/index.js +0 -10
- package/packages/captcha/src/Captcha.vue +0 -164
- package/packages/captcha/src/Index.vue +0 -47
- package/packages/captcha/src/SlideVerify.vue +0 -285
- package/packages/card/index.js +0 -21
- package/packages/card/src/Card.jsx +0 -12
- package/packages/card/src/CardGrid.js +0 -7
- package/packages/card/src/CardMeta.js +0 -7
- package/packages/carousel/index.js +0 -12
- package/packages/carousel/src/Carousel.jsx +0 -12
- package/packages/cascader/index.js +0 -12
- package/packages/cascader/src/Cascader.jsx +0 -11
- package/packages/checkbox/index.js +0 -30
- package/packages/checkbox/src/Checkbox.jsx +0 -11
- package/packages/checkbox/src/CheckboxImg/index.vue +0 -142
- package/packages/checkbox/src/Group.jsx +0 -11
- package/packages/col/index.js +0 -13
- package/packages/col/src/Col.jsx +0 -11
- package/packages/collapse/index.js +0 -18
- package/packages/collapse/src/Collapse.jsx +0 -11
- package/packages/collapse/src/Panel.jsx +0 -11
- package/packages/color-picker/index.js +0 -10
- package/packages/color-picker/src/color-picker.vue +0 -191
- package/packages/color-picker/src/style.less +0 -109
- package/packages/comment/index.js +0 -12
- package/packages/comment/src/Comment.jsx +0 -11
- package/packages/config-provider/index.js +0 -12
- package/packages/config-provider/src/ConfigProvider.jsx +0 -11
- package/packages/date-picker/index.js +0 -24
- package/packages/date-picker/src/DatePicker.jsx +0 -12
- package/packages/date-picker/src/MonthPicker.jsx +0 -11
- package/packages/date-picker/src/RangePicker.jsx +0 -11
- package/packages/date-picker/src/WeekPicker.jsx +0 -11
- package/packages/descriptions/index.js +0 -18
- package/packages/descriptions/src/Descriptions.jsx +0 -11
- package/packages/descriptions/src/Item.jsx +0 -11
- package/packages/divider/index.js +0 -12
- package/packages/divider/src/Divider.jsx +0 -11
- package/packages/drag-layout/DragFormLeftItem.vue +0 -173
- package/packages/drag-layout/DragFormRightItem.vue +0 -284
- package/packages/drag-layout/I18n-mixins.js +0 -10
- package/packages/drag-layout/drag-layout.vue +0 -778
- package/packages/drag-layout/index.js +0 -12
- package/packages/drawer/index.js +0 -12
- package/packages/drawer/src/Drawer.jsx +0 -11
- package/packages/dropdown/index.js +0 -12
- package/packages/dropdown/src/Dropdown.jsx +0 -11
- package/packages/editor/index.js +0 -10
- package/packages/editor/src/Editor.vue +0 -180
- package/packages/empty/index.js +0 -12
- package/packages/empty/src/Empty.jsx +0 -11
- package/packages/fabric-chart/index.js +0 -10
- package/packages/fabric-chart/src/FabricChart.vue +0 -179
- package/packages/fabric-chart/src/FabricGrid.vue +0 -73
- package/packages/fabric-chart/src/components/DropPopup.vue +0 -90
- package/packages/fabric-chart/src/components/MouseRightClick.vue +0 -168
- package/packages/fabric-chart/src/const/defaultVaule.js +0 -58
- package/packages/fabric-chart/src/fabric-chart/FabricCanvas.vue +0 -296
- package/packages/fabric-chart/src/fabric-chart/FabricLines.vue +0 -546
- package/packages/fabric-chart/src/fabric-chart/FabricPolylines.vue +0 -933
- package/packages/fabric-chart/src/fabric-chart/FabricScaleValue.vue +0 -120
- package/packages/fabric-chart/src/fabric-chart/FabricTextGroup.vue +0 -526
- package/packages/fabric-chart/src/fabric-chart2/FabricBottom.vue +0 -108
- package/packages/fabric-chart/src/fabric-chart2/FabricCanvas.vue +0 -181
- package/packages/fabric-chart/src/fabric-chart2/FabricCenter.vue +0 -612
- package/packages/fabric-chart/src/fabric-chart2/FabricLeft.vue +0 -104
- package/packages/fabric-chart/src/fabric-chart2/FabricRight.vue +0 -112
- package/packages/fabric-chart/src/fabric-chart2/FabricTop.vue +0 -172
- package/packages/fabric-chart/src/mixins/draw.js +0 -290
- package/packages/fabric-chart/src/mixins/eventCommon.js +0 -74
- package/packages/fabric-chart/src/mixins/fabricCommon.js +0 -85
- package/packages/fabric-chart/src/mixins/fabricObject.js +0 -193
- package/packages/fabric-chart/src/mixins/type.js +0 -6
- package/packages/form/index.js +0 -16
- package/packages/form/src/Form.jsx +0 -11
- package/packages/form/src/Item.jsx +0 -11
- package/packages/form-model/index.js +0 -14
- package/packages/form-model/src/FormModel.jsx +0 -11
- package/packages/form-model/src/Item.jsx +0 -11
- package/packages/form-table/index.js +0 -10
- package/packages/form-table/src/FormTable.vue +0 -1103
- package/packages/form-table/src/components/table-component/config-data/index.js +0 -80
- package/packages/form-table/src/components/table-component/global-props.js +0 -22
- package/packages/form-table/src/components/table-component/index.js +0 -8
- package/packages/form-table/src/components/table-component/mixins/bound-date.js +0 -455
- package/packages/form-table/src/components/table-component/mixins/dateType.js +0 -217
- package/packages/form-table/src/components/table-component/mixins/item-default.js +0 -257
- package/packages/form-table/src/components/table-component/mixins/search.js +0 -1228
- package/packages/form-table/src/components/table-component/register-com.js +0 -30
- package/packages/form-table/src/components/table-component/table-age/table-age.vue +0 -175
- package/packages/form-table/src/components/table-component/table-date-picker/table-date-picker.vue +0 -87
- package/packages/form-table/src/components/table-component/table-digital/table-digital.vue +0 -93
- package/packages/form-table/src/components/table-component/table-input/table-input.vue +0 -81
- package/packages/form-table/src/components/table-component/table-input-password/table-input-password.vue +0 -126
- package/packages/form-table/src/components/table-component/table-month-picker/table-month-picker.vue +0 -53
- package/packages/form-table/src/components/table-component/table-search/table-search.vue +0 -128
- package/packages/form-table/src/components/table-component/table-search-more/table-search-more.vue +0 -144
- package/packages/form-table/src/components/table-component/table-select/table-select.vue +0 -64
- package/packages/form-table/src/components/table-component/table-select-multiple/table-select-multiple.vue +0 -81
- package/packages/form-table/src/components/table-component/table-textarea/table-textarea.vue +0 -76
- package/packages/form-table/src/components/table-component/table-time-picker/table-time-picker.vue +0 -55
- package/packages/form-table/src/components/table-component/table-tree-select/table-tree-select.vue +0 -135
- package/packages/form-table/src/components/table-component/text-over-tooltip/TextOverTooltip.vue +0 -97
- package/packages/form-table/src/components/table-item/form-event.js +0 -81
- package/packages/form-table/src/components/table-item/global-props.js +0 -27
- package/packages/form-table/src/components/table-item/index.js +0 -4
- package/packages/form-table/src/components/table-item/render-methods.js +0 -28
- package/packages/form-table/src/components/table-item/validate-rules.js +0 -520
- package/packages/form-table/src/components/table-mixins/form-commom.js +0 -98
- package/packages/form-table/src/components/table-mixins/index.js +0 -3
- package/packages/form-table/src/components/table-utils/index.js +0 -112
- package/packages/form-table/src/disabledDetail.less +0 -46
- package/packages/grid/index.js +0 -10
- package/packages/grid/src/grid.js +0 -28
- package/packages/icon/index.js +0 -10
- package/packages/icon/src/icon.js +0 -13
- package/packages/index.js +0 -304
- package/packages/input/index.js +0 -30
- package/packages/input/src/Group.jsx +0 -11
- package/packages/input/src/Input.jsx +0 -11
- package/packages/input/src/Password.jsx +0 -11
- package/packages/input/src/Search.jsx +0 -11
- package/packages/input/src/TextArea.jsx +0 -11
- package/packages/input/src/input-quick/components/quick-item.vue +0 -284
- package/packages/input/src/input-quick/components/quick-popover.vue +0 -596
- package/packages/input/src/input-quick/index.vue +0 -137
- package/packages/input-number/index.js +0 -12
- package/packages/input-number/src/InputNumber.jsx +0 -11
- package/packages/keep-cache/KeepCache.js +0 -236
- package/packages/keep-cache/index.css +0 -3
- package/packages/keep-cache/index.js +0 -8
- package/packages/layout/index.js +0 -27
- package/packages/layout/src/Content.jsx +0 -11
- package/packages/layout/src/Footer.jsx +0 -11
- package/packages/layout/src/Header.jsx +0 -11
- package/packages/layout/src/Layout.jsx +0 -11
- package/packages/layout/src/Sider.jsx +0 -11
- package/packages/list/index.js +0 -21
- package/packages/list/src/Item.jsx +0 -11
- package/packages/list/src/ItemMeta.jsx +0 -11
- package/packages/list/src/List.jsx +0 -11
- package/packages/locale-provider/index.js +0 -12
- package/packages/locale-provider/src/LocaleProvider.jsx +0 -11
- package/packages/map/index.js +0 -10
- package/packages/map/src/Map.vue +0 -480
- package/packages/map/src/popup-map.vue +0 -53
- package/packages/mentions/index.js +0 -18
- package/packages/mentions/src/Mentions.jsx +0 -11
- package/packages/mentions/src/Option.jsx +0 -11
- package/packages/menu/index.js +0 -27
- package/packages/menu/src/Divider.jsx +0 -11
- package/packages/menu/src/Item.jsx +0 -11
- package/packages/menu/src/ItemGroup.jsx +0 -11
- package/packages/menu/src/Menu.jsx +0 -11
- package/packages/menu/src/SubMenu.jsx +0 -11
- package/packages/message/index.js +0 -8
- package/packages/modal/index.js +0 -10
- package/packages/modal/src/Modal.js +0 -7
- package/packages/multi-chat/chat/addConference.vue +0 -200
- package/packages/multi-chat/chat/addMembers.vue +0 -411
- package/packages/multi-chat/chat/advancedFilter.vue +0 -372
- package/packages/multi-chat/chat/audio.vue +0 -511
- package/packages/multi-chat/chat/calling.vue +0 -246
- package/packages/multi-chat/chat/chatFooter.vue +0 -1590
- package/packages/multi-chat/chat/chatHeader.vue +0 -473
- package/packages/multi-chat/chat/chatHistory.vue +0 -601
- package/packages/multi-chat/chat/chatMain.vue +0 -1446
- package/packages/multi-chat/chat/client/clientChat.vue +0 -716
- package/packages/multi-chat/chat/client/index.vue +0 -149
- package/packages/multi-chat/chat/delay.vue +0 -177
- package/packages/multi-chat/chat/evaluate.vue +0 -343
- package/packages/multi-chat/chat/index.vue +0 -2341
- package/packages/multi-chat/chat/messageRecord.vue +0 -333
- package/packages/multi-chat/chat/mixins/NoData.js +0 -20
- package/packages/multi-chat/chat/mixins/base.js +0 -92
- package/packages/multi-chat/chat/mixins/uniRTCAPI.js +0 -77
- package/packages/multi-chat/chat/multiVideo.vue +0 -1409
- package/packages/multi-chat/chat/quickReply.vue +0 -361
- package/packages/multi-chat/chat/robot/index.vue +0 -312
- package/packages/multi-chat/chat/scrollList.vue +0 -1229
- package/packages/multi-chat/chat/video.vue +0 -399
- package/packages/multi-chat/chat/videoVoiceList.vue +0 -348
- package/packages/multi-chat/chat/voice.vue +0 -431
- package/packages/multi-chat/components/avatar.vue +0 -76
- package/packages/multi-chat/components/chat-tabs-header.vue +0 -251
- package/packages/multi-chat/components/classify-tabs.vue +0 -185
- package/packages/multi-chat/components/empty.vue +0 -24
- package/packages/multi-chat/components/modal-refuse-reason.vue +0 -112
- package/packages/multi-chat/components/modal-sip.vue +0 -160
- package/packages/multi-chat/components/modal-user-transfer.vue +0 -98
- package/packages/multi-chat/components/msg-describe.vue +0 -138
- package/packages/multi-chat/components/msg-picture.vue +0 -68
- package/packages/multi-chat/components/msg-prescription.vue +0 -205
- package/packages/multi-chat/components/read-record.vue +0 -133
- package/packages/multi-chat/components/read-status.vue +0 -34
- package/packages/multi-chat/components/user-status.vue +0 -198
- package/packages/multi-chat/img/OFF-LINE.png +0 -0
- package/packages/multi-chat/img/ON-LINE.png +0 -0
- package/packages/multi-chat/img/accept.png +0 -0
- package/packages/multi-chat/img/add-person.png +0 -0
- package/packages/multi-chat/img/add_prescription.png +0 -0
- package/packages/multi-chat/img/all-voice.png +0 -0
- package/packages/multi-chat/img/audio-new.png +0 -0
- package/packages/multi-chat/img/audio-play.gif +0 -0
- package/packages/multi-chat/img/audio.png +0 -0
- package/packages/multi-chat/img/base-info-active.png +0 -0
- package/packages/multi-chat/img/base-info.png +0 -0
- package/packages/multi-chat/img/busy_line.png +0 -0
- package/packages/multi-chat/img/call.png +0 -0
- package/packages/multi-chat/img/callin.png +0 -0
- package/packages/multi-chat/img/callin_cancel.png +0 -0
- package/packages/multi-chat/img/calling.png +0 -0
- package/packages/multi-chat/img/callout.png +0 -0
- package/packages/multi-chat/img/callout_cancel.png +0 -0
- package/packages/multi-chat/img/close.png +0 -0
- package/packages/multi-chat/img/close_video.png +0 -0
- package/packages/multi-chat/img/customer-service-active.png +0 -0
- package/packages/multi-chat/img/customer-service.png +0 -0
- package/packages/multi-chat/img/customer.png +0 -0
- package/packages/multi-chat/img/customer_staff.png +0 -0
- package/packages/multi-chat/img/default.png +0 -0
- package/packages/multi-chat/img/ellipsis.png +0 -0
- package/packages/multi-chat/img/end-voice.png +0 -0
- package/packages/multi-chat/img/event-active.png +0 -0
- package/packages/multi-chat/img/event.png +0 -0
- package/packages/multi-chat/img/exp.png +0 -0
- package/packages/multi-chat/img/full-sceen-close.png +0 -0
- package/packages/multi-chat/img/full-sceen.png +0 -0
- package/packages/multi-chat/img/icon_list.png +0 -0
- package/packages/multi-chat/img/icon_list_active.png +0 -0
- package/packages/multi-chat/img/icon_table.png +0 -0
- package/packages/multi-chat/img/icon_table_active.png +0 -0
- package/packages/multi-chat/img/join-video.png +0 -0
- package/packages/multi-chat/img/large.png +0 -0
- package/packages/multi-chat/img/left-wrapper.png +0 -0
- package/packages/multi-chat/img/left.png +0 -0
- package/packages/multi-chat/img/medical_record.png +0 -0
- package/packages/multi-chat/img/middle.png +0 -0
- package/packages/multi-chat/img/msgTip.mp3 +0 -0
- package/packages/multi-chat/img/multi-video.png +0 -0
- package/packages/multi-chat/img/multi-voice.png +0 -0
- package/packages/multi-chat/img/mute-audio.png +0 -0
- package/packages/multi-chat/img/muted-audio.png +0 -0
- package/packages/multi-chat/img/muted-screen.png +0 -0
- package/packages/multi-chat/img/muted-video.png +0 -0
- package/packages/multi-chat/img/no-all-voice.png +0 -0
- package/packages/multi-chat/img/no-data.png +0 -0
- package/packages/multi-chat/img/no-data2.png +0 -0
- package/packages/multi-chat/img/no-screen.png +0 -0
- package/packages/multi-chat/img/no-video.png +0 -0
- package/packages/multi-chat/img/no-voice.png +0 -0
- package/packages/multi-chat/img/no-voiced.png +0 -0
- package/packages/multi-chat/img/normal-screen.png +0 -0
- package/packages/multi-chat/img/normal-video.png +0 -0
- package/packages/multi-chat/img/over.png +0 -0
- package/packages/multi-chat/img/portrait.png +0 -0
- package/packages/multi-chat/img/prescription.png +0 -0
- package/packages/multi-chat/img/receive.png +0 -0
- package/packages/multi-chat/img/reject.png +0 -0
- package/packages/multi-chat/img/remove.png +0 -0
- package/packages/multi-chat/img/required.png +0 -0
- package/packages/multi-chat/img/screen.png +0 -0
- package/packages/multi-chat/img/send_prescription.png +0 -0
- package/packages/multi-chat/img/setting.png +0 -0
- package/packages/multi-chat/img/small.png +0 -0
- package/packages/multi-chat/img/sound.png +0 -0
- package/packages/multi-chat/img/sound_forbid.png +0 -0
- package/packages/multi-chat/img/start_video.png +0 -0
- package/packages/multi-chat/img/system_message.png +0 -0
- package/packages/multi-chat/img/to-session.png +0 -0
- package/packages/multi-chat/img/transfer.png +0 -0
- package/packages/multi-chat/img/transfer2.png +0 -0
- package/packages/multi-chat/img/video-accept.png +0 -0
- package/packages/multi-chat/img/video.png +0 -0
- package/packages/multi-chat/img/video_consult.png +0 -0
- package/packages/multi-chat/img/voice.png +0 -0
- package/packages/multi-chat/img/worktime-active.png +0 -0
- package/packages/multi-chat/img/worktime.png +0 -0
- package/packages/multi-chat/index.js +0 -7
- package/packages/multi-chat/setting/authority/index.vue +0 -156
- package/packages/multi-chat/setting/authority/roleSetting.vue +0 -204
- package/packages/multi-chat/setting/baseInfo/index.vue +0 -1241
- package/packages/multi-chat/setting/configuration/index.vue +0 -277
- package/packages/multi-chat/setting/customerService/batchSelect.vue +0 -403
- package/packages/multi-chat/setting/customerService/index.vue +0 -273
- package/packages/multi-chat/setting/event/edit/condition.vue +0 -128
- package/packages/multi-chat/setting/event/edit/index.vue +0 -437
- package/packages/multi-chat/setting/event/edit/notice.vue +0 -129
- package/packages/multi-chat/setting/event/edit/strategy.vue +0 -98
- package/packages/multi-chat/setting/event/index.vue +0 -249
- package/packages/multi-chat/setting/index.vue +0 -269
- package/packages/multi-chat/setting/page.vue +0 -14
- package/packages/multi-chat/setting/sessionList/index.vue +0 -412
- package/packages/multi-chat/setting/sessionList/messageRecord.vue +0 -372
- package/packages/multi-chat/setting/userConfig/index.vue +0 -124
- package/packages/multi-chat/setting/worktime/index.vue +0 -274
- package/packages/multi-chat/store/actions.js +0 -448
- package/packages/multi-chat/store/getters.js +0 -353
- package/packages/multi-chat/store/helper.js +0 -66
- package/packages/multi-chat/store/index.js +0 -50
- package/packages/multi-chat/store/mutation.js +0 -278
- package/packages/multi-chat/store/state.js +0 -111
- package/packages/multi-chat/style/emoji.css +0 -315
- package/packages/multi-chat/style/message.mixin.less +0 -38
- package/packages/multi-chat/utils/chatSock.js +0 -93
- package/packages/multi-chat/utils/compressImage.js +0 -115
- package/packages/multi-chat/utils/emoji.json +0 -68
- package/packages/multi-chat/utils/index.js +0 -181
- package/packages/multi-chat/utils/observer-scroll.js +0 -49
- package/packages/multi-chat/utils/panelsetting.js +0 -48
- package/packages/multi-chat/utils/rtc-client-multi.js +0 -376
- package/packages/multi-chat/utils/rtc-client.js +0 -381
- package/packages/multi-chat-client/index.js +0 -7
- package/packages/multi-chat-history/index.js +0 -7
- package/packages/multi-chat-record/index.js +0 -7
- package/packages/multi-chat-setting/index.js +0 -7
- package/packages/multi-chat-sip/index.js +0 -6
- package/packages/notification/index.js +0 -8
- package/packages/page-header/index.js +0 -12
- package/packages/page-header/src/PageHeader.jsx +0 -11
- package/packages/pagination/index.js +0 -12
- package/packages/pagination/src/Pagination.jsx +0 -11
- package/packages/popconfirm/index.js +0 -12
- package/packages/popconfirm/src/Popconfirm.jsx +0 -11
- package/packages/popover/index.js +0 -12
- package/packages/popover/src/Popover.jsx +0 -11
- package/packages/progress/index.js +0 -12
- package/packages/progress/src/Progress.jsx +0 -11
- package/packages/radio/index.js +0 -33
- package/packages/radio/src/Group.jsx +0 -11
- package/packages/radio/src/Radio.jsx +0 -11
- package/packages/radio/src/RadioButton.jsx +0 -11
- package/packages/radio/src/RadioImg/index.vue +0 -125
- package/packages/rate/index.js +0 -12
- package/packages/rate/src/Rate.jsx +0 -11
- package/packages/result/index.js +0 -12
- package/packages/result/src/Result.jsx +0 -11
- package/packages/row/index.js +0 -12
- package/packages/row/src/Row.jsx +0 -11
- package/packages/scale-view/answerParse.vue +0 -124
- package/packages/scale-view/customList.vue +0 -801
- package/packages/scale-view/data.js +0 -80
- package/packages/scale-view/evaluateCountdown.vue +0 -155
- package/packages/scale-view/evaluatePage.vue +0 -202
- package/packages/scale-view/formitem/data.js +0 -3991
- package/packages/scale-view/formitem/index.js +0 -6
- package/packages/scale-view/formitem/r-address.vue +0 -238
- package/packages/scale-view/formitem/r-choice.vue +0 -534
- package/packages/scale-view/formitem/r-input.vue +0 -96
- package/packages/scale-view/formitem/r-prompt.vue +0 -52
- package/packages/scale-view/formitem/r-time.vue +0 -285
- package/packages/scale-view/formitem/r-upload-custom-list.vue +0 -242
- package/packages/scale-view/formitem/r-upload.vue +0 -287
- package/packages/scale-view/formitem/text-over-tooltip/TextOverTooltip.vue +0 -98
- package/packages/scale-view/index.js +0 -17
- package/packages/scale-view/mixin/NoData.js +0 -24
- package/packages/scale-view/mixin/evaluate.js +0 -146
- package/packages/scale-view/mixin/index.js +0 -337
- package/packages/scale-view/mixin/judgeTypes.js +0 -267
- package/packages/scale-view/scaleView.vue +0 -1836
- package/packages/select/index.js +0 -27
- package/packages/select/src/CustomSelect/index.vue +0 -130
- package/packages/select/src/OptGroup.jsx +0 -11
- package/packages/select/src/Option.jsx +0 -11
- package/packages/select/src/Select.jsx +0 -11
- package/packages/select/src/TableSelect/index.vue +0 -497
- package/packages/select-label/index.js +0 -14
- package/packages/select-label/label-classify.vue +0 -129
- package/packages/select-label/labelFormContent.vue +0 -787
- package/packages/select-label/select-label.vue +0 -581
- package/packages/select-person/index.js +0 -10
- package/packages/select-person/search-tree.vue +0 -373
- package/packages/select-person/select-person.vue +0 -1302
- package/packages/skeleton/index.js +0 -12
- package/packages/skeleton/src/Skeleton.jsx +0 -11
- package/packages/slider/index.js +0 -12
- package/packages/slider/src/Slider.jsx +0 -11
- package/packages/space/index.js +0 -12
- package/packages/space/src/Space.jsx +0 -11
- package/packages/spin/index.js +0 -12
- package/packages/spin/src/Spin.jsx +0 -11
- package/packages/statistic/index.js +0 -18
- package/packages/statistic/src/Countdown.jsx +0 -11
- package/packages/statistic/src/Statistic.jsx +0 -11
- package/packages/steps/index.js +0 -18
- package/packages/steps/src/Step.jsx +0 -11
- package/packages/steps/src/Steps.jsx +0 -11
- package/packages/switch/index.js +0 -12
- package/packages/switch/src/Switch.jsx +0 -11
- package/packages/table-filter/index.js +0 -27
- package/packages/table-filter/src/base-search-com/BaseSearch.vue +0 -2442
- package/packages/table-filter/src/classification/Classification-com.vue +0 -1756
- package/packages/table-filter/src/classification/search-class-name.vue +0 -266
- package/packages/table-filter/src/classification/search-professional-model.vue +0 -680
- package/packages/table-filter/src/components/TextOverTooltip.vue +0 -107
- package/packages/table-filter/src/components/age-com/index.vue +0 -205
- package/packages/table-filter/src/components/button-group/ButtonGroup.vue +0 -162
- package/packages/table-filter/src/components/button-icon/button-icon.js +0 -33
- package/packages/table-filter/src/components/button-icon/getBtnIcon.js +0 -34
- package/packages/table-filter/src/components/c-tree-select/tree-select.vue +0 -336
- package/packages/table-filter/src/components/drop-button/drop-button.vue +0 -224
- package/packages/table-filter/src/components/drop-button/head-btn-icon.js +0 -33
- package/packages/table-filter/src/components/drop-view/drop-view.vue +0 -89
- package/packages/table-filter/src/components/multi-select/multi-select.vue +0 -215
- package/packages/table-filter/src/components/out-quick-search/out-quick-search.vue +0 -337
- package/packages/table-filter/src/components/range-age/index.vue +0 -172
- package/packages/table-filter/src/components/search-condition/SearchCondition.vue +0 -1819
- package/packages/table-filter/src/components/search-condition/fieldTypeList.js +0 -169
- package/packages/table-filter/src/components/search-filter/SearchFilter.vue +0 -270
- package/packages/table-filter/src/components/search-modal/set-classification.vue +0 -310
- package/packages/table-filter/src/components/table-modal/TableModal.vue +0 -463
- package/packages/table-filter/src/const/index.js +0 -1
- package/packages/table-filter/src/index.vue +0 -584
- package/packages/table-filter/src/mixins/mixins.js +0 -682
- package/packages/table-filter/src/mixins/tableSearchCon.js +0 -128
- package/packages/table-filter/src/mixins/wordBookutils.js +0 -102
- package/packages/table-filter/src/quick-search/QuickSearch.vue +0 -2006
- package/packages/tabs/index.js +0 -18
- package/packages/tabs/src/TabPane.jsx +0 -11
- package/packages/tabs/src/Tabs.jsx +0 -11
- package/packages/tag/index.js +0 -21
- package/packages/tag/src/CheckableTag.jsx +0 -11
- package/packages/tag/src/Tag.jsx +0 -11
- package/packages/tag/src/TagGroup.vue +0 -622
- package/packages/time-picker/index.js +0 -12
- package/packages/time-picker/src/TimePicker.jsx +0 -11
- package/packages/timeline/index.js +0 -14
- package/packages/timeline/src/Item.jsx +0 -11
- package/packages/timeline/src/Timeline.jsx +0 -11
- package/packages/tooltip/index.js +0 -12
- package/packages/tooltip/src/Tooltip.jsx +0 -11
- package/packages/transfer/index.js +0 -12
- package/packages/transfer/src/Transfer.jsx +0 -11
- package/packages/tree/index.js +0 -18
- package/packages/tree/src/Tree.jsx +0 -11
- package/packages/tree/src/TreeNode.jsx +0 -11
- package/packages/tree-select/index.js +0 -18
- package/packages/tree-select/src/TreeNode.jsx +0 -11
- package/packages/tree-select/src/TreeSelect.jsx +0 -11
- package/packages/upload/chunk-upload/chunk-upload-new.vue +0 -1001
- package/packages/upload/chunk-upload/vod-chunk-upload.vue +0 -749
- package/packages/upload/chunk-upload/vod-upload-modal.vue +0 -100
- package/packages/upload/index.js +0 -12
- package/packages/upload/src/Upload.jsx +0 -11
- package/packages/verification-code/SlideVerify.vue +0 -306
- package/packages/verification-code/index.js +0 -17
- package/packages/verification-code/verification-code.vue +0 -147
- package/src/assets/img/success.png +0 -0
- package/src/assets/img/video.png +0 -0
- package/src/assets/img/video_default_cover.png +0 -0
- package/src/assets/img/video_hover.png +0 -0
- package/src/assets/img/video_play_hover.png +0 -0
- package/src/component/player-vod/index.vue +0 -57
- package/src/component/player-vod/player.vue +0 -188
- package/src/component/player-vod/video-list.vue +0 -262
- package/src/component/player-vod/video-modal.vue +0 -128
- package/src/component/select-pages/index.vue +0 -74
- package/src/component/svg/index.vue +0 -59
- package/src/core/create.js +0 -6
- package/src/core/event.js +0 -23
- package/src/core/table-methods.js +0 -444
- package/src/directive/flexibleResize.js +0 -151
- package/src/directive/scroll.js +0 -230
- package/src/global/variable.js +0 -2
- package/src/style/normalize.css +0 -424
- package/src/style/style.less +0 -49
- package/src/utils/UniRTCv2.js +0 -561
- package/src/utils/chatFetch.js +0 -61
- package/src/utils/clickoutside.js +0 -75
- package/src/utils/crypto.js +0 -25
- package/src/utils/kty-sdk.js +0 -582
- package/src/utils/kty.min-1.0.0.js +0 -14378
- package/src/utils/sip-device.js +0 -79
- package/src/utils/time-domain.js +0 -193
- package/src/utils/utils-map.js +0 -450
- package/src/utils/vexutils.js +0 -811
|
@@ -1,1446 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="message-wrapper">
|
|
3
|
-
<chat-header :hideHeader="hideHeader" @openPortraitPanel="handleOpenPortraitPanel" v-if="isServer && enable"></chat-header>
|
|
4
|
-
<a-layout-content>
|
|
5
|
-
<slot></slot>
|
|
6
|
-
<div v-if="showBroadcast" class="broadcast-wrap">
|
|
7
|
-
<div v-if="broadcastCarousel" class="carousel-item" :class="{ 'has-link': assemblySetting.broadcast.PC.list[0].url }" @click="goToBroadcastLink(assemblySetting.broadcast.PC.list[0])">
|
|
8
|
-
<a-icon type="sound" />
|
|
9
|
-
<span class="ellips">
|
|
10
|
-
{{ assemblySetting.broadcast.PC.list[0].content }}
|
|
11
|
-
</span>
|
|
12
|
-
</div>
|
|
13
|
-
<template v-else>
|
|
14
|
-
<a-carousel dotPosition="right" autoplay :dots="false">
|
|
15
|
-
<div class="carousel-item" v-for="(item, i) in assemblySetting.broadcast.PC.list" :key="i" :class="{ 'has-link': item.url }" @click="goToBroadcastLink(item)">
|
|
16
|
-
<a-icon type="sound" />
|
|
17
|
-
<span class="ellips">{{ item.content }}</span>
|
|
18
|
-
</div>
|
|
19
|
-
</a-carousel>
|
|
20
|
-
</template>
|
|
21
|
-
</div>
|
|
22
|
-
<div v-if="sessionHistoryList.length > 1 && !(!onChating && currentTab === 'end') && !sessionEnd" style="position: absolute; top: 0; left: 20px; z-index: 1">
|
|
23
|
-
<a-radio-group :value="selectedSession" @change="handleSessionIdChange" buttonStyle="solid">
|
|
24
|
-
<a-radio-button :value="item.id + '-' + item.fromId" v-for="item in sessionHistoryList" :key="item.id + item.fromId">{{ item.fromName }}</a-radio-button>
|
|
25
|
-
</a-radio-group>
|
|
26
|
-
</div>
|
|
27
|
-
<div class="online-message" ref="message-wrapper" v-infinite-scroll="handleInfiniteOnLoad" @scroll="scrollEvent">
|
|
28
|
-
<template v-for="(item, index) in msgList">
|
|
29
|
-
<div :key="index" v-if="item">
|
|
30
|
-
<p v-if="isNeedShowTime(item, index)" class="message-time">
|
|
31
|
-
{{ formatDate(item.createdTime) }}
|
|
32
|
-
</p>
|
|
33
|
-
<div v-if="item.recallFlag" style="margin: 10px 0">
|
|
34
|
-
<template v-if="handleRecallFlag(item)">
|
|
35
|
-
{{ getRecallText(item, isServer) }}
|
|
36
|
-
<a style="text-decoration: underline" @click="reEditMessage(item)" v-if="[0, 4].includes(item.content && item.content.type) && onChating && isServer">,{{ i18nText('1.9.368') }}</a>
|
|
37
|
-
</template>
|
|
38
|
-
<template v-else>
|
|
39
|
-
{{ getRecallText(item) || `${item.fromName} ${i18nText('1.9.365')}` }}
|
|
40
|
-
</template>
|
|
41
|
-
</div>
|
|
42
|
-
<!-- 系统消息 -->
|
|
43
|
-
<div class="system-msg" v-else-if="isSystemMsg(item)">
|
|
44
|
-
<a-icon class="system-icon" theme="filled" type="exclamation-circle" />
|
|
45
|
-
<div>
|
|
46
|
-
<span v-html="getSystemMsgContent(item)"></span>
|
|
47
|
-
<span class="system-btn" v-for="(btn, index) in getTemplateButton(item)" @click="handleTemplateButton(btn)" :key="index">{{ btn.title }}</span>
|
|
48
|
-
</div>
|
|
49
|
-
</div>
|
|
50
|
-
<div
|
|
51
|
-
v-else-if="!item.recallFlag"
|
|
52
|
-
class="message-item"
|
|
53
|
-
:class="[getMessageItemClass(item), { 'read-status': enableReadRecord && item.readStatus }]"
|
|
54
|
-
:data-rid="item.readStatus === 'N' ? item.id : ''"
|
|
55
|
-
>
|
|
56
|
-
<img v-if="!isServer && item.fromPortrait" class="msg-avatar" :src="item.fromPortrait" />
|
|
57
|
-
|
|
58
|
-
<div v-else-if="!isServer && item.fromName" class="first-name">
|
|
59
|
-
{{ item.fromName && item.fromName.slice(0, 2) }}
|
|
60
|
-
</div>
|
|
61
|
-
<img v-else-if="!isServer" class="msg-avatar" :src="getAvatar(item)" width="40" height="40" />
|
|
62
|
-
|
|
63
|
-
<template v-else>
|
|
64
|
-
<img :src="customerStaffIcon" class="msg-avatar" width="40" height="40" v-if="item.fromId === 'SYSTEM'" />
|
|
65
|
-
|
|
66
|
-
<img src="../img/system_message.png" class="msg-avatar" width="40" height="40" v-else-if="item.content && item.content.source === 1" />
|
|
67
|
-
|
|
68
|
-
<img v-else-if="item.portrait" class="msg-avatar" :src="item.portrait" />
|
|
69
|
-
|
|
70
|
-
<div v-else class="first-name">
|
|
71
|
-
{{ item.fromName && item.fromName.slice(0, 2) }}
|
|
72
|
-
</div>
|
|
73
|
-
</template>
|
|
74
|
-
<div @contextmenu="handleContextmenu($event, item)" style="display: flex">
|
|
75
|
-
<a-spin v-if="item.sending">
|
|
76
|
-
<a-icon slot="indicator" type="loading" style="font-size: 24px" spin />
|
|
77
|
-
</a-spin>
|
|
78
|
-
<a-popconfirm @confirm="handleSendFail(item)" :okText="i18nText('1.1.1.1.3')" :cancelText="i18nText('2.7.1.14')">
|
|
79
|
-
<a-icon type="exclamation-circle" slot="icon" />
|
|
80
|
-
<div slot="title">
|
|
81
|
-
<span>确认重新发送该消息?</span>
|
|
82
|
-
</div>
|
|
83
|
-
<a-icon v-if="item.fail" theme="filled" type="exclamation-circle" style="font-size: 16px; display: flex; align-items: center; color: red" />
|
|
84
|
-
</a-popconfirm>
|
|
85
|
-
<div class="content-wrap" v-if="item.content.type === 0">
|
|
86
|
-
<span class="right-time">
|
|
87
|
-
{{ formatDate(item.createdTime || item.sendTime, true) }}
|
|
88
|
-
</span>
|
|
89
|
-
<div
|
|
90
|
-
:class="{
|
|
91
|
-
content: true,
|
|
92
|
-
'has-dictionary': item.dictionaryValues && item.dictionaryValues.length,
|
|
93
|
-
'has-intention': item.intentionList && item.intentionList.length
|
|
94
|
-
}"
|
|
95
|
-
>
|
|
96
|
-
<p v-html="item.content.content"></p>
|
|
97
|
-
<template v-if="item.content.attachments && item.content.attachments.length > 0">
|
|
98
|
-
<div v-for="(v, index) in item.content.attachments" :key="index" class="robot-item">
|
|
99
|
-
<a v-if="v.type == 1" :href="v.url" target="_blank"> {{ v.desc }}(超链) </a>
|
|
100
|
-
<a @click.prevent.stop="$emit('sendQuestion', v, item)" v-if="v.type == 2 || v.type == 3" href="javascript:void(0);">
|
|
101
|
-
{{ v.desc }}
|
|
102
|
-
</a>
|
|
103
|
-
</div>
|
|
104
|
-
</template>
|
|
105
|
-
<div v-if="item.intentionList && item.intentionList.length" class="intention-wrap">
|
|
106
|
-
<div v-for="(v, index) in item.intentionList" :key="index" @click.prevent.stop="$emit('sendIntention', v)">
|
|
107
|
-
<svg-icon :icon-class="v.icon || 'moren'" style="font-size: 26px"></svg-icon>
|
|
108
|
-
<span>{{ v.name }}</span>
|
|
109
|
-
</div>
|
|
110
|
-
</div>
|
|
111
|
-
</div>
|
|
112
|
-
<ul class="dictionary-ul" v-if="item.dictionaryValues && item.dictionaryValues.length">
|
|
113
|
-
<li v-for="(v, i) in item.dictionaryValues" :key="i" @click.prevent.stop="$emit('sendDictionary', v, item)">
|
|
114
|
-
{{ v }}
|
|
115
|
-
</li>
|
|
116
|
-
</ul>
|
|
117
|
-
<div class="client-btn" v-if="item.autoAccess && item.autoAccess === 'false'">
|
|
118
|
-
<svg-icon icon-class="kefu"></svg-icon>
|
|
119
|
-
<span @click="$emit('goCustomServe')">转人工客服</span>
|
|
120
|
-
</div>
|
|
121
|
-
</div>
|
|
122
|
-
<div v-else-if="item.content.type === 1" class="upload-image">
|
|
123
|
-
<MsgPicture style="max-width: 345px" :image="item.content.content" @click="show(item)" />
|
|
124
|
-
</div>
|
|
125
|
-
<div class="content-wrap" v-else-if="item.content.type === 2">
|
|
126
|
-
<span class="right-time">
|
|
127
|
-
{{ formatDate(item.createdTime || item.sendTime, true) }}
|
|
128
|
-
</span>
|
|
129
|
-
<div class="content">
|
|
130
|
-
<img style="width: 16px;margin-right:8px" src="../img/multi-video.png" />
|
|
131
|
-
{{ item.content.content }}
|
|
132
|
-
<span @click.prevent.stop="reCall(item, 'video')" class="re-call" v-if="item.content.isRefuse == 1">
|
|
133
|
-
{{ handleReCall(item) }}
|
|
134
|
-
</span>
|
|
135
|
-
</div>
|
|
136
|
-
</div>
|
|
137
|
-
<div class="content-wrap" v-else-if="item.content.type === 5">
|
|
138
|
-
<span class="right-time">
|
|
139
|
-
{{ formatDate(item.createdTime || item.sendTime, true) }}
|
|
140
|
-
</span>
|
|
141
|
-
<div class="content">
|
|
142
|
-
<img style="width: 16px;margin-right:8px" src="../img/multi-voice.png" />
|
|
143
|
-
{{ item.content.content }}
|
|
144
|
-
<span @click.prevent.stop="reCall(item, 'voice')" class="re-call" v-if="item.content.isRefuse == 1">
|
|
145
|
-
{{ handleReCall(item) }}
|
|
146
|
-
</span>
|
|
147
|
-
</div>
|
|
148
|
-
</div>
|
|
149
|
-
<div class="content-wrap" v-else-if="item.content.type === 6">
|
|
150
|
-
<span class="right-time">
|
|
151
|
-
{{ formatDate(item.createdTime || item.sendTime, true) }}
|
|
152
|
-
</span>
|
|
153
|
-
<div class="voice-bg content" @click.prevent.stop="playAudio(item)">
|
|
154
|
-
<img v-if="item.content.isPlay" src="../img/audio-play.gif" alt="" />
|
|
155
|
-
<img v-else src="../img/audio-new.png" alt="" />
|
|
156
|
-
<span class="voice-text" :style="AudioStyle(item)"> {{ item.content.duration || 1 }}" </span>
|
|
157
|
-
</div>
|
|
158
|
-
</div>
|
|
159
|
-
<template v-else-if="item.content.type === 4">
|
|
160
|
-
<msg-describe v-if="isDescribeMsg(item)" :item="item" />
|
|
161
|
-
<div v-else class="content-wrap">
|
|
162
|
-
<span class="right-time">
|
|
163
|
-
{{ formatDate(item.createdTime || item.sendTime, true) }}
|
|
164
|
-
</span>
|
|
165
|
-
<MsgPrescription :data="item" :isServer="isServer" :theme="isServer ? '' : 'customer'" @handleTemplateDetail="handleTemplateDetail" @handleTemplateButton="handleTemplateButton" />
|
|
166
|
-
</div>
|
|
167
|
-
</template>
|
|
168
|
-
</div>
|
|
169
|
-
<ReadStatus v-if="enableReadRecord" :status="item.readStatus" @click="openReadRecord($event, item)" />
|
|
170
|
-
</div>
|
|
171
|
-
</div>
|
|
172
|
-
</template>
|
|
173
|
-
<ul class="menu-main" ref="contextMenu" :style="contextMenuStyle" v-if="contextMenuShow">
|
|
174
|
-
<template v-for="(item, index) in rightClickSetting">
|
|
175
|
-
<li :key="index" class="menu-item" @click="() => handleRightClick(contextMenuItem, item)">
|
|
176
|
-
{{ item.rightClickName }}
|
|
177
|
-
</li>
|
|
178
|
-
</template>
|
|
179
|
-
</ul>
|
|
180
|
-
<div class="session-end" v-if="sessionEnd && !isServer">
|
|
181
|
-
<span class="end">{{ i18nText('1.9.370') }}</span>
|
|
182
|
-
</div>
|
|
183
|
-
<a-spin v-if="loading" class="loading-icon" />
|
|
184
|
-
</div>
|
|
185
|
-
<!-- 图片预览 -->
|
|
186
|
-
<viewer class="viewer" ref="viewer" :images="images" @inited="inited" style="display: none">
|
|
187
|
-
<template slot-scope="scope">
|
|
188
|
-
<img v-for="src in scope.images" :src="src" :key="src" />
|
|
189
|
-
</template>
|
|
190
|
-
</viewer>
|
|
191
|
-
<!-- 卡片详情 -->
|
|
192
|
-
<a-modal
|
|
193
|
-
wrapClassName="chat-footer-modal-small"
|
|
194
|
-
:title="modalData.title || i18nText('1.1.1.10')"
|
|
195
|
-
:visible="modalShow"
|
|
196
|
-
:maskClosable="false"
|
|
197
|
-
:mask="true"
|
|
198
|
-
width="80%"
|
|
199
|
-
destroyOnClose
|
|
200
|
-
:okText="i18nText('1.2.1.11.6')"
|
|
201
|
-
:footer="null"
|
|
202
|
-
@cancel="
|
|
203
|
-
() => {
|
|
204
|
-
this.modalShow = false;
|
|
205
|
-
}
|
|
206
|
-
"
|
|
207
|
-
>
|
|
208
|
-
<iframe id="chat-footer-modal" v-if="modalData.targetType === 'LINK_ADDRESS'" width="100%" height="100%" frameborder="0" :src="modalData.address" allow="camera;midi"></iframe>
|
|
209
|
-
</a-modal>
|
|
210
|
-
</a-layout-content>
|
|
211
|
-
<audio style="display: none" controls autoplay ref="audio" preload="auto" crossOrigin="anonymous" media-player="audioPlayer" :src="curAudioUrl" @ended="audioEnd"></audio>
|
|
212
|
-
<ReadRecord v-if="readRecordVisible" :style="readRecordStyle" :list="readRecordList" @close="closeReadRecord" />
|
|
213
|
-
</div>
|
|
214
|
-
</template>
|
|
215
|
-
|
|
216
|
-
<script>
|
|
217
|
-
import { Layout, Modal, Icon, Spin, Popconfirm, Carousel, Radio } from 'ant-design-vue';
|
|
218
|
-
import SvgIcon from '@/component/svg/index.vue';
|
|
219
|
-
import InfiniteScroll from '@/directive/scroll';
|
|
220
|
-
import { mapGetters, mapMutations, mapActions } from '../store/helper';
|
|
221
|
-
import fetch, { qs } from '@/utils/chatFetch';
|
|
222
|
-
import MsgDescribe from '../components/msg-describe';
|
|
223
|
-
import MsgPicture from '../components/msg-picture';
|
|
224
|
-
import MsgPrescription from '../components/msg-prescription';
|
|
225
|
-
import ReadStatus from '../components/read-status';
|
|
226
|
-
import ReadRecord from '../components/read-record';
|
|
227
|
-
import chatHeader from './chatHeader';
|
|
228
|
-
import 'viewerjs/dist/viewer.css';
|
|
229
|
-
import { component as Viewer } from "v-viewer";
|
|
230
|
-
// import Viewer from 'v-viewer/src/component.vue';
|
|
231
|
-
import { getRecallText } from '../utils';
|
|
232
|
-
import vexutils from '@/utils/vexutils';
|
|
233
|
-
import ObserverScroll from '../utils/observer-scroll';
|
|
234
|
-
|
|
235
|
-
const customerStaffIcon = require('../img/customer_staff.png');
|
|
236
|
-
export default {
|
|
237
|
-
inject: ['store', 'dispatchEvent', 'registerEvent', 'unregisterEvent', 'i18nText'],
|
|
238
|
-
props: {
|
|
239
|
-
hideHeader: {
|
|
240
|
-
type: Boolean,
|
|
241
|
-
default: false
|
|
242
|
-
},
|
|
243
|
-
robotAvatar: {
|
|
244
|
-
type: String,
|
|
245
|
-
default: ''
|
|
246
|
-
},
|
|
247
|
-
curChatType: {
|
|
248
|
-
type: String
|
|
249
|
-
},
|
|
250
|
-
isShowPortraitPanel: {
|
|
251
|
-
type: Boolean
|
|
252
|
-
},
|
|
253
|
-
activatedTime: {
|
|
254
|
-
type: Number
|
|
255
|
-
}
|
|
256
|
-
},
|
|
257
|
-
data() {
|
|
258
|
-
return {
|
|
259
|
-
loading: false,
|
|
260
|
-
// 卡片详情
|
|
261
|
-
modalShow: false,
|
|
262
|
-
modalData: {},
|
|
263
|
-
// 客户头像
|
|
264
|
-
// 右键操作
|
|
265
|
-
contextMenuStyle: {
|
|
266
|
-
position: 'fixed',
|
|
267
|
-
top: 0,
|
|
268
|
-
left: 0
|
|
269
|
-
},
|
|
270
|
-
contextMenuShow: false,
|
|
271
|
-
contextMenuItem: null,
|
|
272
|
-
// 查看历史消息滚动定位
|
|
273
|
-
scrollHeight: 0,
|
|
274
|
-
curAudioUrl: '',
|
|
275
|
-
lastAudioItem: null,
|
|
276
|
-
readRecordStyle: '',
|
|
277
|
-
readRecordVisible: false,
|
|
278
|
-
readRecordList: []
|
|
279
|
-
};
|
|
280
|
-
},
|
|
281
|
-
computed: {
|
|
282
|
-
...mapGetters([
|
|
283
|
-
'userInfo',
|
|
284
|
-
'currentTab',
|
|
285
|
-
'isAppendMsg',
|
|
286
|
-
'message',
|
|
287
|
-
'msgList',
|
|
288
|
-
'sessionId',
|
|
289
|
-
'serviceId',
|
|
290
|
-
'scrollTo',
|
|
291
|
-
'isServer',
|
|
292
|
-
'clientId',
|
|
293
|
-
'sessionEnd',
|
|
294
|
-
'assemblyId',
|
|
295
|
-
'footerMessage',
|
|
296
|
-
'portraitPanelParams',
|
|
297
|
-
'assemblySetting',
|
|
298
|
-
'clientParams',
|
|
299
|
-
'onChating',
|
|
300
|
-
'classify',
|
|
301
|
-
'collapsed',
|
|
302
|
-
'barStatus',
|
|
303
|
-
'sessionHistoryList',
|
|
304
|
-
'enable',
|
|
305
|
-
'appendList',
|
|
306
|
-
'queueItem',
|
|
307
|
-
'isRecorderVoice'
|
|
308
|
-
]),
|
|
309
|
-
orgId() {
|
|
310
|
-
const getters = this.store.getters;
|
|
311
|
-
return this.isServer ? this.userInfo?.sysParams?.orgId : getters.accessParams.orgId || getters.queryParams.orgId;
|
|
312
|
-
},
|
|
313
|
-
userId() {
|
|
314
|
-
const getters = this.store.getters;
|
|
315
|
-
return this.isServer ? this.userInfo?.sysParams?.userId : getters.accessParams.userId || getters.chatUserId || getters.queryParams.userId;
|
|
316
|
-
},
|
|
317
|
-
enableReadRecord() {
|
|
318
|
-
return this.assemblySetting?.readStatus === 'Y';
|
|
319
|
-
},
|
|
320
|
-
customerStaffIcon() {
|
|
321
|
-
return this.robotAvatar || customerStaffIcon;
|
|
322
|
-
},
|
|
323
|
-
selectedSession() {
|
|
324
|
-
let sessionMap = this.sessionHistoryList.find(item => item.fromId === this.serviceId);
|
|
325
|
-
if (sessionMap) {
|
|
326
|
-
return sessionMap.id + '-' + sessionMap.fromId;
|
|
327
|
-
}
|
|
328
|
-
return '';
|
|
329
|
-
},
|
|
330
|
-
isListClassify() {
|
|
331
|
-
return this.assemblySetting.isListClassify === 'Y';
|
|
332
|
-
},
|
|
333
|
-
showPanel() {
|
|
334
|
-
return this.assemblySetting.portraitPanelSetting?.targetIs;
|
|
335
|
-
},
|
|
336
|
-
showBroadcast() {
|
|
337
|
-
let res = (!this.isServer && this.assemblySetting?.broadcast?.PC?.isChecked == 'Y' && this.assemblySetting?.broadcast?.PC?.list?.length > 0) || false;
|
|
338
|
-
return res;
|
|
339
|
-
},
|
|
340
|
-
broadcastCarousel() {
|
|
341
|
-
return (this.assemblySetting.broadcast && this.assemblySetting.broadcast.PC.list.length == 1) || false;
|
|
342
|
-
},
|
|
343
|
-
rightClickSetting() {
|
|
344
|
-
const { isServer } = this;
|
|
345
|
-
if (!isServer) return [];
|
|
346
|
-
const isSelf = this.contextMenuItem.fromId === this.serviceId;
|
|
347
|
-
const setting = this.assemblySetting?.rightClickSetting || [];
|
|
348
|
-
const doArr = ['resend', 'rollBack'];
|
|
349
|
-
return setting.filter(item => {
|
|
350
|
-
const { rightClickDo } = item;
|
|
351
|
-
return isSelf || doArr.indexOf(rightClickDo) < 0;
|
|
352
|
-
});
|
|
353
|
-
},
|
|
354
|
-
handleReCall() {
|
|
355
|
-
return function(item) {
|
|
356
|
-
if (item.content?.source === 1) {
|
|
357
|
-
return '[点击回拨]';
|
|
358
|
-
} else if (item.senderFlag == 1) {
|
|
359
|
-
return `[点击${this.isServer ? '回拨' : '重拨'}]`;
|
|
360
|
-
}
|
|
361
|
-
if (item.senderFlag == 2) {
|
|
362
|
-
return `[点击${this.isServer ? '重拨' : '回拨'}]`;
|
|
363
|
-
}
|
|
364
|
-
if (this.isServer) {
|
|
365
|
-
let isRight = item.fromId !== 'SYSTEM' && item.fromId && item.fromId === this.serviceId;
|
|
366
|
-
return `[点击${isRight ? '重拨' : '回拨'}]`;
|
|
367
|
-
} else {
|
|
368
|
-
let isRight = (item.fromId !== 'SYSTEM' && item.toId === 'SYSTEM') || item.fromId === this.clientId || (item.mode === 'bot' && !item.fromId);
|
|
369
|
-
return `[点击${isRight ? '重拨' : '回拨'}]`;
|
|
370
|
-
}
|
|
371
|
-
};
|
|
372
|
-
},
|
|
373
|
-
handleRecallFlag() {
|
|
374
|
-
return function(item) {
|
|
375
|
-
return this.serviceId == item.fromId;
|
|
376
|
-
};
|
|
377
|
-
},
|
|
378
|
-
AudioStyle() {
|
|
379
|
-
return function(item) {
|
|
380
|
-
let { duration = 1 } = item.content;
|
|
381
|
-
if (!duration) {
|
|
382
|
-
duration = 1;
|
|
383
|
-
}
|
|
384
|
-
let curWidth = (+duration / 60) * 400;
|
|
385
|
-
return {
|
|
386
|
-
width: curWidth < 13 ? 13 : curWidth + 'px'
|
|
387
|
-
};
|
|
388
|
-
};
|
|
389
|
-
},
|
|
390
|
-
showTimeDuration() {
|
|
391
|
-
let { variableSetting = null } = this.assemblySetting || {};
|
|
392
|
-
if (!variableSetting) return 3;
|
|
393
|
-
let matchItem = variableSetting.find(v => v.name === 'CHAT_SEPARATION_TIME');
|
|
394
|
-
if (!matchItem) return 3;
|
|
395
|
-
if (!+matchItem.value) return 3;
|
|
396
|
-
return +matchItem.value;
|
|
397
|
-
},
|
|
398
|
-
images() {
|
|
399
|
-
return this.msgList
|
|
400
|
-
.filter(v => !v.recallFlag && v.content.type == 1)
|
|
401
|
-
?.map(v => v.content?.content);
|
|
402
|
-
}
|
|
403
|
-
},
|
|
404
|
-
created() {
|
|
405
|
-
this.attachEvent();
|
|
406
|
-
},
|
|
407
|
-
methods: {
|
|
408
|
-
...mapMutations([
|
|
409
|
-
'setIsAppendMsg',
|
|
410
|
-
'setMsgList',
|
|
411
|
-
'setScrollTo',
|
|
412
|
-
'setFooterMessage',
|
|
413
|
-
'setIsScrollListChange',
|
|
414
|
-
'setListChangeItem',
|
|
415
|
-
'setSessionId',
|
|
416
|
-
'setOnChating',
|
|
417
|
-
'setServiceId',
|
|
418
|
-
'setShowAudio',
|
|
419
|
-
'setVideoMode',
|
|
420
|
-
'setVideoMembers',
|
|
421
|
-
'setIsRecorderVoice'
|
|
422
|
-
]),
|
|
423
|
-
...mapActions({
|
|
424
|
-
getEarlierMsg: 'setMsgList',
|
|
425
|
-
handleBotChat: 'handleBotChat',
|
|
426
|
-
sendMessage: 'sendMessage'
|
|
427
|
-
}),
|
|
428
|
-
getMessageItemClass(item) {
|
|
429
|
-
// content.source === 1, 代表为系统消息, 系统统一左侧展示
|
|
430
|
-
if (item.content?.source === 1) {
|
|
431
|
-
return {
|
|
432
|
-
left: true
|
|
433
|
-
};
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
// 服务端 senderFlag 1 左 2 右
|
|
437
|
-
// 客户端 senderFlag 1 右 2 左
|
|
438
|
-
if (item.content?.source === 1) {
|
|
439
|
-
return {
|
|
440
|
-
left: true
|
|
441
|
-
};
|
|
442
|
-
} else if (item.senderFlag == 1) {
|
|
443
|
-
if (this.isServer) {
|
|
444
|
-
return {
|
|
445
|
-
left: true
|
|
446
|
-
};
|
|
447
|
-
} else {
|
|
448
|
-
return {
|
|
449
|
-
right: true
|
|
450
|
-
};
|
|
451
|
-
}
|
|
452
|
-
}
|
|
453
|
-
if (item.senderFlag == 2) {
|
|
454
|
-
if (this.isServer) {
|
|
455
|
-
return {
|
|
456
|
-
right: true
|
|
457
|
-
};
|
|
458
|
-
} else {
|
|
459
|
-
return {
|
|
460
|
-
left: true
|
|
461
|
-
};
|
|
462
|
-
}
|
|
463
|
-
}
|
|
464
|
-
if (this.isServer) {
|
|
465
|
-
return {
|
|
466
|
-
right: item.fromId !== 'SYSTEM' && item.fromId && item.fromId === this.serviceId,
|
|
467
|
-
left: item.fromId === 'SYSTEM' || item.fromId === this.clientId || item.content?.source === 1 || !item.fromId
|
|
468
|
-
};
|
|
469
|
-
} else {
|
|
470
|
-
let isRight, isLeft;
|
|
471
|
-
if (this.curChatType == 'robot') {
|
|
472
|
-
isRight = item.fromId !== 'SYSTEM';
|
|
473
|
-
isLeft = item.fromId === 'SYSTEM';
|
|
474
|
-
} else {
|
|
475
|
-
isRight = (item.fromId !== 'SYSTEM' && item.toId === 'SYSTEM') || item.fromId === this.clientId || (item.mode === 'bot' && !item.fromId);
|
|
476
|
-
isLeft = item.fromId === 'SYSTEM' || item.fromId !== this.clientId || item.content?.source === 1;
|
|
477
|
-
}
|
|
478
|
-
return {
|
|
479
|
-
right: isRight,
|
|
480
|
-
left: isLeft
|
|
481
|
-
};
|
|
482
|
-
}
|
|
483
|
-
},
|
|
484
|
-
/* 向上滚动刷新 */
|
|
485
|
-
handleInfiniteOnLoad() {
|
|
486
|
-
if (this.curChatType === 'robot') return;
|
|
487
|
-
this.loading = true;
|
|
488
|
-
this.getEarlierMsg().then(msg => {
|
|
489
|
-
if (msg) {
|
|
490
|
-
this.$message.info(msg);
|
|
491
|
-
}
|
|
492
|
-
this.loading = false;
|
|
493
|
-
});
|
|
494
|
-
},
|
|
495
|
-
inited(viewer) {
|
|
496
|
-
this.$viewer = viewer;
|
|
497
|
-
},
|
|
498
|
-
show(item) {
|
|
499
|
-
const src = item.content.content;
|
|
500
|
-
// this.images = vexutils.imgs2imgArr(src);
|
|
501
|
-
this.$viewer.view(this.images.findIndex(v => v === src));
|
|
502
|
-
this.$viewer.show();
|
|
503
|
-
this.readSingleMsg(item);
|
|
504
|
-
},
|
|
505
|
-
/* 滚动条定位 */
|
|
506
|
-
handleScrollTo(scrollTo) {
|
|
507
|
-
let target = this.$refs['message-wrapper'];
|
|
508
|
-
this.$nextTick().then(() => {
|
|
509
|
-
if (!target) return;
|
|
510
|
-
let top = target.scrollHeight;
|
|
511
|
-
if (scrollTo === 'current') {
|
|
512
|
-
top = target.scrollHeight - this.scrollHeight;
|
|
513
|
-
}
|
|
514
|
-
if(typeof scrollTo === 'number') {
|
|
515
|
-
top = scrollTo;
|
|
516
|
-
}
|
|
517
|
-
target.scrollTo({
|
|
518
|
-
left: 0,
|
|
519
|
-
top,
|
|
520
|
-
behavior: 'instant'
|
|
521
|
-
});
|
|
522
|
-
this.scrollHeight = 0;
|
|
523
|
-
});
|
|
524
|
-
this.setScrollTo('');
|
|
525
|
-
},
|
|
526
|
-
|
|
527
|
-
/**
|
|
528
|
-
* 是否需要显示时间
|
|
529
|
-
*/
|
|
530
|
-
isNeedShowTime(item, index) {
|
|
531
|
-
const curMsgTime = item.createdTime || new Date().getTime();
|
|
532
|
-
let duration = 60 * 1000 * this.showTimeDuration;
|
|
533
|
-
let lastMsgTime;
|
|
534
|
-
if (index == 0) {
|
|
535
|
-
lastMsgTime = 0;
|
|
536
|
-
} else {
|
|
537
|
-
lastMsgTime = this.msgList[index - 1].createdTime;
|
|
538
|
-
}
|
|
539
|
-
if (Number(curMsgTime) - Number(lastMsgTime) > duration) {
|
|
540
|
-
return true;
|
|
541
|
-
} else {
|
|
542
|
-
return false;
|
|
543
|
-
}
|
|
544
|
-
},
|
|
545
|
-
formatDate(date) {
|
|
546
|
-
return vexutils.formatDate(date, true);
|
|
547
|
-
},
|
|
548
|
-
getAvatar(item) {
|
|
549
|
-
if (item.content && item.content.source === 1) {
|
|
550
|
-
return require('../img/system_message.png');
|
|
551
|
-
}
|
|
552
|
-
if (item.mode === 'bot' && !item.fromId) {
|
|
553
|
-
return require('../img/default.png');
|
|
554
|
-
}
|
|
555
|
-
if (this.isServer) {
|
|
556
|
-
if (item.fromId === this.clientId || !item.fromId) {
|
|
557
|
-
return require('../img/default.png');
|
|
558
|
-
} else {
|
|
559
|
-
return this.customerStaffIcon;
|
|
560
|
-
}
|
|
561
|
-
} else {
|
|
562
|
-
if (this.curChatType == 'robot') {
|
|
563
|
-
if (item.fromId === 'SYSTEM') {
|
|
564
|
-
return this.customerStaffIcon;
|
|
565
|
-
} else {
|
|
566
|
-
return require('../img/default.png');
|
|
567
|
-
}
|
|
568
|
-
} else {
|
|
569
|
-
if (item.fromId !== this.clientId) {
|
|
570
|
-
return this.customerStaffIcon;
|
|
571
|
-
} else {
|
|
572
|
-
return require('../img/default.png');
|
|
573
|
-
}
|
|
574
|
-
}
|
|
575
|
-
}
|
|
576
|
-
},
|
|
577
|
-
getContent(item) {
|
|
578
|
-
let content;
|
|
579
|
-
if (vexutils.isJSON(item.content.content)) {
|
|
580
|
-
content = JSON.parse(item.content.content);
|
|
581
|
-
} else {
|
|
582
|
-
content = item.content.content;
|
|
583
|
-
}
|
|
584
|
-
return content;
|
|
585
|
-
},
|
|
586
|
-
getTemplateTitle(item) {
|
|
587
|
-
return this.getContent(item)?.title;
|
|
588
|
-
},
|
|
589
|
-
showArrow(item) {
|
|
590
|
-
let setting = this.getContent(item)?.customerSetting || {};
|
|
591
|
-
if (this.isServer) {
|
|
592
|
-
setting = this.getContent(item)?.serverSetting || {};
|
|
593
|
-
}
|
|
594
|
-
let { address } = setting;
|
|
595
|
-
if (!address) return false;
|
|
596
|
-
return true;
|
|
597
|
-
},
|
|
598
|
-
getTemplateTitleIcon(item) {
|
|
599
|
-
return this.getContent(item)?.icon;
|
|
600
|
-
},
|
|
601
|
-
getTemplateContent(item) {
|
|
602
|
-
let content = this.getContent(item);
|
|
603
|
-
let array = [];
|
|
604
|
-
try {
|
|
605
|
-
array = content.content.split('##');
|
|
606
|
-
} catch {
|
|
607
|
-
console.log(content, 'error');
|
|
608
|
-
}
|
|
609
|
-
array = array.map(item => `<div>${item}</div>`);
|
|
610
|
-
return array.join('');
|
|
611
|
-
},
|
|
612
|
-
getSystemMsgContent(item) {
|
|
613
|
-
let content = this.getContent(item);
|
|
614
|
-
let array = [];
|
|
615
|
-
try {
|
|
616
|
-
array = content.content.split('##');
|
|
617
|
-
} catch {
|
|
618
|
-
console.log(content, 'error');
|
|
619
|
-
}
|
|
620
|
-
return array.join('<br>');
|
|
621
|
-
},
|
|
622
|
-
getTemplateButton(item) {
|
|
623
|
-
let content = this.getContent(item);
|
|
624
|
-
const setting = this.isServer ? content.serverSetting : content.customerSetting;
|
|
625
|
-
return setting?.toolbar_button || [];
|
|
626
|
-
},
|
|
627
|
-
// 处理模板按钮,详情等跳转
|
|
628
|
-
handleTemplate(data, dispatch = true) {
|
|
629
|
-
let { targetType, address, params = [], openMode } = data;
|
|
630
|
-
dispatch &&
|
|
631
|
-
this.dispatchEvent('click_templateCard', {
|
|
632
|
-
...data
|
|
633
|
-
});
|
|
634
|
-
if (!address) return;
|
|
635
|
-
if (targetType === 'LINK_ADDRESS') {
|
|
636
|
-
let urlParams = [];
|
|
637
|
-
params.forEach(({ p_name, p_value }) => {
|
|
638
|
-
urlParams.push(`${p_name}=${p_value}`);
|
|
639
|
-
});
|
|
640
|
-
if (address.includes('?')) {
|
|
641
|
-
address += `&${urlParams.join('&')}`;
|
|
642
|
-
} else {
|
|
643
|
-
address += `?${urlParams.join('&')}`;
|
|
644
|
-
}
|
|
645
|
-
if (openMode === 'WINDOW') {
|
|
646
|
-
window.open(address);
|
|
647
|
-
return;
|
|
648
|
-
}
|
|
649
|
-
if (openMode === 'EJECT') {
|
|
650
|
-
this.modalShow = true;
|
|
651
|
-
this.modalData = Object.assign({}, data, {
|
|
652
|
-
address
|
|
653
|
-
});
|
|
654
|
-
return;
|
|
655
|
-
}
|
|
656
|
-
}
|
|
657
|
-
},
|
|
658
|
-
handleTemplateDetail(item) {
|
|
659
|
-
let content = this.getContent(item) || {};
|
|
660
|
-
let setting = content.customerSetting || {};
|
|
661
|
-
if (this.isServer) {
|
|
662
|
-
setting = content.serverSetting || {};
|
|
663
|
-
}
|
|
664
|
-
this.readSingleMsg(item);
|
|
665
|
-
this.handleTemplate(setting);
|
|
666
|
-
},
|
|
667
|
-
handleTemplateButton(btn) {
|
|
668
|
-
this.handleTemplate(btn);
|
|
669
|
-
},
|
|
670
|
-
// 消息撤回
|
|
671
|
-
handleRecall(item) {
|
|
672
|
-
let params = {
|
|
673
|
-
assemblyId: this.assemblyId,
|
|
674
|
-
sessionId: this.sessionId,
|
|
675
|
-
messageId: item.id,
|
|
676
|
-
messageType: item.content?.type,
|
|
677
|
-
userId: this.userInfo?.sysParams?.userId || ''
|
|
678
|
-
};
|
|
679
|
-
|
|
680
|
-
fetch.post('/chat/service/recallMessage', qs.stringify(params)).then(({ data }) => {
|
|
681
|
-
if (data.result === 'SUCCESS') {
|
|
682
|
-
this.dispatchEvent('msg_recallSuccess', {
|
|
683
|
-
message: { ...item },
|
|
684
|
-
...params
|
|
685
|
-
});
|
|
686
|
-
this.$set(item, 'recallFlag', 1);
|
|
687
|
-
// 撤回成功提示
|
|
688
|
-
let title = this.getContent(item)?.title;
|
|
689
|
-
let text = title ? `已撤回[${title}]` : '已撤回';
|
|
690
|
-
this.$message.success(text);
|
|
691
|
-
|
|
692
|
-
if (!this.isLastMessage(item.id)) return;
|
|
693
|
-
this.setIsScrollListChange(true);
|
|
694
|
-
this.setListChangeItem({
|
|
695
|
-
opt: 1,
|
|
696
|
-
from: this.clientId,
|
|
697
|
-
sessionId: this.sessionId,
|
|
698
|
-
msgCount: 0,
|
|
699
|
-
lastContentRecallFlag: 1,
|
|
700
|
-
lastContent: vexutils.clone(item.content, true),
|
|
701
|
-
lastTime: new Date().getTime()
|
|
702
|
-
});
|
|
703
|
-
} else {
|
|
704
|
-
this.$message.error(data.resultMsg);
|
|
705
|
-
}
|
|
706
|
-
});
|
|
707
|
-
},
|
|
708
|
-
handleJumpUrl(contextMenuItem, item) {
|
|
709
|
-
const title = item.rightClickName;
|
|
710
|
-
const url = item.rightClickUrl.replace(/{(.*?)}/g, (match, p) => {
|
|
711
|
-
return eval(p);
|
|
712
|
-
});
|
|
713
|
-
this.dispatchEvent('open_jumpUrl', {
|
|
714
|
-
title: title,
|
|
715
|
-
url: url
|
|
716
|
-
});
|
|
717
|
-
},
|
|
718
|
-
// 右键菜单功能
|
|
719
|
-
handleRightClick(contextMenuItem, item) {
|
|
720
|
-
if (item.rightClickDo === 'rollBack') {
|
|
721
|
-
this.handleRecall(contextMenuItem);
|
|
722
|
-
} else if (item.rightClickDo === 'jumpUrl') {
|
|
723
|
-
this.handleJumpUrl(contextMenuItem, item);
|
|
724
|
-
} else if (item.rightClickDo === 'resend') {
|
|
725
|
-
this.resendMessage(contextMenuItem);
|
|
726
|
-
}
|
|
727
|
-
},
|
|
728
|
-
resendMessage(item) {
|
|
729
|
-
fetch({
|
|
730
|
-
method: 'POST',
|
|
731
|
-
url: '/chat/service/resendMessage',
|
|
732
|
-
data: qs.stringify({
|
|
733
|
-
assemblyId: this.assemblyId,
|
|
734
|
-
sessionId: this.sessionId,
|
|
735
|
-
messageId: item.id
|
|
736
|
-
})
|
|
737
|
-
});
|
|
738
|
-
},
|
|
739
|
-
// 重新编辑
|
|
740
|
-
reEditMessage(item) {
|
|
741
|
-
if (item.content?.type === 4) {
|
|
742
|
-
let content = this.getContent(item);
|
|
743
|
-
this.handleTemplate(content.serverSetting.reEditSetting, false);
|
|
744
|
-
return;
|
|
745
|
-
}
|
|
746
|
-
this.setFooterMessage(this.footerMessage + item.content.content.slice(5, -6));
|
|
747
|
-
},
|
|
748
|
-
observeMsg() {
|
|
749
|
-
if (this.enableReadRecord) {
|
|
750
|
-
if (!this._observer) {
|
|
751
|
-
this._observer = new ObserverScroll(this.$refs['message-wrapper'], this.readMsg);
|
|
752
|
-
this.$on('hook:beforeDestroy', () => {
|
|
753
|
-
this._observer.remove();
|
|
754
|
-
this._observer = null;
|
|
755
|
-
});
|
|
756
|
-
}
|
|
757
|
-
this._observer.disconnect();
|
|
758
|
-
if (this.msgList.length) {
|
|
759
|
-
this.$nextTick(() => {
|
|
760
|
-
const el = this.$refs['message-wrapper'];
|
|
761
|
-
const els = el?.querySelectorAll('.message-item.left');
|
|
762
|
-
els && this._observer.observe(Array.from(els).filter(item => item.getAttribute('data-rid')));
|
|
763
|
-
});
|
|
764
|
-
}
|
|
765
|
-
}
|
|
766
|
-
},
|
|
767
|
-
readMsg(ids, enableVaid = true, notify = true, post = true) {
|
|
768
|
-
const msgList = this.msgList;
|
|
769
|
-
const idKeys = msgList.reduce((obj, item, i) => {
|
|
770
|
-
const id = item?.id;
|
|
771
|
-
if (id) obj[id] = i;
|
|
772
|
-
return obj;
|
|
773
|
-
}, {});
|
|
774
|
-
const data = [];
|
|
775
|
-
const validFn = (item, type) => {
|
|
776
|
-
/**
|
|
777
|
-
* 针对文本、表情消息类型,只要在聊天区域内,视为已读,
|
|
778
|
-
* 图片、语音类型消息,需要点击查看后,才视为已读,
|
|
779
|
-
* 模板 类型消息,如果没有详情链接,只要在聊天区域内,视为已读,若有详情链接,需要点击查看后,才视为已读
|
|
780
|
-
*/
|
|
781
|
-
const jumpType = `,6,1,`;
|
|
782
|
-
if (jumpType.includes(type)) return false;
|
|
783
|
-
if (type == 4 && !this.isDescribeMsg(item)) {
|
|
784
|
-
let content = this.getContent(item) || {};
|
|
785
|
-
let setting = (this.isServer ? content.serverSetting : content.customerSetting) || {};
|
|
786
|
-
return !setting?.address;
|
|
787
|
-
}
|
|
788
|
-
return true;
|
|
789
|
-
};
|
|
790
|
-
const value = ids.filter(id => {
|
|
791
|
-
const i = idKeys[id];
|
|
792
|
-
let item = msgList[i];
|
|
793
|
-
if (item) {
|
|
794
|
-
const type = item.content.type;
|
|
795
|
-
if (!enableVaid || validFn(item, type)) {
|
|
796
|
-
item.readStatus = 'Y';
|
|
797
|
-
data.push({ id, type });
|
|
798
|
-
return true;
|
|
799
|
-
}
|
|
800
|
-
return false;
|
|
801
|
-
}
|
|
802
|
-
});
|
|
803
|
-
if (!value.length) return;
|
|
804
|
-
notify &&
|
|
805
|
-
this.dispatchEvent('msg_readed', {
|
|
806
|
-
data,
|
|
807
|
-
assemblyId: this.assemblyId,
|
|
808
|
-
sessionId: this.sessionId
|
|
809
|
-
});
|
|
810
|
-
post && this.postReadMessage({ ids: value.join(',') });
|
|
811
|
-
},
|
|
812
|
-
postReadMessage(data) {
|
|
813
|
-
fetch.post(
|
|
814
|
-
`/chat/${this.isServer ? 'service' : 'access'}/readMessage`,
|
|
815
|
-
qs.stringify({
|
|
816
|
-
assemblyId: this.assemblyId,
|
|
817
|
-
orgId: this.orgId,
|
|
818
|
-
userId: this.userId,
|
|
819
|
-
sessionId: this.sessionId,
|
|
820
|
-
...data
|
|
821
|
-
})
|
|
822
|
-
);
|
|
823
|
-
},
|
|
824
|
-
readSingleMsg(item) {
|
|
825
|
-
if (this.enableReadRecord && item.readStatus === 'N') {
|
|
826
|
-
const cls = this.getMessageItemClass(item);
|
|
827
|
-
if (!cls?.left) return;
|
|
828
|
-
this.readMsg([item.id], false);
|
|
829
|
-
}
|
|
830
|
-
},
|
|
831
|
-
closeReadRecord() {
|
|
832
|
-
this.readRecordVisible = false;
|
|
833
|
-
this.readRecordList = [];
|
|
834
|
-
},
|
|
835
|
-
openReadRecord(event, item) {
|
|
836
|
-
const readStatus = item.readStatus;
|
|
837
|
-
if (readStatus) {
|
|
838
|
-
const cls = this.getMessageItemClass(item);
|
|
839
|
-
if (!cls.right) return;
|
|
840
|
-
const rect = event.target.getBoundingClientRect();
|
|
841
|
-
const w = 440;
|
|
842
|
-
const h = 340;
|
|
843
|
-
const top = Math.max(0, Math.min(document.body.clientHeight - h, rect.top - h / 2));
|
|
844
|
-
const left = Math.max(0, Math.min(document.body.clientWidth - w, rect.left - w));
|
|
845
|
-
fetch({
|
|
846
|
-
url: `/chat/${this.isServer ? 'service' : 'access'}/getMessageMember`,
|
|
847
|
-
method: 'get',
|
|
848
|
-
params: {
|
|
849
|
-
assemblyId: this.assemblyId,
|
|
850
|
-
messageId: item.id,
|
|
851
|
-
orgId: this.isServer ? undefined : this.orgId
|
|
852
|
-
}
|
|
853
|
-
}).then(res => {
|
|
854
|
-
const list = res.data?.list || [];
|
|
855
|
-
this.readRecordStyle = `top:${top}px;left:${left}px;position:fixed;z-index:10`;
|
|
856
|
-
this.readRecordVisible = list.length > 0;
|
|
857
|
-
this.readRecordList = Object.freeze(list);
|
|
858
|
-
if (item.readStatus && list.length) {
|
|
859
|
-
const unread = list.filter(item => item.readStatus == 'N').length;
|
|
860
|
-
const single = list.length < 2;
|
|
861
|
-
const status = unread > 0 ? (single ? 'N' : `${unread}`) : single ? 'Y' : 'ALL';
|
|
862
|
-
// 检查是否更新人数
|
|
863
|
-
if (item.readStatus != status) {
|
|
864
|
-
item.readStatus = status;
|
|
865
|
-
}
|
|
866
|
-
}
|
|
867
|
-
});
|
|
868
|
-
}
|
|
869
|
-
},
|
|
870
|
-
isLastMessage(id) {
|
|
871
|
-
return this.msgList.findIndex(msg => msg.id === id) === this.msgList.length - 1;
|
|
872
|
-
},
|
|
873
|
-
isSystemMsg(item) {
|
|
874
|
-
return item.content.type == 4 && this.getContent(item).styleId == '2';
|
|
875
|
-
},
|
|
876
|
-
isDescribeMsg(item) {
|
|
877
|
-
return this.getContent(item).styleId == '3';
|
|
878
|
-
},
|
|
879
|
-
async handleOpenPortraitPanel(item) {
|
|
880
|
-
if (!this.showPanel || item.fromId === this.serviceId || !this.isServer || !this.isShowPortraitPanel) return;
|
|
881
|
-
const { portraitPanelParams, clientParams } = this;
|
|
882
|
-
const panelSetting = this.assemblySetting?.portraitPanelSetting;
|
|
883
|
-
this.dispatchEvent('open_portraitPanel', {
|
|
884
|
-
panelSetting,
|
|
885
|
-
clientParams,
|
|
886
|
-
panelParams: portraitPanelParams,
|
|
887
|
-
targetId: panelSetting?.targetId,
|
|
888
|
-
targetType: panelSetting?.targetType
|
|
889
|
-
});
|
|
890
|
-
},
|
|
891
|
-
handleContextmenu(e, item) {
|
|
892
|
-
// 系统消息,客户消息,待接入消息,历史消息不允许撤回
|
|
893
|
-
// 模板-描述消息禁用右键
|
|
894
|
-
if (item.content?.source === 1 || !this.sessionId || (this.sessionId && !this.onChating) || (item.content.type === 4 && this.isDescribeMsg(item))) return;
|
|
895
|
-
this.contextMenuItem = item;
|
|
896
|
-
if (this.rightClickSetting.length < 1) return;
|
|
897
|
-
e.preventDefault();
|
|
898
|
-
let left = e.pageX + 'px';
|
|
899
|
-
let top = e.pageY + 'px';
|
|
900
|
-
this.contextMenuStyle = Object.assign(this.contextMenuStyle, {
|
|
901
|
-
top,
|
|
902
|
-
left
|
|
903
|
-
});
|
|
904
|
-
this.contextMenuShow = true;
|
|
905
|
-
},
|
|
906
|
-
scrollEvent(e) {
|
|
907
|
-
console.log("e.target.scrollTop->", e.target.scrollTop);
|
|
908
|
-
this._scrollTop = e.target.scrollTop;
|
|
909
|
-
},
|
|
910
|
-
/* 事件绑定 */
|
|
911
|
-
attachEvent() {
|
|
912
|
-
this.scrollEvent = vexutils.debounce(this.scrollEvent, 800);
|
|
913
|
-
const handleClick = () => {
|
|
914
|
-
this.contextMenuShow = false;
|
|
915
|
-
};
|
|
916
|
-
const handleRasize = () => {
|
|
917
|
-
if (this.readRecordVisible) {
|
|
918
|
-
let style = this.readRecordStyle;
|
|
919
|
-
const top = style.match(topReg)?.[1];
|
|
920
|
-
const topReg = /top:([\d.]+)/;
|
|
921
|
-
const maxH = document.body.clientHeight - 360;
|
|
922
|
-
if (top && maxH < top) {
|
|
923
|
-
style = style.replace(topReg, `top:${maxH}`);
|
|
924
|
-
}
|
|
925
|
-
const leftReg = /left:([\d.]+)/;
|
|
926
|
-
const left = style.match(leftReg)?.[1];
|
|
927
|
-
const maxW = document.body.clientWidth - 440;
|
|
928
|
-
if (left && maxW < left) {
|
|
929
|
-
style = style.replace(leftReg, `left:${maxW}`);
|
|
930
|
-
}
|
|
931
|
-
this.readRecordStyle = style;
|
|
932
|
-
}
|
|
933
|
-
};
|
|
934
|
-
window.addEventListener('resize', handleRasize);
|
|
935
|
-
document.addEventListener('click', handleClick);
|
|
936
|
-
this.registerEvent('openPortraitPanel', this.handleOpenPortraitPanel);
|
|
937
|
-
const readMessage = data => {
|
|
938
|
-
this.readMsg(data.ids.split(','), false, false, false);
|
|
939
|
-
this.postReadMessage(data);
|
|
940
|
-
};
|
|
941
|
-
this.registerEvent('readMessage', readMessage);
|
|
942
|
-
this.$on('hook:beforeDestroy', () => {
|
|
943
|
-
window.removeEventListener('resize', handleRasize);
|
|
944
|
-
document.removeEventListener('click', handleClick);
|
|
945
|
-
this.unregisterEvent('openPortraitPanel', this.handleOpenPortraitPanel);
|
|
946
|
-
this.unregisterEvent('readMessage', readMessage);
|
|
947
|
-
});
|
|
948
|
-
},
|
|
949
|
-
goToBroadcastLink(item) {
|
|
950
|
-
if (!item.url) return;
|
|
951
|
-
window.open(item.url);
|
|
952
|
-
},
|
|
953
|
-
/**
|
|
954
|
-
* 客服切换
|
|
955
|
-
*/
|
|
956
|
-
handleSessionIdChange(e) {
|
|
957
|
-
let [sessionId, serviceId] = e.target.value.split('-');
|
|
958
|
-
this.setSessionId(sessionId);
|
|
959
|
-
this.setServiceId(serviceId);
|
|
960
|
-
let isOnChating = this.sessionHistoryList.find(item => item.fromId === serviceId).onChating;
|
|
961
|
-
this.setOnChating(!!isOnChating);
|
|
962
|
-
this.setMsgList([]);
|
|
963
|
-
this.getEarlierMsg();
|
|
964
|
-
},
|
|
965
|
-
handleSendFail(item) {
|
|
966
|
-
this.sendMessage(Object.assign(item.content, { failItem: item }));
|
|
967
|
-
},
|
|
968
|
-
reCall(type) {
|
|
969
|
-
this.setShowAudio(true);
|
|
970
|
-
this.setVideoMode(type === 'voice' ? 1 : 2);
|
|
971
|
-
this.$nextTick(() => {
|
|
972
|
-
this.setVideoMembers([]);
|
|
973
|
-
});
|
|
974
|
-
},
|
|
975
|
-
playAudio(item) {
|
|
976
|
-
let { content = '' } = item?.content || {};
|
|
977
|
-
if (!content) return;
|
|
978
|
-
if (this.lastAudioItem && (item.id !== this.lastAudioItem.id || item.createdTime !== this.lastAudioItem.createdTime)) {
|
|
979
|
-
this.$set(this.lastAudioItem.content, 'isPlay', false);
|
|
980
|
-
}
|
|
981
|
-
|
|
982
|
-
this.readSingleMsg(item);
|
|
983
|
-
this.lastAudioItem = item;
|
|
984
|
-
this.$set(item.content, 'isPlay', !item.content.isPlay);
|
|
985
|
-
this.$nextTick(() => {
|
|
986
|
-
this.curAudioUrl = content;
|
|
987
|
-
let audioRef = this.$refs['audio'];
|
|
988
|
-
if (!audioRef) return;
|
|
989
|
-
audioRef.load();
|
|
990
|
-
setTimeout(() => {
|
|
991
|
-
if (item.content.isPlay) {
|
|
992
|
-
let playPromise = audioRef.play();
|
|
993
|
-
if (playPromise !== undefined) {
|
|
994
|
-
playPromise.then(() => {
|
|
995
|
-
audioRef.play();
|
|
996
|
-
});
|
|
997
|
-
}
|
|
998
|
-
} else {
|
|
999
|
-
audioRef.pause();
|
|
1000
|
-
this.curAudioUrl = '';
|
|
1001
|
-
}
|
|
1002
|
-
});
|
|
1003
|
-
});
|
|
1004
|
-
},
|
|
1005
|
-
audioEnd() {
|
|
1006
|
-
if (!this.lastAudioItem) return;
|
|
1007
|
-
this.$set(this.lastAudioItem.content, 'isPlay', false);
|
|
1008
|
-
},
|
|
1009
|
-
getRecallText(item, flag = false) {
|
|
1010
|
-
return getRecallText(this, item, flag);
|
|
1011
|
-
}
|
|
1012
|
-
},
|
|
1013
|
-
directives: {
|
|
1014
|
-
InfiniteScroll
|
|
1015
|
-
},
|
|
1016
|
-
components: {
|
|
1017
|
-
AModal: Modal,
|
|
1018
|
-
[Layout.Content.name]: Layout.Content,
|
|
1019
|
-
[Spin.name]: Spin,
|
|
1020
|
-
[Icon.name]: Icon,
|
|
1021
|
-
[Popconfirm.name]: Popconfirm,
|
|
1022
|
-
[Radio.Button.name]: Radio.Button,
|
|
1023
|
-
[Radio.Group.name]: Radio.Group,
|
|
1024
|
-
[Carousel.name]: Carousel,
|
|
1025
|
-
SvgIcon,
|
|
1026
|
-
MsgPrescription,
|
|
1027
|
-
ReadStatus,
|
|
1028
|
-
ReadRecord,
|
|
1029
|
-
MsgPicture,
|
|
1030
|
-
MsgDescribe,
|
|
1031
|
-
chatHeader,
|
|
1032
|
-
Viewer
|
|
1033
|
-
},
|
|
1034
|
-
watch: {
|
|
1035
|
-
msgList() {
|
|
1036
|
-
this.observeMsg();
|
|
1037
|
-
},
|
|
1038
|
-
isAppendMsg: {
|
|
1039
|
-
immediate: true,
|
|
1040
|
-
handler(isAppendMsg) {
|
|
1041
|
-
if (isAppendMsg) {
|
|
1042
|
-
let newArr = [];
|
|
1043
|
-
if (vexutils.isPlainObject(this.message)) {
|
|
1044
|
-
newArr = [...this.msgList, this.message];
|
|
1045
|
-
} else if (vexutils.isArray(this.message)) {
|
|
1046
|
-
newArr = [...this.msgList, ...this.message];
|
|
1047
|
-
}
|
|
1048
|
-
this.setMsgList(newArr);
|
|
1049
|
-
this.setIsAppendMsg(false);
|
|
1050
|
-
this.setScrollTo('bottom');
|
|
1051
|
-
}
|
|
1052
|
-
}
|
|
1053
|
-
},
|
|
1054
|
-
scrollTo: {
|
|
1055
|
-
immediate: true,
|
|
1056
|
-
handler(scrollTo) {
|
|
1057
|
-
if (scrollTo) {
|
|
1058
|
-
this.handleScrollTo(scrollTo);
|
|
1059
|
-
}
|
|
1060
|
-
}
|
|
1061
|
-
},
|
|
1062
|
-
activatedTime: {
|
|
1063
|
-
immediate: true,
|
|
1064
|
-
handler(value) {
|
|
1065
|
-
this.handleScrollTo(this._scrollTop);
|
|
1066
|
-
}
|
|
1067
|
-
},
|
|
1068
|
-
/**
|
|
1069
|
-
* 图片懒加载处理
|
|
1070
|
-
*/
|
|
1071
|
-
appendList: {
|
|
1072
|
-
handler() {
|
|
1073
|
-
if (!this.scrollHeight) {
|
|
1074
|
-
let target = this.$refs['message-wrapper'];
|
|
1075
|
-
this.scrollHeight = target.scrollHeight;
|
|
1076
|
-
}
|
|
1077
|
-
if (this.appendList.length === this.msgList.length || this.appendList.length === 1) {
|
|
1078
|
-
this.setScrollTo('bottom');
|
|
1079
|
-
} else {
|
|
1080
|
-
this.setScrollTo('current');
|
|
1081
|
-
}
|
|
1082
|
-
}
|
|
1083
|
-
},
|
|
1084
|
-
isRecorderVoice: {
|
|
1085
|
-
immediate: true,
|
|
1086
|
-
handler(val) {
|
|
1087
|
-
if (!val) return;
|
|
1088
|
-
this.curAudioUrl = '';
|
|
1089
|
-
this.setIsRecorderVoice(false);
|
|
1090
|
-
if (!this.lastAudioItem) return;
|
|
1091
|
-
this.$set(this.lastAudioItem.content, 'isPlay', false);
|
|
1092
|
-
}
|
|
1093
|
-
}
|
|
1094
|
-
}
|
|
1095
|
-
};
|
|
1096
|
-
</script>
|
|
1097
|
-
|
|
1098
|
-
<style lang="less" scoped>
|
|
1099
|
-
@import '../style/emoji.css';
|
|
1100
|
-
@import '../style/message.mixin.less';
|
|
1101
|
-
.message-wrapper {
|
|
1102
|
-
.createMessageStyle(#ebebeb, @primary-color);
|
|
1103
|
-
flex: 1;
|
|
1104
|
-
height: 0;
|
|
1105
|
-
// position: relative;
|
|
1106
|
-
display: flex;
|
|
1107
|
-
flex-direction: column;
|
|
1108
|
-
overflow-x: hidden;
|
|
1109
|
-
.broadcast-wrap {
|
|
1110
|
-
height: 30px;
|
|
1111
|
-
text-align: center;
|
|
1112
|
-
font-size: 14px;
|
|
1113
|
-
background-color: #fffbe8;
|
|
1114
|
-
/deep/ .carousel-item {
|
|
1115
|
-
display: inline-flex !important;
|
|
1116
|
-
justify-content: center;
|
|
1117
|
-
align-items: center;
|
|
1118
|
-
width: 100%;
|
|
1119
|
-
height: 30px;
|
|
1120
|
-
text-align: center;
|
|
1121
|
-
&.has-link {
|
|
1122
|
-
color: #ed6a0c;
|
|
1123
|
-
cursor: pointer;
|
|
1124
|
-
}
|
|
1125
|
-
span {
|
|
1126
|
-
display: inline-block;
|
|
1127
|
-
max-width: calc(100% - 30px);
|
|
1128
|
-
margin-left: 4px;
|
|
1129
|
-
}
|
|
1130
|
-
}
|
|
1131
|
-
}
|
|
1132
|
-
|
|
1133
|
-
.loading-icon {
|
|
1134
|
-
position: absolute;
|
|
1135
|
-
top: 0;
|
|
1136
|
-
left: 50%;
|
|
1137
|
-
}
|
|
1138
|
-
}
|
|
1139
|
-
/deep/ .ant-layout-content {
|
|
1140
|
-
flex: 1;
|
|
1141
|
-
display: flex;
|
|
1142
|
-
flex-direction: column;
|
|
1143
|
-
position: relative;
|
|
1144
|
-
}
|
|
1145
|
-
.online-message {
|
|
1146
|
-
flex: 1;
|
|
1147
|
-
height: 100%;
|
|
1148
|
-
// height: 608px;
|
|
1149
|
-
overflow-y: auto;
|
|
1150
|
-
overflow-x: hidden;
|
|
1151
|
-
padding: 10px 22px;
|
|
1152
|
-
// margin: 10px 0;
|
|
1153
|
-
text-align: center;
|
|
1154
|
-
&::-webkit-scrollbar {
|
|
1155
|
-
width: 5px;
|
|
1156
|
-
}
|
|
1157
|
-
.message-time {
|
|
1158
|
-
display: inline-block;
|
|
1159
|
-
color: #666;
|
|
1160
|
-
font-size: 14px;
|
|
1161
|
-
border-radius: 4px;
|
|
1162
|
-
padding: 4px;
|
|
1163
|
-
margin: 0 auto;
|
|
1164
|
-
margin-bottom: 16px;
|
|
1165
|
-
}
|
|
1166
|
-
> div {
|
|
1167
|
-
margin-bottom: 16px;
|
|
1168
|
-
}
|
|
1169
|
-
.message-item {
|
|
1170
|
-
display: flex;
|
|
1171
|
-
/deep/ .chat-read-status-text {
|
|
1172
|
-
display: none;
|
|
1173
|
-
}
|
|
1174
|
-
&.right.read-status {
|
|
1175
|
-
padding-bottom: 24px;
|
|
1176
|
-
position: relative;
|
|
1177
|
-
/deep/ .chat-read-status-text {
|
|
1178
|
-
display: block;
|
|
1179
|
-
position: absolute;
|
|
1180
|
-
right: 50px;
|
|
1181
|
-
bottom: 0;
|
|
1182
|
-
}
|
|
1183
|
-
}
|
|
1184
|
-
.right-time {
|
|
1185
|
-
display: none;
|
|
1186
|
-
position: absolute;
|
|
1187
|
-
top: -16px;
|
|
1188
|
-
left: 10px;
|
|
1189
|
-
font-size: 12px;
|
|
1190
|
-
color: #b0b1b1;
|
|
1191
|
-
white-space: nowrap;
|
|
1192
|
-
}
|
|
1193
|
-
|
|
1194
|
-
.content-wrap {
|
|
1195
|
-
padding: 0 10px;
|
|
1196
|
-
text-align: left;
|
|
1197
|
-
position: relative;
|
|
1198
|
-
&:hover {
|
|
1199
|
-
.right-time {
|
|
1200
|
-
display: block;
|
|
1201
|
-
}
|
|
1202
|
-
}
|
|
1203
|
-
|
|
1204
|
-
.robot-item {
|
|
1205
|
-
text-align: left;
|
|
1206
|
-
a {
|
|
1207
|
-
text-decoration: underline;
|
|
1208
|
-
}
|
|
1209
|
-
}
|
|
1210
|
-
.intention-wrap {
|
|
1211
|
-
display: flex;
|
|
1212
|
-
flex-wrap: wrap;
|
|
1213
|
-
padding: 8px 0 4px 0;
|
|
1214
|
-
background-color: #fff;
|
|
1215
|
-
border-radius: 0 0 8px 8px;
|
|
1216
|
-
> div {
|
|
1217
|
-
display: inline-flex;
|
|
1218
|
-
flex-direction: column;
|
|
1219
|
-
align-items: center;
|
|
1220
|
-
width: 60px;
|
|
1221
|
-
height: 54px;
|
|
1222
|
-
cursor: pointer;
|
|
1223
|
-
|
|
1224
|
-
&:hover {
|
|
1225
|
-
color: #5585f5;
|
|
1226
|
-
span {
|
|
1227
|
-
color: #5585f5;
|
|
1228
|
-
}
|
|
1229
|
-
}
|
|
1230
|
-
}
|
|
1231
|
-
span {
|
|
1232
|
-
margin-top: 8px;
|
|
1233
|
-
max-width: 90%;
|
|
1234
|
-
text-overflow: ellipsis;
|
|
1235
|
-
overflow: hidden;
|
|
1236
|
-
white-space: nowrap;
|
|
1237
|
-
font-size: 12px;
|
|
1238
|
-
color: #6a6a6a;
|
|
1239
|
-
}
|
|
1240
|
-
}
|
|
1241
|
-
.dictionary-ul {
|
|
1242
|
-
padding-top: 8px;
|
|
1243
|
-
display: flex;
|
|
1244
|
-
flex-wrap: wrap;
|
|
1245
|
-
li {
|
|
1246
|
-
padding: 4px 16px;
|
|
1247
|
-
margin-right: 16px;
|
|
1248
|
-
font-size: 14px;
|
|
1249
|
-
color: #5585f5;
|
|
1250
|
-
background: #efefef;
|
|
1251
|
-
border-radius: 16px;
|
|
1252
|
-
cursor: pointer;
|
|
1253
|
-
}
|
|
1254
|
-
}
|
|
1255
|
-
.client-btn {
|
|
1256
|
-
display: inline-block;
|
|
1257
|
-
padding: 4px 8px;
|
|
1258
|
-
margin-top: 8px;
|
|
1259
|
-
color: #fff;
|
|
1260
|
-
font-size: 12px;
|
|
1261
|
-
border-radius: 20px;
|
|
1262
|
-
background: #5585f5;
|
|
1263
|
-
cursor: pointer;
|
|
1264
|
-
}
|
|
1265
|
-
.re-call {
|
|
1266
|
-
cursor: pointer;
|
|
1267
|
-
color: #5585f5;
|
|
1268
|
-
}
|
|
1269
|
-
.voice-bg {
|
|
1270
|
-
display: flex;
|
|
1271
|
-
align-items: center;
|
|
1272
|
-
cursor: pointer;
|
|
1273
|
-
img {
|
|
1274
|
-
mix-blend-mode: difference;
|
|
1275
|
-
display: inline-block;
|
|
1276
|
-
width: 14px;
|
|
1277
|
-
}
|
|
1278
|
-
.voice-text {
|
|
1279
|
-
display: inline-block;
|
|
1280
|
-
}
|
|
1281
|
-
span {
|
|
1282
|
-
margin-left: 8px;
|
|
1283
|
-
}
|
|
1284
|
-
}
|
|
1285
|
-
}
|
|
1286
|
-
.has-dictionary {
|
|
1287
|
-
padding: 0;
|
|
1288
|
-
text-align: left;
|
|
1289
|
-
background: unset;
|
|
1290
|
-
}
|
|
1291
|
-
.content {
|
|
1292
|
-
padding: 10px;
|
|
1293
|
-
background: #ebebeb;
|
|
1294
|
-
border-radius: 0px 8px 8px 8px;
|
|
1295
|
-
max-width: 500px;
|
|
1296
|
-
margin: 0px;
|
|
1297
|
-
line-height: 20px;
|
|
1298
|
-
font-size: 14px;
|
|
1299
|
-
color: #000;
|
|
1300
|
-
text-align: left;
|
|
1301
|
-
word-break: break-word;
|
|
1302
|
-
/deep/ p {
|
|
1303
|
-
margin: 0;
|
|
1304
|
-
}
|
|
1305
|
-
}
|
|
1306
|
-
.upload-image {
|
|
1307
|
-
margin-left: 8px;
|
|
1308
|
-
}
|
|
1309
|
-
&.right {
|
|
1310
|
-
flex-direction: row-reverse;
|
|
1311
|
-
.right-time {
|
|
1312
|
-
left: unset;
|
|
1313
|
-
right: 10px;
|
|
1314
|
-
}
|
|
1315
|
-
.content-wrap {
|
|
1316
|
-
text-align: right;
|
|
1317
|
-
.robot-item {
|
|
1318
|
-
text-align: right;
|
|
1319
|
-
}
|
|
1320
|
-
.voice-bg {
|
|
1321
|
-
flex-direction: row-reverse;
|
|
1322
|
-
align-self: flex-end;
|
|
1323
|
-
img {
|
|
1324
|
-
transform: rotateY(180deg);
|
|
1325
|
-
}
|
|
1326
|
-
span {
|
|
1327
|
-
margin-left: 0;
|
|
1328
|
-
margin-right: 8px;
|
|
1329
|
-
text-align: right;
|
|
1330
|
-
}
|
|
1331
|
-
}
|
|
1332
|
-
}
|
|
1333
|
-
.content-wrap .content {
|
|
1334
|
-
background-color: #e7f0ff;
|
|
1335
|
-
border-radius: 8px 0px 8px 8px;
|
|
1336
|
-
border: 1px solid #e7f0ff;
|
|
1337
|
-
box-sizing: border-box;
|
|
1338
|
-
}
|
|
1339
|
-
.upload-image {
|
|
1340
|
-
margin-right: 8px;
|
|
1341
|
-
}
|
|
1342
|
-
}
|
|
1343
|
-
}
|
|
1344
|
-
.bot-message {
|
|
1345
|
-
display: block;
|
|
1346
|
-
text-decoration: underline;
|
|
1347
|
-
color: #5585f5;
|
|
1348
|
-
cursor: pointer;
|
|
1349
|
-
}
|
|
1350
|
-
.session-end {
|
|
1351
|
-
display: flex;
|
|
1352
|
-
justify-content: center;
|
|
1353
|
-
margin-top: 15px;
|
|
1354
|
-
margin-bottom: 25px;
|
|
1355
|
-
.end {
|
|
1356
|
-
display: flex;
|
|
1357
|
-
justify-content: center;
|
|
1358
|
-
width: 30%;
|
|
1359
|
-
height: 36px;
|
|
1360
|
-
line-height: 36px;
|
|
1361
|
-
background-color: #e8e8e8;
|
|
1362
|
-
color: #939393;
|
|
1363
|
-
font-size: 14px;
|
|
1364
|
-
border-radius: 18px;
|
|
1365
|
-
}
|
|
1366
|
-
}
|
|
1367
|
-
.menu-tip {
|
|
1368
|
-
font-size: 20px;
|
|
1369
|
-
align-self: flex-end;
|
|
1370
|
-
margin-bottom: 8px;
|
|
1371
|
-
background: #f6f6f6;
|
|
1372
|
-
height: 25px;
|
|
1373
|
-
line-height: 25px;
|
|
1374
|
-
width: 30px;
|
|
1375
|
-
border-radius: 4px;
|
|
1376
|
-
}
|
|
1377
|
-
.menu-item {
|
|
1378
|
-
:hover {
|
|
1379
|
-
background: red;
|
|
1380
|
-
}
|
|
1381
|
-
}
|
|
1382
|
-
.menu-main {
|
|
1383
|
-
width: 100px;
|
|
1384
|
-
background-color: #101627;
|
|
1385
|
-
color: #fff;
|
|
1386
|
-
text-align: left;
|
|
1387
|
-
border-radius: 6px;
|
|
1388
|
-
padding: 10px 0;
|
|
1389
|
-
z-index: 3000;
|
|
1390
|
-
cursor: pointer;
|
|
1391
|
-
.menu-item {
|
|
1392
|
-
padding: 0 10px;
|
|
1393
|
-
}
|
|
1394
|
-
.menu-item:hover {
|
|
1395
|
-
background-color: #efefef;
|
|
1396
|
-
color: #000;
|
|
1397
|
-
}
|
|
1398
|
-
}
|
|
1399
|
-
.first-name {
|
|
1400
|
-
width: 40px;
|
|
1401
|
-
height: 40px;
|
|
1402
|
-
line-height: 40px;
|
|
1403
|
-
text-align: center;
|
|
1404
|
-
background: #5585f5;
|
|
1405
|
-
color: #fff;
|
|
1406
|
-
border-radius: 100%;
|
|
1407
|
-
font-size: 15px;
|
|
1408
|
-
}
|
|
1409
|
-
.msg-avatar {
|
|
1410
|
-
width: 40px;
|
|
1411
|
-
height: 40px;
|
|
1412
|
-
border-radius: 50%;
|
|
1413
|
-
|
|
1414
|
-
object-fit: cover;
|
|
1415
|
-
background: #fff;
|
|
1416
|
-
}
|
|
1417
|
-
/deep/ .ant-spin-spinning {
|
|
1418
|
-
display: flex;
|
|
1419
|
-
align-items: center;
|
|
1420
|
-
}
|
|
1421
|
-
.system-msg {
|
|
1422
|
-
margin: 10px 0;
|
|
1423
|
-
text-align: left;
|
|
1424
|
-
line-height: 20px;
|
|
1425
|
-
word-wrap: break-word;
|
|
1426
|
-
display: flex;
|
|
1427
|
-
justify-content: center;
|
|
1428
|
-
.system-icon {
|
|
1429
|
-
font-size: 18px;
|
|
1430
|
-
color: #ffc200;
|
|
1431
|
-
vertical-align: middle;
|
|
1432
|
-
margin-right: 10px;
|
|
1433
|
-
margin-top: 1px;
|
|
1434
|
-
}
|
|
1435
|
-
.system-btn {
|
|
1436
|
-
color: @primary-color;
|
|
1437
|
-
margin-left: 8px;
|
|
1438
|
-
cursor: pointer;
|
|
1439
|
-
text-decoration: underline;
|
|
1440
|
-
}
|
|
1441
|
-
}
|
|
1442
|
-
}
|
|
1443
|
-
/deep/ p {
|
|
1444
|
-
margin-bottom: 0;
|
|
1445
|
-
}
|
|
1446
|
-
</style>
|