bhd-components 0.8.0 → 0.8.1

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.
@@ -1,5 +1,5 @@
1
- import { z as zhCN, A as App, _ as _object_spread, a as AntdMessage, M as Modal$1, b as AntdNotification, C as ConfigProvider, c as _extends, d as _object_destructuring_empty, j as jsx, e as _object_spread_props, f as jsxs, t as transform, S as StyleProvider, g as _sliced_to_array, T as Tooltip, h as Table$2, I as Icon, E as ExclamationCircleFilled, i as _to_consumable_array, P as Pagination$1, k as Select, l as CaretDownOutlined, m as _inherits, n as _create_super, o as _create_class, p as _class_call_check, q as _define_property, r as _assert_this_initialized, s as _async_to_generator, L as LeftOutlined, R as RightOutlined, u as MinusOutlined, v as PlusOutlined, w as __generator, x as Input, y as SearchOutlined, B as CloseOutlined, X, D as I, H, F as Remarkable, G as Drawer, J as HighlightJS, Z as ZoomInOutlined } from './de88944c.esm.es5.development.js';
2
- export { K as Affix, N as Alert, O as Anchor, a as AntdMessage, A as App, Q as AutoComplete, U as Avatar, W as BackTop, Y as Badge, $ as Breadcrumb, a0 as Button, a1 as Calendar, a2 as Card, a3 as Carousel, a4 as Cascader, a5 as Checkbox, a6 as Col, a7 as Collapse, a8 as DatePicker, a9 as Descriptions, aa as Divider, G as Drawer, ab as Dropdown, ac as Empty, V as FloatButton, ad as Form, ae as Grid, af as Image, x as Input, ag as InputNumber, ah as Layout, ai as List, aj as Mentions, ak as Menu, M as Modal, al as Popconfirm, am as Popover, an as Progress, aM as QRCode, ao as Radio, ap as Rate, aq as Result, ar as Row, as as Segmented, k as Select, at as Skeleton, au as Slider, av as Space, aw as Spin, ax as Statistic, ay as Steps, az as Switch, aA as Tabs, aB as Tag, aD as TimePicker, aE as Timeline, T as Tooltip, aF as Tour, aG as Transfer, aH as Tree, aI as TreeSelect, aJ as Typography, aK as Upload, aL as Watermark, aO as en_US, b as notification, aC as theme, aN as version, z as zh_CN } from './de88944c.esm.es5.development.js';
1
+ import { z as zhCN, A as App, _ as _object_spread, a as AntdMessage, M as Modal$1, b as AntdNotification, C as ConfigProvider, c as _extends, d as _object_destructuring_empty, j as jsx, e as _object_spread_props, f as jsxs, t as transform, S as StyleProvider, g as _sliced_to_array, T as Tooltip, h as Table$2, I as Icon, E as ExclamationCircleFilled, i as _to_consumable_array, P as Pagination$1, k as Select, l as CaretDownOutlined, m as _inherits, n as _create_super, o as _create_class, p as _class_call_check, q as _define_property, r as _assert_this_initialized, s as _async_to_generator, L as LeftOutlined, R as RightOutlined, u as MinusOutlined, v as PlusOutlined, w as __generator, x as Input, y as SearchOutlined, B as CloseOutlined, X, D as I, H, F as Remarkable, G as Drawer, J as HighlightJS, Z as ZoomInOutlined } from './3f8529e7.esm.es5.development.js';
2
+ export { K as Affix, N as Alert, O as Anchor, a as AntdMessage, A as App, Q as AutoComplete, U as Avatar, W as BackTop, Y as Badge, $ as Breadcrumb, a0 as Button, a1 as Calendar, a2 as Card, a3 as Carousel, a4 as Cascader, a5 as Checkbox, a6 as Col, a7 as Collapse, a8 as DatePicker, a9 as Descriptions, aa as Divider, G as Drawer, ab as Dropdown, ac as Empty, V as FloatButton, ad as Form, ae as Grid, af as Image, x as Input, ag as InputNumber, ah as Layout, ai as List, aj as Mentions, ak as Menu, M as Modal, al as Popconfirm, am as Popover, an as Progress, aM as QRCode, ao as Radio, ap as Rate, aq as Result, ar as Row, as as Segmented, k as Select, at as Skeleton, au as Slider, av as Space, aw as Spin, ax as Statistic, ay as Steps, az as Switch, aA as Tabs, aB as Tag, aD as TimePicker, aE as Timeline, T as Tooltip, aF as Tour, aG as Transfer, aH as Tree, aI as TreeSelect, aJ as Typography, aK as Upload, aL as Watermark, aO as en_US, b as notification, aC as theme, aN as version, z as zh_CN } from './3f8529e7.esm.es5.development.js';
3
3
  import * as React from 'react';
4
4
  import { useState, useRef, useEffect, useLayoutEffect, forwardRef, useImperativeHandle } from 'react';
5
5
  import { Fragment } from 'react/jsx-runtime';
@@ -2473,7 +2473,7 @@ function BhdAppLayout(props) {
2473
2473
  });
2474
2474
  }
2475
2475
 
2476
- var modules_63b47c51 = {"service_ChatWindow_Drawer":"index_module_service_ChatWindow_Drawer__bf3246f1","ChatWindow_Modal":"index_module_ChatWindow_Modal__bf3246f1","ChatWindow_Drawer":"index_module_ChatWindow_Drawer__bf3246f1","header_wrap":"index_module_header_wrap__bf3246f1","top":"index_module_top__bf3246f1","user":"index_module_user__bf3246f1","count":"index_module_count__bf3246f1","operate":"index_module_operate__bf3246f1","line":"index_module_line__bf3246f1","popover_main":"index_module_popover_main__bf3246f1","popover":"index_module_popover__bf3246f1","header_wrap_newlabo":"index_module_header_wrap_newlabo__bf3246f1","Drawer_main":"index_module_Drawer_main__bf3246f1","loading":"index_module_loading__bf3246f1","message_con":"index_module_message_con__bf3246f1","left":"index_module_left__bf3246f1","head_sculpture":"index_module_head_sculpture__bf3246f1","main_content":"index_module_main_content__bf3246f1","right":"index_module_right__bf3246f1","main":"index_module_main__bf3246f1","main_content_flag":"index_module_main_content_flag__bf3246f1","operate_modal":"index_module_operate_modal__bf3246f1","operate_modal_bottom":"index_module_operate_modal_bottom__bf3246f1","active":"index_module_active__bf3246f1","stop_generate":"index_module_stop_generate__bf3246f1","icon":"index_module_icon__bf3246f1","find_teacher":"index_module_find_teacher__bf3246f1","stop_findTeacher":"index_module_stop_findTeacher__bf3246f1","content":"index_module_content__bf3246f1","content_child":"index_module_content_child__bf3246f1","find_teacher_con":"index_module_find_teacher_con__bf3246f1","sign":"index_module_sign__bf3246f1","ask_question":"index_module_ask_question__bf3246f1","association_problem":"index_module_association_problem__bf3246f1","association_problem_flag":"index_module_association_problem_flag__bf3246f1","related_issues_flag":"index_module_related_issues_flag__bf3246f1","img_con":"index_module_img_con__bf3246f1","mask_zoom":"index_module_mask_zoom__bf3246f1","img_con2":"index_module_img_con2__bf3246f1","copyCode":"index_module_copyCode__bf3246f1","time":"index_module_time__bf3246f1","citation_content":"index_module_citation_content__bf3246f1","text_exceed":"index_module_text_exceed__bf3246f1","popover_content":"index_module_popover_content__bf3246f1","Drawer_main_newlabo":"index_module_Drawer_main_newlabo__bf3246f1","Drawer_main_newlabo_no_pic":"index_module_Drawer_main_newlabo_no_pic__bf3246f1","Drawer_buttom_Issues_List":"index_module_Drawer_buttom_Issues_List__bf3246f1","issues_list_teacherList":"index_module_issues_list_teacherList__bf3246f1","item":"index_module_item__bf3246f1","issues_list":"index_module_issues_list__bf3246f1","issues_list_flag":"index_module_issues_list_flag__bf3246f1","Drawer_buttom":"index_module_Drawer_buttom__bf3246f1","input_wrap":"index_module_input_wrap__bf3246f1","input":"index_module_input__bf3246f1","picture_layout":"index_module_picture_layout__bf3246f1","icon_close":"index_module_icon_close__bf3246f1","icon_zoom":"index_module_icon_zoom__bf3246f1","anticon":"index_module_anticon__bf3246f1","no_AI":"index_module_no_AI__bf3246f1","screenshot":"index_module_screenshot__bf3246f1","disabled":"index_module_disabled__bf3246f1","content_main":"index_module_content_main__bf3246f1","content_con":"index_module_content_con__bf3246f1","delete_quote":"index_module_delete_quote__bf3246f1","sending":"index_module_sending__bf3246f1","Drawer_buttom_Issues_List_newlabo":"index_module_Drawer_buttom_Issues_List_newlabo__bf3246f1","main_list":"index_module_main_list__bf3246f1","chat_content":"index_module_chat_content__bf3246f1","popover_main_content":"index_module_popover_main_content__bf3246f1","popover_main_content_name":"index_module_popover_main_content_name__bf3246f1","teacher_layout":"index_module_teacher_layout__bf3246f1","bottom":"index_module_bottom__bf3246f1","delete":"index_module_delete__bf3246f1","num":"index_module_num__bf3246f1","shrink":"index_module_shrink__bf3246f1","teacher_layout_newlabo":"index_module_teacher_layout_newlabo__bf3246f1","teacher_layout_modal":"index_module_teacher_layout_modal__bf3246f1","ai":"index_module_ai__bf3246f1","user_info":"index_module_user_info__bf3246f1","message":"index_module_message__bf3246f1","con":"index_module_con__bf3246f1","teacher_layout_modal_newlabo":"index_module_teacher_layout_modal_newlabo__bf3246f1","history_list":"index_module_history_list__bf3246f1","search_layout":"index_module_search_layout__bf3246f1","mymove":"index_module_mymove__bf3246f1","title":"index_module_title__bf3246f1","search_top":"index_module_search_top__bf3246f1","list_item":"index_module_list_item__bf3246f1","list_summary":"index_module_list_summary__bf3246f1","head_img":"index_module_head_img__bf3246f1","list_desc":"index_module_list_desc__bf3246f1","name":"index_module_name__bf3246f1","decs":"index_module_decs__bf3246f1","open":"index_module_open__bf3246f1","list_summary_active":"index_module_list_summary_active__bf3246f1","list_detail":"index_module_list_detail__bf3246f1","list":"index_module_list__bf3246f1","list_more":"index_module_list_more__bf3246f1","no_data":"index_module_no_data__bf3246f1","history_list_broadside":"index_module_history_list_broadside__bf3246f1","teacher_list":"index_module_teacher_list__bf3246f1","screenshot_Modal":"index_module_screenshot_Modal__bf3246f1","ReactCrop":"index_module_ReactCrop__bf3246f1","screenshot_Modal_btn":"index_module_screenshot_Modal_btn__bf3246f1"};
2476
+ var modules_63b47c51 = {"service_ChatWindow_Drawer":"index_module_service_ChatWindow_Drawer__1cdd11a9","ChatWindow_Modal":"index_module_ChatWindow_Modal__1cdd11a9","ChatWindow_Drawer":"index_module_ChatWindow_Drawer__1cdd11a9","header_wrap":"index_module_header_wrap__1cdd11a9","top":"index_module_top__1cdd11a9","user":"index_module_user__1cdd11a9","count":"index_module_count__1cdd11a9","operate":"index_module_operate__1cdd11a9","line":"index_module_line__1cdd11a9","popover_main":"index_module_popover_main__1cdd11a9","popover":"index_module_popover__1cdd11a9","header_wrap_newlabo":"index_module_header_wrap_newlabo__1cdd11a9","Drawer_main":"index_module_Drawer_main__1cdd11a9","loading":"index_module_loading__1cdd11a9","message_con":"index_module_message_con__1cdd11a9","left":"index_module_left__1cdd11a9","head_sculpture":"index_module_head_sculpture__1cdd11a9","main_content":"index_module_main_content__1cdd11a9","right":"index_module_right__1cdd11a9","main":"index_module_main__1cdd11a9","main_content_flag":"index_module_main_content_flag__1cdd11a9","operate_modal":"index_module_operate_modal__1cdd11a9","operate_modal_bottom":"index_module_operate_modal_bottom__1cdd11a9","active":"index_module_active__1cdd11a9","stop_generate":"index_module_stop_generate__1cdd11a9","icon":"index_module_icon__1cdd11a9","find_teacher":"index_module_find_teacher__1cdd11a9","stop_findTeacher":"index_module_stop_findTeacher__1cdd11a9","content":"index_module_content__1cdd11a9","content_child":"index_module_content_child__1cdd11a9","find_teacher_con":"index_module_find_teacher_con__1cdd11a9","sign":"index_module_sign__1cdd11a9","ask_question":"index_module_ask_question__1cdd11a9","association_problem":"index_module_association_problem__1cdd11a9","association_problem_flag":"index_module_association_problem_flag__1cdd11a9","related_issues_flag":"index_module_related_issues_flag__1cdd11a9","img_con":"index_module_img_con__1cdd11a9","mask_zoom":"index_module_mask_zoom__1cdd11a9","img_con2":"index_module_img_con2__1cdd11a9","copyCode":"index_module_copyCode__1cdd11a9","time":"index_module_time__1cdd11a9","citation_content":"index_module_citation_content__1cdd11a9","text_exceed":"index_module_text_exceed__1cdd11a9","popover_content":"index_module_popover_content__1cdd11a9","Drawer_main_newlabo":"index_module_Drawer_main_newlabo__1cdd11a9","Drawer_main_newlabo_no_pic":"index_module_Drawer_main_newlabo_no_pic__1cdd11a9","Drawer_buttom_Issues_List":"index_module_Drawer_buttom_Issues_List__1cdd11a9","issues_list_teacherList":"index_module_issues_list_teacherList__1cdd11a9","item":"index_module_item__1cdd11a9","issues_list":"index_module_issues_list__1cdd11a9","issues_list_flag":"index_module_issues_list_flag__1cdd11a9","Drawer_buttom":"index_module_Drawer_buttom__1cdd11a9","input_wrap":"index_module_input_wrap__1cdd11a9","input":"index_module_input__1cdd11a9","picture_layout":"index_module_picture_layout__1cdd11a9","icon_close":"index_module_icon_close__1cdd11a9","icon_zoom":"index_module_icon_zoom__1cdd11a9","anticon":"index_module_anticon__1cdd11a9","no_AI":"index_module_no_AI__1cdd11a9","screenshot":"index_module_screenshot__1cdd11a9","disabled":"index_module_disabled__1cdd11a9","content_main":"index_module_content_main__1cdd11a9","content_con":"index_module_content_con__1cdd11a9","delete_quote":"index_module_delete_quote__1cdd11a9","sending":"index_module_sending__1cdd11a9","Drawer_buttom_Issues_List_newlabo":"index_module_Drawer_buttom_Issues_List_newlabo__1cdd11a9","main_list":"index_module_main_list__1cdd11a9","chat_content":"index_module_chat_content__1cdd11a9","popover_main_content":"index_module_popover_main_content__1cdd11a9","popover_main_content_name":"index_module_popover_main_content_name__1cdd11a9","teacher_layout":"index_module_teacher_layout__1cdd11a9","bottom":"index_module_bottom__1cdd11a9","delete":"index_module_delete__1cdd11a9","num":"index_module_num__1cdd11a9","shrink":"index_module_shrink__1cdd11a9","teacher_layout_newlabo":"index_module_teacher_layout_newlabo__1cdd11a9","teacher_layout_modal":"index_module_teacher_layout_modal__1cdd11a9","ai":"index_module_ai__1cdd11a9","user_info":"index_module_user_info__1cdd11a9","message":"index_module_message__1cdd11a9","con":"index_module_con__1cdd11a9","teacher_layout_modal_newlabo":"index_module_teacher_layout_modal_newlabo__1cdd11a9","history_list":"index_module_history_list__1cdd11a9","search_layout":"index_module_search_layout__1cdd11a9","mymove":"index_module_mymove__1cdd11a9","title":"index_module_title__1cdd11a9","search_top":"index_module_search_top__1cdd11a9","list_item":"index_module_list_item__1cdd11a9","list_summary":"index_module_list_summary__1cdd11a9","head_img":"index_module_head_img__1cdd11a9","list_desc":"index_module_list_desc__1cdd11a9","name":"index_module_name__1cdd11a9","decs":"index_module_decs__1cdd11a9","open":"index_module_open__1cdd11a9","list_summary_active":"index_module_list_summary_active__1cdd11a9","list_detail":"index_module_list_detail__1cdd11a9","list":"index_module_list__1cdd11a9","list_more":"index_module_list_more__1cdd11a9","no_data":"index_module_no_data__1cdd11a9","history_list_broadside":"index_module_history_list_broadside__1cdd11a9","teacher_list":"index_module_teacher_list__1cdd11a9","screenshot_Modal":"index_module_screenshot_Modal__1cdd11a9","screenshot_Modal_btn":"index_module_screenshot_Modal_btn__1cdd11a9"};
2477
2477
 
2478
2478
  //消息已读
2479
2479
  var readMessage = function(roomId, urllocation, userData, http) {
@@ -3304,13 +3304,11 @@ var ScreenshotTool = /*#__PURE__*/ forwardRef(function(props, ref) {
3304
3304
  var _useState = _sliced_to_array(useState(), 2), crop = _useState[0], setCrop = _useState[1];
3305
3305
  var _useState1 = _sliced_to_array(useState(), 2), completedCrop = _useState1[0], setCompletedCrop = _useState1[1];
3306
3306
  var _useState2 = _sliced_to_array(useState(16 / 9), 2), aspect = _useState2[0]; _useState2[1];
3307
- var _useState3 = _sliced_to_array(useState(window.devicePixelRatio), 2), devicePixelRatio = _useState3[0]; _useState3[1];
3308
- var _useState4 = _sliced_to_array(useState(true), 2), isFirst = _useState4[0], setIsFirst = _useState4[1];
3309
- var _useState5 = _sliced_to_array(useState({
3307
+ var _useState3 = _sliced_to_array(useState({
3310
3308
  top: 0,
3311
3309
  left: 0
3312
- }), 2), btnPosition = _useState5[0], setBtnPosition = _useState5[1];
3313
- var _useState6 = _sliced_to_array(useState(false), 2), showBtn = _useState6[0], setShowBtn = _useState6[1];
3310
+ }), 2), btnPosition = _useState3[0], setBtnPosition = _useState3[1];
3311
+ var _useState4 = _sliced_to_array(useState(false), 2), showBtn = _useState4[0], setShowBtn = _useState4[1];
3314
3312
  function centerAspectCrop(mediaWidth, mediaHeight, aspect) {
3315
3313
  return I(H({
3316
3314
  unit: "%",
@@ -3338,10 +3336,10 @@ var ScreenshotTool = /*#__PURE__*/ forwardRef(function(props, ref) {
3338
3336
  image.src = imgBese64; // 将'your_image_url'替换为你自己的图片URL
3339
3337
  // 等待图片加载完成后再进行操作
3340
3338
  image.onload = function() {
3341
- var x = parseInt((completedCrop.x * devicePixelRatio).toString()); // 起始点x坐标
3342
- var y = parseInt((completedCrop.y * devicePixelRatio).toString()); // 起始点y坐标
3343
- var width = parseInt((completedCrop.width * devicePixelRatio).toString()); // 需要裁剪的区域宽度
3344
- var height = parseInt((completedCrop.height * devicePixelRatio).toString()); // 需要裁剪的区域高度
3339
+ var x = completedCrop.x; // 起始点x坐标
3340
+ var y = completedCrop.y; // 起始点y坐标
3341
+ var width = completedCrop.width; // 需要裁剪的区域宽度
3342
+ var height = completedCrop.height; // 需要裁剪的区域高度
3345
3343
  // 设置canvas大小与裁剪区域相同
3346
3344
  canvas.width = width;
3347
3345
  canvas.height = height;
@@ -3362,7 +3360,7 @@ var ScreenshotTool = /*#__PURE__*/ forwardRef(function(props, ref) {
3362
3360
  var y = e.y;
3363
3361
  var h = e.height;
3364
3362
  var w = e.width;
3365
- var top = y + h + (isFirst ? 21 : 8);
3363
+ var top = y + h + 8;
3366
3364
  var left = x + w - 88;
3367
3365
  if (top + 42 > window.innerHeight) {
3368
3366
  top = top - 50;
@@ -3372,7 +3370,6 @@ var ScreenshotTool = /*#__PURE__*/ forwardRef(function(props, ref) {
3372
3370
  left: left
3373
3371
  });
3374
3372
  setShowBtn(true);
3375
- setIsFirst(false);
3376
3373
  };
3377
3374
  return /*#__PURE__*/ jsxs("div", {
3378
3375
  className: modules_63b47c51.screenshot_Modal,
@@ -3398,9 +3395,6 @@ var ScreenshotTool = /*#__PURE__*/ forwardRef(function(props, ref) {
3398
3395
  minWidth: 100,
3399
3396
  children: /*#__PURE__*/ jsx("img", {
3400
3397
  alt: "Crop me",
3401
- style: {
3402
- display: "none"
3403
- },
3404
3398
  src: imgBese64,
3405
3399
  onLoad: onImageLoad
3406
3400
  })
@@ -3730,7 +3724,7 @@ var img = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAA
3730
3724
  var styles = modules_63b47c51;
3731
3725
  var TextArea = Input.TextArea;
3732
3726
  var CustomerService = function(props) {
3733
- var userData = props.userData, http = props.http, urllocation = props.urllocation, onCancel = props.onCancel, serverName = props.serverName, fetchEventSource = props.fetchEventSource, initShowType = props.initShowType, onEvent = props.onEvent, stepIds = props.stepIds, stepId = props.stepId; props.screenshotAreaId; var config = props.config;
3727
+ var userData = props.userData, http = props.http, urllocation = props.urllocation, onCancel = props.onCancel, serverName = props.serverName, fetchEventSource = props.fetchEventSource, initShowType = props.initShowType, onEvent = props.onEvent, stepIds = props.stepIds, stepId = props.stepId, screenshotAreaId = props.screenshotAreaId, config = props.config;
3734
3728
  // const { bese64String, startRecord, stopRecord } = useMediaRecorder(); //语音转文字
3735
3729
  // const [voiceRecordingStatus, setVoiceRecordingStatus] = useState(3); //语音录制状态 3,语音识别完成 2,录制中, 1,录制结束
3736
3730
  var _useState = _sliced_to_array(useState([]), 2), copyTextOBJ = _useState[0], setCopyTextObj = _useState[1]; //复制的消息id
@@ -3807,118 +3801,33 @@ var CustomerService = function(props) {
3807
3801
  initShowType
3808
3802
  ]);
3809
3803
  useEffect(function() {
3810
- function handlerHtml2canvas() {
3811
- console.log("kkkkkkkkkkk");
3804
+ //|| showScreenshot
3805
+ if (showType == 5 || showScreenshot) {
3812
3806
  try {
3813
3807
  newShowType.current = true;
3814
3808
  setImgBese64("");
3815
- var plugin = new screenShotPlugin({
3816
- clickCutFullScreen: true,
3817
- enableWebRtc: true,
3818
- loadCrossImg: true,
3819
- canvasWidth: window.innerWidth,
3820
- canvasHeight: window.innerHeight,
3821
- level: -1,
3822
- hiddenToolIco: true,
3823
- screenShotDom: document.body,
3824
- cropBoxInfo: {
3825
- x: 0,
3826
- y: 0,
3827
- w: window.innerWidth,
3828
- h: window.innerHeight
3829
- },
3830
- wrcReplyTime: 20,
3831
- wrcWindowMode: true,
3832
- hiddenScrollBar: {
3833
- state: true
3834
- },
3835
- completeCallback: function(param) {
3836
- var base64 = param.base64;
3837
- // console.log(
3838
- // "截图组件加载完毕调用此方法来完成框选区域的截图",
3839
- // base64
3840
- // );
3841
- setImgBese64(base64);
3842
- },
3843
- triggerCallback: function() {
3844
- // 截图组件加载完毕调用此方法来完成框选区域的截图
3845
- plugin.completeScreenshot();
3846
- },
3847
- cancelCallback: function(err) {
3848
- if (err.code === -1) {
3849
- console.log(err);
3850
- newShowType.current = false;
3851
- if (saveShowType != -1) {
3852
- setShowType(saveShowType);
3853
- } else {
3854
- setShowType(1);
3855
- }
3856
- setShowScreenshot(false);
3857
- onCancel();
3858
- }
3809
+ // let dom = document.getElementById(screenshotAreaId);
3810
+ html2canvas(screenshotAreaId, {
3811
+ useCORS: true,
3812
+ // allowTaint: true, // 污染处理
3813
+ scale: 1,
3814
+ // logging:true,
3815
+ ignoreElements: function(element) {
3816
+ if (element.compareDocumentPosition(screenshotAreaId) === 2) return true;
3817
+ return false;
3859
3818
  }
3819
+ }).then(function(canvas) {
3820
+ // document.body.appendChild(canvas);
3821
+ console.log(canvas, 99999);
3822
+ // var base64URL = canvas.toDataURL('image/jpeg')
3823
+ var base64URL = canvas.toDataURL("image/jpg", 1.0);
3824
+ console.log(base64URL);
3825
+ setImgBese64(base64URL);
3860
3826
  });
3861
- // modernScreenshot
3862
- // .domToPng(document.querySelector("body"))
3863
- // .then((dataUrl:any) => {
3864
- // console.log(dataUrl);
3865
- // setImgBese64(dataUrl);
3866
- // });
3867
- // domtoimage
3868
- // .toPng(document.body)
3869
- // .then(function (dataUrl:any) {
3870
- // setImgBese64(dataUrl);
3871
- // })
3872
- // .catch(function (error:any) {
3873
- // console.error("oops, something went wrong!", error);
3874
- // });
3875
- // //排除
3876
- // new screenShotPlugin({
3877
- // enableWebRtc: true,
3878
- // canvasWidth:window.innerWidth,
3879
- // canvasHeight:window.innerHeight,
3880
- // level:9999999,
3881
- // completeCallback: function (info:any) {
3882
- // console.log(info);
3883
- // setImgBese64(info.base64);
3884
- // },
3885
- // closeCallback: function () {
3886
- // },
3887
- // });
3888
- // html2canvas(document.body,{//__docusaurus
3889
- // useCORS: true, // 支持跨域图片截图
3890
- // allowTaint: true, // 污染处理
3891
- // scale: 1 ,// 图片比例
3892
- // logging:false,
3893
- // // foreignObjectRendering:true,
3894
- // ignoreElements:(element: { compareDocumentPosition: (arg0: string) => number; })=>{
3895
- // if(element.compareDocumentPosition(screenshotAreaId)===2)return true
3896
- // return false
3897
- // },
3898
- // windowWidth:window.innerWidth,
3899
- // windowHeight:window.innerHeight
3900
- // })
3901
- // .then(function (canvas:any) {
3902
- // // document.body.appendChild(canvas);
3903
- // // console.log(canvas,99999);
3904
- // // var base64URL = canvas.toDataURL('image/jpeg')
3905
- // let base64URL = canvas.toDataURL("image/jpg", 1.0)
3906
- // // console.log(base64URL);
3907
- // setImgBese64(base64URL);
3908
- // // svgNodesToRemove.forEach(item=>{
3909
- // // item.remove()
3910
- // // })
3911
- // });
3912
3827
  } catch (error) {
3913
3828
  console.log(error);
3914
3829
  }
3915
3830
  }
3916
- //|| showScreenshot
3917
- if (showType == 5 || showScreenshot) {
3918
- console.log("bbbbbbbbbbbbbb");
3919
- handlerHtml2canvas();
3920
- // window.addEventListener('resize',handlerHtml2canvas)
3921
- }
3922
3831
  if (showType != 1 && !firstLoad && pageCount > 0) {
3923
3832
  setFirstLoad(true);
3924
3833
  scrollToBottom();
@@ -3978,7 +3887,6 @@ var CustomerService = function(props) {
3978
3887
  if (content) {
3979
3888
  content.removeEventListener("scroll", handleScroll);
3980
3889
  }
3981
- window.removeEventListener("resize", handlerHtml2canvas);
3982
3890
  };
3983
3891
  }, [
3984
3892
  historyMessageList,
@@ -5505,18 +5413,11 @@ var CustomerService = function(props) {
5505
5413
  /*#__PURE__*/ jsxs("div", {
5506
5414
  className: styles.operate,
5507
5415
  children: [
5508
- /*#__PURE__*/ jsxs("i", {
5509
- className: styles.popover_main,
5416
+ /*#__PURE__*/ jsx("i", {
5510
5417
  onClick: function() {
5511
5418
  setShowHistory(true);
5512
5419
  },
5513
- children: [
5514
- /*#__PURE__*/ jsx(CustomRecord$1, {}),
5515
- /*#__PURE__*/ jsx("span", {
5516
- className: styles.popover,
5517
- children: "历史记录"
5518
- })
5519
- ]
5420
+ children: /*#__PURE__*/ jsx(CustomRecord$1, {})
5520
5421
  }),
5521
5422
  /*#__PURE__*/ jsx("span", {
5522
5423
  className: styles.line
@@ -5536,14 +5437,20 @@ var CustomerService = function(props) {
5536
5437
  })
5537
5438
  ]
5538
5439
  }),
5539
- /*#__PURE__*/ jsx("i", {
5440
+ /*#__PURE__*/ jsxs("i", {
5540
5441
  className: styles.popover_main,
5541
5442
  onClick: function() {
5542
5443
  onEvent(serverName + serverUrl(), "click_智能问答_退出全屏", "提交");
5543
5444
  setShowType(3);
5544
5445
  setFirstLoad(false); //重启滚动条在最上方
5545
5446
  },
5546
- children: /*#__PURE__*/ jsx(CloseOutlined, {})
5447
+ children: [
5448
+ /*#__PURE__*/ jsx(CloseOutlined, {}),
5449
+ /*#__PURE__*/ jsx("span", {
5450
+ className: styles.popover,
5451
+ children: "退出全屏"
5452
+ })
5453
+ ]
5547
5454
  })
5548
5455
  ]
5549
5456
  })
@@ -7231,9 +7138,6 @@ var CustomerService = function(props) {
7231
7138
  }),
7232
7139
  (showType == 4 || showType == 5) && /*#__PURE__*/ jsxs("div", {
7233
7140
  className: "".concat(styles.ChatWindow_Drawer),
7234
- style: {
7235
- display: "".concat(!showScreenshot ? "none" : "flex")
7236
- },
7237
7141
  id: "",
7238
7142
  children: [
7239
7143
  /*#__PURE__*/ jsx("div", {