bhd-components 0.9.6 → 0.9.7

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.
@@ -59,10 +59,10 @@ var config = {
59
59
  var config$1 = config;
60
60
 
61
61
  var Modal = {};
62
- var message = {};
62
+ var message$1 = {};
63
63
  function BhdTipModal$2() {
64
64
  var staticFunction = App.useApp();
65
- message = _object_spread({}, AntdMessage, staticFunction.message);
65
+ message$1 = _object_spread({}, AntdMessage, staticFunction.message);
66
66
  Modal = _object_spread({}, Modal$1, staticFunction.modal);
67
67
  _object_spread({}, AntdNotification, staticFunction.notification);
68
68
  return null;
@@ -1154,37 +1154,37 @@ var BhdMessage = _object_spread_props(_object_spread({}, AntdMessage), {
1154
1154
  customSuccess: function(config) {
1155
1155
  var className = modules_63b47c51$9.customSuccess;
1156
1156
  if (typeof config === "string") {
1157
- return message.success({
1157
+ return message$1.success({
1158
1158
  content: config,
1159
1159
  className: className
1160
1160
  });
1161
1161
  }
1162
- return message.success(_object_spread_props(_object_spread({}, config), {
1162
+ return message$1.success(_object_spread_props(_object_spread({}, config), {
1163
1163
  className: "".concat(className, " ").concat(config.className || "")
1164
1164
  }));
1165
1165
  },
1166
1166
  customWarning: function(config) {
1167
1167
  var className = modules_63b47c51$9.customWarning;
1168
1168
  if (typeof config === "string") {
1169
- return message.warning({
1169
+ return message$1.warning({
1170
1170
  content: config,
1171
1171
  className: className
1172
1172
  });
1173
1173
  }
1174
- return message.warning(_object_spread_props(_object_spread({}, config), {
1174
+ return message$1.warning(_object_spread_props(_object_spread({}, config), {
1175
1175
  className: "".concat(className, " ").concat(config.className || "")
1176
1176
  }));
1177
1177
  },
1178
1178
  customError: function(config) {
1179
1179
  var className = modules_63b47c51$9.customError;
1180
1180
  if (typeof config === "string") {
1181
- return message.error({
1181
+ return message$1.error({
1182
1182
  content: config,
1183
1183
  className: className,
1184
1184
  icon: /*#__PURE__*/ jsx(ExclamationCircleFilled, {})
1185
1185
  });
1186
1186
  }
1187
- return message.error(_object_spread_props(_object_spread({}, config), {
1187
+ return message$1.error(_object_spread_props(_object_spread({}, config), {
1188
1188
  className: "".concat(className, " ").concat(config.className || ""),
1189
1189
  icon: config.icon || /*#__PURE__*/ jsx(ExclamationCircleFilled, {})
1190
1190
  }));
@@ -1193,58 +1193,58 @@ var BhdMessage = _object_spread_props(_object_spread({}, AntdMessage), {
1193
1193
  for(var _len = arguments.length, arg = new Array(_len), _key = 0; _key < _len; _key++){
1194
1194
  arg[_key] = arguments[_key];
1195
1195
  }
1196
- return (_message = message).open.apply(_message, _to_consumable_array(arg));
1196
+ return (_message = message$1).open.apply(_message, _to_consumable_array(arg));
1197
1197
  },
1198
1198
  destroy: function() {
1199
1199
  for(var _len = arguments.length, arg = new Array(_len), _key = 0; _key < _len; _key++){
1200
1200
  arg[_key] = arguments[_key];
1201
1201
  }
1202
- return (_message1 = message).destroy.apply(_message1, _to_consumable_array(arg));
1202
+ return (_message1 = message$1).destroy.apply(_message1, _to_consumable_array(arg));
1203
1203
  },
1204
1204
  error: function() {
1205
1205
  for(var _len = arguments.length, arg = new Array(_len), _key = 0; _key < _len; _key++){
1206
1206
  arg[_key] = arguments[_key];
1207
1207
  }
1208
- return (_message2 = message).error.apply(_message2, _to_consumable_array(arg));
1208
+ return (_message2 = message$1).error.apply(_message2, _to_consumable_array(arg));
1209
1209
  },
1210
1210
  info: function() {
1211
1211
  for(var _len = arguments.length, arg = new Array(_len), _key = 0; _key < _len; _key++){
1212
1212
  arg[_key] = arguments[_key];
1213
1213
  }
1214
- return (_message3 = message).info.apply(_message3, _to_consumable_array(arg));
1214
+ return (_message3 = message$1).info.apply(_message3, _to_consumable_array(arg));
1215
1215
  },
1216
1216
  loading: function() {
1217
1217
  for(var _len = arguments.length, arg = new Array(_len), _key = 0; _key < _len; _key++){
1218
1218
  arg[_key] = arguments[_key];
1219
1219
  }
1220
- return (_message4 = message).loading.apply(_message4, _to_consumable_array(arg));
1220
+ return (_message4 = message$1).loading.apply(_message4, _to_consumable_array(arg));
1221
1221
  },
1222
1222
  success: function() {
1223
1223
  for(var _len = arguments.length, arg = new Array(_len), _key = 0; _key < _len; _key++){
1224
1224
  arg[_key] = arguments[_key];
1225
1225
  }
1226
- return (_message5 = message).success.apply(_message5, _to_consumable_array(arg));
1226
+ return (_message5 = message$1).success.apply(_message5, _to_consumable_array(arg));
1227
1227
  },
1228
1228
  useMessage: function() {
1229
1229
  for(var _len = arguments.length, arg = new Array(_len), _key = 0; _key < _len; _key++){
1230
1230
  arg[_key] = arguments[_key];
1231
1231
  }
1232
- return (_message6 = message).useMessage.apply(_message6, _to_consumable_array(arg));
1232
+ return (_message6 = message$1).useMessage.apply(_message6, _to_consumable_array(arg));
1233
1233
  },
1234
1234
  warning: function() {
1235
1235
  for(var _len = arguments.length, arg = new Array(_len), _key = 0; _key < _len; _key++){
1236
1236
  arg[_key] = arguments[_key];
1237
1237
  }
1238
- return (_message7 = message).warning.apply(_message7, _to_consumable_array(arg));
1238
+ return (_message7 = message$1).warning.apply(_message7, _to_consumable_array(arg));
1239
1239
  },
1240
1240
  _InternalPanelDoNotUseOrYouWillBeFired: function() {
1241
1241
  for(var _len = arguments.length, arg = new Array(_len), _key = 0; _key < _len; _key++){
1242
1242
  arg[_key] = arguments[_key];
1243
1243
  }
1244
- return (_message8 = message)._InternalPanelDoNotUseOrYouWillBeFired.apply(_message8, _to_consumable_array(arg));
1244
+ return (_message8 = message$1)._InternalPanelDoNotUseOrYouWillBeFired.apply(_message8, _to_consumable_array(arg));
1245
1245
  }
1246
1246
  });
1247
- var BhdMessage$1 = BhdMessage;
1247
+ var message = BhdMessage;
1248
1248
 
1249
1249
  var modules_63b47c51$8 = {"pagination":"index_module_pagination__db6ba815"};
1250
1250
 
@@ -2406,8 +2406,11 @@ function BhdAppLayout(props) {
2406
2406
  var otherHeadRef = useRef(null);
2407
2407
  var otherContentRef = useRef(null);
2408
2408
  var filterRef = useRef(null);
2409
- useLayoutEffect(function() {
2410
- windowChange();
2409
+ useEffect(function() {
2410
+ window.addEventListener("resize", windowChange);
2411
+ return function() {
2412
+ window.removeEventListener("resize", windowChange);
2413
+ };
2411
2414
  }, []);
2412
2415
  useLayoutEffect(function() {
2413
2416
  windowChange();
@@ -2418,7 +2421,7 @@ function BhdAppLayout(props) {
2418
2421
  (_otherContentRef = otherContentRef) === null || _otherContentRef === void 0 ? void 0 : (_otherContentRef_current = _otherContentRef.current) === null || _otherContentRef_current === void 0 ? void 0 : _otherContentRef_current.offsetHeight
2419
2422
  ]);
2420
2423
  return /*#__PURE__*/ jsxs("div", {
2421
- className: "".concat(modules_63b47c51$2.bhd_app_layout, " ").concat(modules_63b47c51$2.className, " ").concat(className || ""),
2424
+ className: "".concat(modules_63b47c51$2.bhd_app_layout, " ").concat(className || ""),
2422
2425
  children: [
2423
2426
  /*#__PURE__*/ jsx("header", {
2424
2427
  ref: headRef,
@@ -2503,7 +2506,7 @@ function BhdAppLayout(props) {
2503
2506
  });
2504
2507
  }
2505
2508
 
2506
- var modules_63b47c51$1 = {"service_ChatWindow_Drawer":"index_module_service_ChatWindow_Drawer__afe72fcd","ChatWindow_Modal":"index_module_ChatWindow_Modal__afe72fcd","ChatWindow_Drawer":"index_module_ChatWindow_Drawer__afe72fcd","header_wrap":"index_module_header_wrap__afe72fcd","top":"index_module_top__afe72fcd","user":"index_module_user__afe72fcd","count":"index_module_count__afe72fcd","operate":"index_module_operate__afe72fcd","line":"index_module_line__afe72fcd","popover_main":"index_module_popover_main__afe72fcd","popover":"index_module_popover__afe72fcd","header_wrap_newlabo":"index_module_header_wrap_newlabo__afe72fcd","Drawer_main":"index_module_Drawer_main__afe72fcd","loading":"index_module_loading__afe72fcd","message_con":"index_module_message_con__afe72fcd","left":"index_module_left__afe72fcd","head_sculpture":"index_module_head_sculpture__afe72fcd","main_content":"index_module_main_content__afe72fcd","right":"index_module_right__afe72fcd","main":"index_module_main__afe72fcd","main_content_flag":"index_module_main_content_flag__afe72fcd","operate_modal":"index_module_operate_modal__afe72fcd","operate_modal_bottom":"index_module_operate_modal_bottom__afe72fcd","active":"index_module_active__afe72fcd","stop_generate":"index_module_stop_generate__afe72fcd","icon":"index_module_icon__afe72fcd","find_teacher":"index_module_find_teacher__afe72fcd","stop_findTeacher":"index_module_stop_findTeacher__afe72fcd","content":"index_module_content__afe72fcd","content_child":"index_module_content_child__afe72fcd","find_teacher_con":"index_module_find_teacher_con__afe72fcd","sign":"index_module_sign__afe72fcd","ask_question":"index_module_ask_question__afe72fcd","association_problem":"index_module_association_problem__afe72fcd","association_problem_flag":"index_module_association_problem_flag__afe72fcd","related_issues_flag":"index_module_related_issues_flag__afe72fcd","img_con":"index_module_img_con__afe72fcd","mask_zoom":"index_module_mask_zoom__afe72fcd","img_con2":"index_module_img_con2__afe72fcd","copyCode":"index_module_copyCode__afe72fcd","time":"index_module_time__afe72fcd","citation_content":"index_module_citation_content__afe72fcd","text_exceed":"index_module_text_exceed__afe72fcd","popover_content":"index_module_popover_content__afe72fcd","Drawer_main_newlabo":"index_module_Drawer_main_newlabo__afe72fcd","Drawer_main_newlabo_no_pic":"index_module_Drawer_main_newlabo_no_pic__afe72fcd","Drawer_buttom_Issues_List":"index_module_Drawer_buttom_Issues_List__afe72fcd","issues_list_teacherList":"index_module_issues_list_teacherList__afe72fcd","item":"index_module_item__afe72fcd","issues_list":"index_module_issues_list__afe72fcd","issues_list_flag":"index_module_issues_list_flag__afe72fcd","Drawer_buttom":"index_module_Drawer_buttom__afe72fcd","input_wrap":"index_module_input_wrap__afe72fcd","input":"index_module_input__afe72fcd","picture_layout":"index_module_picture_layout__afe72fcd","icon_close":"index_module_icon_close__afe72fcd","icon_zoom":"index_module_icon_zoom__afe72fcd","anticon":"index_module_anticon__afe72fcd","no_AI":"index_module_no_AI__afe72fcd","screenshot":"index_module_screenshot__afe72fcd","disabled":"index_module_disabled__afe72fcd","content_main":"index_module_content_main__afe72fcd","content_con":"index_module_content_con__afe72fcd","delete_quote":"index_module_delete_quote__afe72fcd","sending":"index_module_sending__afe72fcd","Drawer_buttom_Issues_List_newlabo":"index_module_Drawer_buttom_Issues_List_newlabo__afe72fcd","main_list":"index_module_main_list__afe72fcd","chat_content":"index_module_chat_content__afe72fcd","popover_main_content":"index_module_popover_main_content__afe72fcd","popover_main_content_name":"index_module_popover_main_content_name__afe72fcd","teacher_layout":"index_module_teacher_layout__afe72fcd","bottom":"index_module_bottom__afe72fcd","delete":"index_module_delete__afe72fcd","num":"index_module_num__afe72fcd","shrink":"index_module_shrink__afe72fcd","teacher_layout_newlabo":"index_module_teacher_layout_newlabo__afe72fcd","teacher_layout_modal":"index_module_teacher_layout_modal__afe72fcd","ai":"index_module_ai__afe72fcd","user_info":"index_module_user_info__afe72fcd","message":"index_module_message__afe72fcd","con":"index_module_con__afe72fcd","teacher_layout_modal_newlabo":"index_module_teacher_layout_modal_newlabo__afe72fcd","history_list":"index_module_history_list__afe72fcd","search_layout":"index_module_search_layout__afe72fcd","mymove":"index_module_mymove__afe72fcd","title":"index_module_title__afe72fcd","search_top":"index_module_search_top__afe72fcd","list_item":"index_module_list_item__afe72fcd","list_summary":"index_module_list_summary__afe72fcd","head_img":"index_module_head_img__afe72fcd","list_desc":"index_module_list_desc__afe72fcd","name":"index_module_name__afe72fcd","decs":"index_module_decs__afe72fcd","open":"index_module_open__afe72fcd","list_summary_active":"index_module_list_summary_active__afe72fcd","list_detail":"index_module_list_detail__afe72fcd","list":"index_module_list__afe72fcd","list_more":"index_module_list_more__afe72fcd","no_data":"index_module_no_data__afe72fcd","history_list_broadside":"index_module_history_list_broadside__afe72fcd","teacher_list":"index_module_teacher_list__afe72fcd","screenshot_Modal":"index_module_screenshot_Modal__afe72fcd","ReactCrop":"index_module_ReactCrop__afe72fcd","screenshot_Modal_btn":"index_module_screenshot_Modal_btn__afe72fcd"};
2509
+ var modules_63b47c51$1 = {"service_ChatWindow_Drawer":"index_module_service_ChatWindow_Drawer__344883f9","ChatWindow_Modal":"index_module_ChatWindow_Modal__344883f9","ChatWindow_Drawer":"index_module_ChatWindow_Drawer__344883f9","header_wrap":"index_module_header_wrap__344883f9","top":"index_module_top__344883f9","user":"index_module_user__344883f9","count":"index_module_count__344883f9","operate":"index_module_operate__344883f9","line":"index_module_line__344883f9","popover_main":"index_module_popover_main__344883f9","popover":"index_module_popover__344883f9","header_wrap_newlabo":"index_module_header_wrap_newlabo__344883f9","Drawer_main":"index_module_Drawer_main__344883f9","loading":"index_module_loading__344883f9","message_con":"index_module_message_con__344883f9","left":"index_module_left__344883f9","head_sculpture":"index_module_head_sculpture__344883f9","main_content":"index_module_main_content__344883f9","right":"index_module_right__344883f9","main":"index_module_main__344883f9","main_content_flag":"index_module_main_content_flag__344883f9","operate_modal":"index_module_operate_modal__344883f9","operate_modal_bottom":"index_module_operate_modal_bottom__344883f9","active":"index_module_active__344883f9","stop_generate":"index_module_stop_generate__344883f9","icon":"index_module_icon__344883f9","find_teacher":"index_module_find_teacher__344883f9","stop_findTeacher":"index_module_stop_findTeacher__344883f9","content":"index_module_content__344883f9","content_child":"index_module_content_child__344883f9","find_teacher_con":"index_module_find_teacher_con__344883f9","sign":"index_module_sign__344883f9","ask_question":"index_module_ask_question__344883f9","bottom":"index_module_bottom__344883f9","association_problem":"index_module_association_problem__344883f9","association_problem_flag":"index_module_association_problem_flag__344883f9","related_issues_flag":"index_module_related_issues_flag__344883f9","img_con":"index_module_img_con__344883f9","mask_zoom":"index_module_mask_zoom__344883f9","img_con2":"index_module_img_con2__344883f9","copyCode":"index_module_copyCode__344883f9","time":"index_module_time__344883f9","citation_content":"index_module_citation_content__344883f9","text_exceed":"index_module_text_exceed__344883f9","popover_content":"index_module_popover_content__344883f9","Drawer_main_newlabo":"index_module_Drawer_main_newlabo__344883f9","Drawer_main_newlabo_no_pic":"index_module_Drawer_main_newlabo_no_pic__344883f9","Drawer_buttom_Issues_List":"index_module_Drawer_buttom_Issues_List__344883f9","issues_list_teacherList":"index_module_issues_list_teacherList__344883f9","item":"index_module_item__344883f9","issues_list":"index_module_issues_list__344883f9","issues_list_flag":"index_module_issues_list_flag__344883f9","Drawer_buttom":"index_module_Drawer_buttom__344883f9","input_wrap":"index_module_input_wrap__344883f9","input":"index_module_input__344883f9","picture_layout":"index_module_picture_layout__344883f9","icon_close":"index_module_icon_close__344883f9","icon_zoom":"index_module_icon_zoom__344883f9","anticon":"index_module_anticon__344883f9","no_AI":"index_module_no_AI__344883f9","screenshot":"index_module_screenshot__344883f9","disabled":"index_module_disabled__344883f9","content_main":"index_module_content_main__344883f9","content_con":"index_module_content_con__344883f9","delete_quote":"index_module_delete_quote__344883f9","sending":"index_module_sending__344883f9","Drawer_buttom_Issues_List_newlabo":"index_module_Drawer_buttom_Issues_List_newlabo__344883f9","main_list":"index_module_main_list__344883f9","chat_content":"index_module_chat_content__344883f9","popover_main_content":"index_module_popover_main_content__344883f9","popover_main_content_name":"index_module_popover_main_content_name__344883f9","teacher_layout":"index_module_teacher_layout__344883f9","delete":"index_module_delete__344883f9","num":"index_module_num__344883f9","shrink":"index_module_shrink__344883f9","teacher_layout_newlabo":"index_module_teacher_layout_newlabo__344883f9","teacher_layout_modal":"index_module_teacher_layout_modal__344883f9","ai":"index_module_ai__344883f9","user_info":"index_module_user_info__344883f9","message":"index_module_message__344883f9","con":"index_module_con__344883f9","teacher_layout_modal_newlabo":"index_module_teacher_layout_modal_newlabo__344883f9","history_list":"index_module_history_list__344883f9","search_layout":"index_module_search_layout__344883f9","mymove":"index_module_mymove__344883f9","title":"index_module_title__344883f9","search_top":"index_module_search_top__344883f9","list_item":"index_module_list_item__344883f9","list_summary":"index_module_list_summary__344883f9","head_img":"index_module_head_img__344883f9","list_desc":"index_module_list_desc__344883f9","name":"index_module_name__344883f9","decs":"index_module_decs__344883f9","open":"index_module_open__344883f9","list_summary_active":"index_module_list_summary_active__344883f9","list_detail":"index_module_list_detail__344883f9","list":"index_module_list__344883f9","list_more":"index_module_list_more__344883f9","no_data":"index_module_no_data__344883f9","history_list_broadside":"index_module_history_list_broadside__344883f9","teacher_list":"index_module_teacher_list__344883f9","screenshot_Modal":"index_module_screenshot_Modal__344883f9","ReactCrop":"index_module_ReactCrop__344883f9","screenshot_Modal_btn":"index_module_screenshot_Modal_btn__344883f9"};
2507
2510
 
2508
2511
  //消息已读
2509
2512
  var readMessage = function(roomId, urllocation, userData, http) {
@@ -6793,7 +6796,7 @@ var ScreenShot = /*#__PURE__*/ function() {
6793
6796
  // 开始捕捉屏幕
6794
6797
  _define_property(this, "startCapture", function() {
6795
6798
  var _ref = _async_to_generator(function(cancelCallback) {
6796
- var captureStream, mediaWidth, mediaHeight, displayConfig, err;
6799
+ var captureStream, mediaWidth, mediaHeight, displayConfig, _captureStream_getVideoTracks, track, displaySurface, err;
6797
6800
  return __generator(this, function(_state) {
6798
6801
  switch(_state.label){
6799
6802
  case 0:
@@ -6826,6 +6829,10 @@ var ScreenShot = /*#__PURE__*/ function() {
6826
6829
  width: mediaWidth,
6827
6830
  height: mediaHeight
6828
6831
  }, displayConfig),
6832
+ systemAudio: "exclude",
6833
+ surfaceSwitching: "exclude",
6834
+ monitorTypeSurfaces: "exclude",
6835
+ selfBrowserSurface: "include",
6829
6836
  // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
6830
6837
  // @ts-ignore
6831
6838
  // 当前标签页默认true true:不需要选择 false:需要自己选择
@@ -6836,6 +6843,18 @@ var ScreenShot = /*#__PURE__*/ function() {
6836
6843
  // console.log("开始捕捉屏幕", { mediaWidth, mediaHeight });
6837
6844
  // 捕获屏幕
6838
6845
  captureStream = _state.sent();
6846
+ _captureStream_getVideoTracks = _sliced_to_array(captureStream.getVideoTracks(), 1), track = _captureStream_getVideoTracks[0];
6847
+ displaySurface = track.getSettings().displaySurface;
6848
+ // console.log('displaySurface',displaySurface)
6849
+ // console.log('track',track)
6850
+ if (displaySurface && displaySurface !== "window") {
6851
+ track.stop();
6852
+ throw {
6853
+ code: -2,
6854
+ msg: "请选择窗口的内容",
6855
+ errorInfo: "请选择窗口的内容"
6856
+ };
6857
+ }
6839
6858
  // 将MediaStream输出至video标签
6840
6859
  _this1.videoController.srcObject = captureStream;
6841
6860
  // 储存屏幕流数据
@@ -6846,16 +6865,17 @@ var ScreenShot = /*#__PURE__*/ function() {
6846
6865
  ];
6847
6866
  case 3:
6848
6867
  err = _state.sent();
6868
+ console.log("catchcatchcatch", err);
6849
6869
  if (cancelCallback != null) {
6850
- cancelCallback({
6870
+ cancelCallback(_object_spread({
6851
6871
  code: -1,
6852
6872
  msg: "浏览器不支持webrtc或者用户未授权",
6853
- errorInfo: err
6854
- });
6873
+ errorInfo: typeof err === "string" ? err : err.errorInfo
6874
+ }, err));
6855
6875
  }
6856
6876
  // 销毁截图组件
6857
6877
  _this1.data.destroyDOM();
6858
- throw "浏览器不支持webrtc或者用户未授权( ".concat(err, " )");
6878
+ throw "浏览器不支持webrtc或者用户未授权( ".concat(typeof err === "string" ? err : err.errorInfo, " )");
6859
6879
  case 4:
6860
6880
  return [
6861
6881
  2,
@@ -7902,6 +7922,7 @@ var CustomerService = function(props) {
7902
7922
  });
7903
7923
  var _useState33 //1是 screenShotPlugin 2是html2canvas
7904
7924
  = _sliced_to_array(useState(0), 2), screenShotType = _useState33[0], setScreenShotType = _useState33[1];
7925
+ var screenShotPlugin = useRef();
7905
7926
  useEffect(function() {
7906
7927
  // if(config && config.type == 'video'){
7907
7928
  // //获取热门推荐
@@ -7921,7 +7942,7 @@ var CustomerService = function(props) {
7921
7942
  setScreenShotType(1);
7922
7943
  console.log("看看变了没有1213133");
7923
7944
  console.log("截图方式:【screenShotPlugin】", ScreenShot);
7924
- var plugin = new ScreenShot({
7945
+ screenShotPlugin.current = new ScreenShot({
7925
7946
  clickCutFullScreen: true,
7926
7947
  enableWebRtc: true,
7927
7948
  loadCrossImg: true,
@@ -7949,13 +7970,14 @@ var CustomerService = function(props) {
7949
7970
  // base64
7950
7971
  // );
7951
7972
  setImgBese64(base64);
7973
+ window.addEventListener("resize", cancelScreenshot);
7952
7974
  },
7953
7975
  triggerCallback: function() {
7954
7976
  // 截图组件加载完毕调用此方法来完成框选区域的截图
7955
- plugin.completeScreenshot();
7977
+ screenShotPlugin.current.completeScreenshot();
7956
7978
  },
7957
7979
  cancelCallback: function(err) {
7958
- if (err.code === -1) {
7980
+ if (err.code === -1 || err.code === -2) {
7959
7981
  console.log(err);
7960
7982
  newShowType.current = false;
7961
7983
  if (saveShowType != -1) {
@@ -7964,7 +7986,9 @@ var CustomerService = function(props) {
7964
7986
  setShowType(1);
7965
7987
  }
7966
7988
  setShowScreenshot(false);
7967
- onCancel();
7989
+ if (err.code === -2) {
7990
+ message.customError(err.msg);
7991
+ }
7968
7992
  }
7969
7993
  }
7970
7994
  });
@@ -8026,6 +8050,19 @@ var CustomerService = function(props) {
8026
8050
  console.log(error);
8027
8051
  }
8028
8052
  }
8053
+ function cancelScreenshot() {
8054
+ console.log("cancelScreenshotcancelScreenshotcancelScreenshot");
8055
+ newShowType.current = false;
8056
+ if (saveShowType != -1) {
8057
+ setShowType(saveShowType);
8058
+ } else {
8059
+ setShowType(1);
8060
+ }
8061
+ setShowScreenshot(false);
8062
+ if (screenShotPlugin.current) {
8063
+ screenShotPlugin.current.destroyComponents();
8064
+ }
8065
+ }
8029
8066
  //|| showScreenshot
8030
8067
  if (showType == 5 || showScreenshot) {
8031
8068
  console.log("bbbbbbbbbbbbbb");
@@ -8092,6 +8129,7 @@ var CustomerService = function(props) {
8092
8129
  content.removeEventListener("scroll", handleScroll);
8093
8130
  }
8094
8131
  window.removeEventListener("resize", handlerHtml2canvas);
8132
+ window.removeEventListener("resize", cancelScreenshot);
8095
8133
  };
8096
8134
  }, [
8097
8135
  historyMessageList,
@@ -8496,6 +8534,9 @@ var CustomerService = function(props) {
8496
8534
  message: type == 2 ? keyWord : message,
8497
8535
  quotedMessage: citationContent.content || ""
8498
8536
  };
8537
+ if (citationContent.imageUrl) {
8538
+ obj.image = citationContent.imageUrl;
8539
+ }
8499
8540
  if (screenshotBese64) {
8500
8541
  obj.image = screenshotBese64;
8501
8542
  setScreenshotBese64("");
@@ -8544,121 +8585,142 @@ var CustomerService = function(props) {
8544
8585
  });
8545
8586
  };
8546
8587
  //发送知识库问题 item,flag == 1 是获取问候信息的答案,flag == 2 是普通消息,flag == 3 是针对视频页面点击底部推荐问题
8547
- var sendMessage = function(item, flag) {
8548
- var type = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "";
8549
- console.log(item, flag, 888888888);
8550
- var questions = [];
8551
- if (item && flag) {
8552
- questions = [
8553
- item
8554
- ];
8555
- }
8556
- //点击知识库的问题,或者是点击问候消息
8557
- if (questions.length > 0) {
8558
- questions = questions[0];
8559
- //知识库联想的问题没有答案
8560
- if (!questions.answer && userData.modules.some(function(item) {
8561
- return item.short == "AIservice";
8562
- })) {
8563
- var sendData = {
8564
- //相关数据
8565
- roomId: roomId,
8566
- message: questions.question,
8567
- quotedMessage: "",
8568
- regenerate: true,
8569
- generateUpvoteOrDownvoteMessage: false
8570
- };
8571
- if (pageNumHistory <= 1) {
8572
- setHistoryMessageList(function(historyMessageList) {
8573
- var newHistoryMessageList = historyMessageList.concat({
8588
+ var sendMessage = function() {
8589
+ var _ref = _async_to_generator(function(item, flag) {
8590
+ var type, questions, sendData, obj, sendData1, imageUrl;
8591
+ var _arguments = arguments;
8592
+ return __generator(this, function(_state) {
8593
+ type = _arguments.length > 2 && _arguments[2] !== void 0 ? _arguments[2] : "";
8594
+ console.log(item, flag, 888888888);
8595
+ questions = [];
8596
+ if (item && flag) {
8597
+ questions = [
8598
+ item
8599
+ ];
8600
+ }
8601
+ //点击知识库的问题,或者是点击问候消息
8602
+ if (questions.length > 0) {
8603
+ questions = questions[0];
8604
+ //知识库联想的问题没有答案
8605
+ if (!questions.answer && userData.modules.some(function(item) {
8606
+ return item.short == "AIservice";
8607
+ })) {
8608
+ sendData = {
8609
+ //相关数据
8574
8610
  roomId: roomId,
8575
- sender: mid,
8576
- recevier: "AI",
8577
8611
  message: questions.question,
8578
8612
  quotedMessage: "",
8579
- id: "p" + new Date().getTime(),
8580
- upvoted: false,
8581
- downvoted: false,
8582
- createdAt: getDataTime(-1),
8583
- extraInfo: JSON.stringify([])
8584
- });
8585
- return newHistoryMessageList;
8586
- });
8587
- }
8588
- setFinished(false);
8589
- aiSendQuestions(3, sendData, 1);
8590
- return;
8591
- }
8592
- console.log(questions, "知识库内容11111");
8593
- //向知识库发送问题 type 1,发送问题 2 发送答案 obj 需要的参数
8594
- var obj = {
8595
- roomId: roomId,
8596
- sender: mid,
8597
- recevier: "AI",
8598
- message: questions.question,
8599
- extraInfos: [
8600
- {
8601
- key: "questionId",
8602
- value: flag == 1 ? questions.value : questions.id
8613
+ regenerate: true,
8614
+ generateUpvoteOrDownvoteMessage: false
8615
+ };
8616
+ if (pageNumHistory <= 1) {
8617
+ setHistoryMessageList(function(historyMessageList) {
8618
+ var newHistoryMessageList = historyMessageList.concat({
8619
+ roomId: roomId,
8620
+ sender: mid,
8621
+ recevier: "AI",
8622
+ message: questions.question,
8623
+ quotedMessage: "",
8624
+ id: "p" + new Date().getTime(),
8625
+ upvoted: false,
8626
+ downvoted: false,
8627
+ createdAt: getDataTime(-1),
8628
+ extraInfo: JSON.stringify([])
8629
+ });
8630
+ return newHistoryMessageList;
8631
+ });
8632
+ }
8633
+ setFinished(false);
8634
+ aiSendQuestions(3, sendData, 1);
8635
+ return [
8636
+ 2
8637
+ ];
8603
8638
  }
8604
- ]
8605
- };
8606
- //发送问题 1 类型,发送问题需要的参数,问题的答案id等
8607
- sendingExistingIssues(1, obj, {
8608
- key: "questionId",
8609
- value: flag == 1 ? questions.value : questions.id,
8610
- answer: questions.answer
8611
- }, type);
8612
- setKeyWord("");
8613
- setQuestionsList([]);
8614
- setCitationContent({});
8615
- } else if (userData.modules.some(function(item) {
8616
- return item.short == "AIservice";
8617
- })) {
8618
- var sendData1 = {
8619
- //相关数据
8620
- roomId: roomId,
8621
- message: keyWord,
8622
- quotedMessage: citationContent.content || "",
8623
- regenerate: citationContent.content != "" ? false : true,
8624
- generateUpvoteOrDownvoteMessage: false
8625
- };
8626
- var imageUrl = "";
8627
- if (screenshotBese64) {
8628
- sendData1.image = screenshotBese64;
8629
- imageUrl = screenshotBese64;
8630
- }
8631
- if (pageNumHistory <= 1) {
8632
- setHistoryMessageList(function(historyMessageList) {
8633
- var newHistoryMessageList = historyMessageList.concat({
8639
+ console.log(questions, "知识库内容11111");
8640
+ obj = {
8634
8641
  roomId: roomId,
8635
8642
  sender: mid,
8636
8643
  recevier: "AI",
8637
- message: keyWord,
8638
- quotedMessage: citationContent.content,
8639
- id: "p" + new Date().getTime(),
8640
- upvoted: false,
8641
- downvoted: false,
8642
- createdAt: getDataTime(-1),
8643
- extraInfo: imageUrl ? JSON.stringify([
8644
+ message: questions.question,
8645
+ extraInfos: [
8644
8646
  {
8645
- key: "imageUrl",
8646
- value: imageUrl
8647
+ key: "questionId",
8648
+ value: flag == 1 ? questions.value : questions.id
8647
8649
  }
8648
- ]) : JSON.stringify([])
8649
- });
8650
- return newHistoryMessageList;
8651
- });
8652
- }
8653
- setFinished(false);
8654
- aiSendQuestions(3, sendData1, 1);
8655
- setScreenshotBese64("");
8656
- //存在AI客服
8657
- } else {
8658
- //不存在AI客服
8659
- sendGreetingMessage(4);
8660
- }
8661
- };
8650
+ ]
8651
+ };
8652
+ //发送问题 1 类型,发送问题需要的参数,问题的答案id等
8653
+ sendingExistingIssues(1, obj, {
8654
+ key: "questionId",
8655
+ value: flag == 1 ? questions.value : questions.id,
8656
+ answer: questions.answer
8657
+ }, type);
8658
+ setKeyWord("");
8659
+ setQuestionsList([]);
8660
+ setCitationContent({});
8661
+ } else if (userData.modules.some(function(item) {
8662
+ return item.short == "AIservice";
8663
+ })) {
8664
+ console.log("citationContent", citationContent);
8665
+ sendData1 = {
8666
+ //相关数据
8667
+ roomId: roomId,
8668
+ message: keyWord,
8669
+ quotedMessage: citationContent.content || "",
8670
+ regenerate: citationContent.content != "" ? false : true,
8671
+ generateUpvoteOrDownvoteMessage: false
8672
+ };
8673
+ imageUrl = "";
8674
+ if (citationContent.imageUrl) {
8675
+ // let base64:string=await urlToBase64(citationContent.imageUrl) as string
8676
+ console.log("citationContent.imageUrl", citationContent.imageUrl);
8677
+ sendData1.image = citationContent.imageUrl;
8678
+ imageUrl = citationContent.imageUrl;
8679
+ }
8680
+ if (screenshotBese64) {
8681
+ console.log("screenshotBese64", screenshotBese64);
8682
+ sendData1.image = screenshotBese64;
8683
+ imageUrl = screenshotBese64;
8684
+ }
8685
+ if (pageNumHistory <= 1) {
8686
+ setHistoryMessageList(function(historyMessageList) {
8687
+ var newHistoryMessageList = historyMessageList.concat({
8688
+ roomId: roomId,
8689
+ sender: mid,
8690
+ recevier: "AI",
8691
+ message: keyWord,
8692
+ quotedMessage: citationContent.content,
8693
+ id: "p" + new Date().getTime(),
8694
+ upvoted: false,
8695
+ downvoted: false,
8696
+ createdAt: getDataTime(-1),
8697
+ extraInfo: imageUrl ? JSON.stringify([
8698
+ {
8699
+ key: "imageUrl",
8700
+ value: imageUrl
8701
+ }
8702
+ ]) : JSON.stringify([])
8703
+ });
8704
+ return newHistoryMessageList;
8705
+ });
8706
+ }
8707
+ setFinished(false);
8708
+ aiSendQuestions(3, sendData1, 1);
8709
+ setScreenshotBese64("");
8710
+ //存在AI客服
8711
+ } else {
8712
+ //不存在AI客服
8713
+ sendGreetingMessage(4);
8714
+ }
8715
+ return [
8716
+ 2
8717
+ ];
8718
+ });
8719
+ });
8720
+ return function sendMessage(item, flag) {
8721
+ return _ref.apply(this, arguments);
8722
+ };
8723
+ }();
8662
8724
  //向知识库发送问题 或答案 type:1 发送问题 2 接受答案
8663
8725
  var sendingExistingIssues = function(type, obj, questions, problemType) {
8664
8726
  if (pageNumHistory <= 1) {
@@ -8900,7 +8962,7 @@ var CustomerService = function(props) {
8900
8962
  },
8901
8963
  onmessage: function(event) {
8902
8964
  //识别的内容
8903
- // console.log("eventSource msg: ", event.data);
8965
+ console.log("eventSource msg: ", event.data);
8904
8966
  var msg = JSON.parse(event.data);
8905
8967
  if (msg.message) {
8906
8968
  content = content + msg.message;
@@ -8934,13 +8996,18 @@ var CustomerService = function(props) {
8934
8996
  };
8935
8997
  //渲染AI回答
8936
8998
  var renderAiAnswer = function(msg, message_id, type) {
8999
+ console.log("renderAiAnswer", {
9000
+ msg: msg,
9001
+ message_id: message_id,
9002
+ type: type
9003
+ });
8937
9004
  // console.log(pageNumHistory,5555555);
8938
9005
  // console.log(aiSendQuestions().abort(),'slkdsdsdsd')
8939
9006
  if (pageNumHistory > 1) return;
8940
9007
  var obj = msg;
8941
9008
  var id = msg.messageId;
8942
- setHistoryMessageList(function(historyMessageList) {
8943
- var list1 = historyMessageList;
9009
+ setHistoryMessageList(function(prevHistoryMessageList) {
9010
+ var list1 = prevHistoryMessageList;
8944
9011
  //删除临时数据
8945
9012
  list1 = list1.filter(function(item) {
8946
9013
  return item.id != "123456";
@@ -8951,9 +9018,13 @@ var CustomerService = function(props) {
8951
9018
  return item.id != message_id;
8952
9019
  });
8953
9020
  }
8954
- var list = historyMessageList.filter(function(item) {
9021
+ var list = prevHistoryMessageList.filter(function(item) {
8955
9022
  return item.id == id;
8956
9023
  });
9024
+ console.log("renderAiAnswer", {
9025
+ list1: list1,
9026
+ list: list
9027
+ });
8957
9028
  var message = "";
8958
9029
  if (list.length == 0) {
8959
9030
  message = obj.message;
@@ -9002,6 +9073,7 @@ var CustomerService = function(props) {
9002
9073
  return newHistoryMessageList2;
9003
9074
  }
9004
9075
  });
9076
+ console.log("historyMessageList", historyMessageList);
9005
9077
  if (isPosition.current) {
9006
9078
  scrollToBottom();
9007
9079
  }
@@ -9881,7 +9953,7 @@ var CustomerService = function(props) {
9881
9953
  setCitationContent({
9882
9954
  content: item.message,
9883
9955
  id: item.id,
9884
- imageUrl: item.extraInfo && JSON.parse(item.extraInfo).length > 0 && JSON.parse(item.extraInfo)[0].key == "imageUrl" ? JSON.parse(item.extraInfo)[0].value : ""
9956
+ imageUrl: !item.quotedMessage && item.extraInfo && JSON.parse(item.extraInfo).length > 0 && JSON.parse(item.extraInfo)[0].key == "imageUrl" ? JSON.parse(item.extraInfo)[0].value : ""
9885
9957
  });
9886
9958
  resettingBottomHei();
9887
9959
  onEvent(serverName + serverUrl(), "click_智能问答_引用", "提交");
@@ -9928,7 +10000,7 @@ var CustomerService = function(props) {
9928
10000
  },
9929
10001
  className: styles.content_child
9930
10002
  }),
9931
- item.extraInfo && JSON.parse(item.extraInfo).length > 0 && JSON.parse(item.extraInfo)[0].key == "imageUrl" && /*#__PURE__*/ jsxs("p", {
10003
+ !item.quotedMessage && item.extraInfo && JSON.parse(item.extraInfo).length > 0 && JSON.parse(item.extraInfo)[0].key == "imageUrl" && /*#__PURE__*/ jsxs("p", {
9932
10004
  className: "".concat(styles.img_con, " ").concat(showType == 2 || showType == 4 ? styles.img_con2 : ""),
9933
10005
  children: [
9934
10006
  /*#__PURE__*/ jsx("img", {
@@ -9950,22 +10022,41 @@ var CustomerService = function(props) {
9950
10022
  ]
9951
10023
  }),
9952
10024
  //引用消息
9953
- item.quotedMessage && /*#__PURE__*/ jsx("div", {
10025
+ item.quotedMessage && /*#__PURE__*/ jsxs("div", {
9954
10026
  className: styles.citation_content,
9955
- children: getByteLen(item.quotedMessage) > 120 ? /*#__PURE__*/ jsx(Tooltip, {
9956
- overlayClassName: styles.popover_main_content,
9957
- title: item.quotedMessage,
9958
- placement: "leftTop",
9959
- children: /*#__PURE__*/ jsxs("p", {
9960
- className: styles.text_exceed,
10027
+ children: [
10028
+ getByteLen(item.quotedMessage) > 120 ? /*#__PURE__*/ jsx(Tooltip, {
10029
+ overlayClassName: styles.popover_main_content,
10030
+ title: item.quotedMessage,
10031
+ placement: "leftTop",
10032
+ children: /*#__PURE__*/ jsxs("p", {
10033
+ className: styles.text_exceed,
10034
+ children: [
10035
+ item.quotedMessage,
10036
+ /*#__PURE__*/ jsx(RightOutlined, {})
10037
+ ]
10038
+ })
10039
+ }) : /*#__PURE__*/ jsx("p", {
10040
+ children: item.quotedMessage
10041
+ }),
10042
+ item.quotedMessage && item.extraInfo && JSON.parse(item.extraInfo).length > 0 && JSON.parse(item.extraInfo)[0].key == "imageUrl" && /*#__PURE__*/ jsxs("p", {
10043
+ className: "".concat(styles.img_con, " ").concat(showType == 2 || showType == 4 ? styles.img_con2 : ""),
9961
10044
  children: [
9962
- item.quotedMessage,
9963
- /*#__PURE__*/ jsx(RightOutlined, {})
10045
+ /*#__PURE__*/ jsx("img", {
10046
+ src: JSON.parse(item.extraInfo)[0].value
10047
+ }),
10048
+ /*#__PURE__*/ jsx("div", {
10049
+ className: styles.mask_zoom,
10050
+ children: /*#__PURE__*/ jsx(ZoomInOutlined, {
10051
+ onClick: function() {
10052
+ setViewBase64(JSON.parse(item.extraInfo)[0].value);
10053
+ setVisible(true);
10054
+ }
10055
+ })
10056
+ })
9964
10057
  ]
9965
10058
  })
9966
- }) : /*#__PURE__*/ jsx("p", {
9967
- children: item.quotedMessage
9968
- })
10059
+ ]
9969
10060
  })
9970
10061
  ]
9971
10062
  })
@@ -10010,7 +10101,7 @@ var CustomerService = function(props) {
10010
10101
  }) : "",
10011
10102
  /*#__PURE__*/ jsxs("li", {
10012
10103
  className: styles.right,
10013
- id: lastId == item.id ? "li_flag" : "",
10104
+ id: lastId == item.id ? "li_flag" : item.id,
10014
10105
  children: [
10015
10106
  (showType == 2 || showType == 4) && /*#__PURE__*/ jsx("div", {
10016
10107
  className: styles.head_sculpture,
@@ -10030,9 +10121,34 @@ var CustomerService = function(props) {
10030
10121
  children: [
10031
10122
  /*#__PURE__*/ jsxs("div", {
10032
10123
  className: styles.main_content_flag,
10124
+ onMouseEnter: function() {
10125
+ var dom = document.getElementById(item.id);
10126
+ if (dom) {
10127
+ var con_h = document.getElementById("chat_content").clientHeight - 24; //滚动区域的高度
10128
+ var rectY = dom.getBoundingClientRect().y - 48;
10129
+ var h = dom.clientHeight; //当前元素高度
10130
+ var topDom = dom.getElementsByClassName("operate_modal_showtop")[0];
10131
+ var bottomDom = dom.getElementsByClassName("operate_modal_showbottom")[0];
10132
+ if (topDom && bottomDom) {
10133
+ // console.log(h,dom.getBoundingClientRect().y,rectY)
10134
+ if (rectY > 0) {
10135
+ topDom.style.cssText = "";
10136
+ bottomDom.style.cssText = "visibility: hidden;";
10137
+ // 上下都能显示时,显示到下边
10138
+ if (h < con_h - rectY) {
10139
+ topDom.style.cssText = "visibility: hidden;";
10140
+ bottomDom.style.cssText = "";
10141
+ }
10142
+ } else {
10143
+ topDom.style.cssText = "visibility: hidden;";
10144
+ bottomDom.style.cssText = "";
10145
+ }
10146
+ }
10147
+ }
10148
+ },
10033
10149
  children: [
10034
10150
  /*#__PURE__*/ jsx("div", {
10035
- className: styles.operate_modal,
10151
+ className: "".concat(styles.operate_modal, " operate_modal_showtop"),
10036
10152
  children: // 不是最后一行,
10037
10153
  historyMessageList.length - 1 != i && renderOperateBtn(item, isAiChatWindow, i)
10038
10154
  }),
@@ -10112,26 +10228,50 @@ var CustomerService = function(props) {
10112
10228
  //findTeacher//是否在召唤老师过程中,是否是最后一条消息
10113
10229
  !item.findTeacher && historyMessageList.length - 1 == i && item.id != "123456" && item.id != "123456_date" && renderLastOperateBtn(item, isAiChatWindow, i)
10114
10230
  ]
10231
+ }),
10232
+ historyMessageList.length - 1 !== i && /*#__PURE__*/ jsx("div", {
10233
+ className: "".concat(styles.operate_modal, " ").concat(styles.bottom, " operate_modal_showbottom"),
10234
+ children: // 不是最后一行,
10235
+ renderOperateBtn(item, isAiChatWindow, i)
10115
10236
  })
10116
10237
  ]
10117
10238
  }),
10118
10239
  //引用消息
10119
- item.quotedMessage && /*#__PURE__*/ jsx("div", {
10240
+ item.quotedMessage && /*#__PURE__*/ jsxs("div", {
10120
10241
  className: styles.citation_content,
10121
- children: getByteLen(item.quotedMessage) > 120 ? /*#__PURE__*/ jsx(Tooltip, {
10122
- overlayClassName: styles.popover_main_content,
10123
- title: item.quotedMessage,
10124
- placement: "rightTop",
10125
- children: /*#__PURE__*/ jsxs("p", {
10126
- className: styles.text_exceed,
10242
+ children: [
10243
+ getByteLen(item.quotedMessage) > 120 ? /*#__PURE__*/ jsx(Tooltip, {
10244
+ overlayClassName: styles.popover_main_content,
10245
+ title: item.quotedMessage,
10246
+ placement: "rightTop",
10247
+ children: /*#__PURE__*/ jsxs("p", {
10248
+ className: styles.text_exceed,
10249
+ children: [
10250
+ item.quotedMessage,
10251
+ /*#__PURE__*/ jsx(RightOutlined, {})
10252
+ ]
10253
+ })
10254
+ }) : /*#__PURE__*/ jsx("p", {
10255
+ children: item.quotedMessage
10256
+ }),
10257
+ item.extraInfo && JSON.parse(item.extraInfo).length > 0 && JSON.parse(item.extraInfo)[0].key == "imageUrl" && /*#__PURE__*/ jsxs("p", {
10258
+ className: "".concat(styles.img_con, " ").concat(showType == 2 || showType == 4 ? styles.img_con2 : ""),
10127
10259
  children: [
10128
- item.quotedMessage,
10129
- /*#__PURE__*/ jsx(RightOutlined, {})
10260
+ /*#__PURE__*/ jsx("img", {
10261
+ src: JSON.parse(item.extraInfo)[0].value
10262
+ }),
10263
+ /*#__PURE__*/ jsx("div", {
10264
+ className: styles.mask_zoom,
10265
+ children: /*#__PURE__*/ jsx(ZoomInOutlined, {
10266
+ onClick: function() {
10267
+ setViewBase64(JSON.parse(item.extraInfo)[0].value);
10268
+ setVisible(true);
10269
+ }
10270
+ })
10271
+ })
10130
10272
  ]
10131
10273
  })
10132
- }) : /*#__PURE__*/ jsx("p", {
10133
- children: item.quotedMessage
10134
- })
10274
+ ]
10135
10275
  })
10136
10276
  ]
10137
10277
  })
@@ -10184,6 +10324,7 @@ var CustomerService = function(props) {
10184
10324
  onClick: function() {
10185
10325
  setCitationContent({
10186
10326
  content: item.message,
10327
+ imageUrl: item.extraInfo && JSON.parse(extraInfo).length > 0 && JSON.parse(extraInfo)[0].key == "imageUrl" && JSON.parse(extraInfo)[0].value,
10187
10328
  id: item.id
10188
10329
  });
10189
10330
  resettingBottomHei();
@@ -10384,6 +10525,7 @@ var CustomerService = function(props) {
10384
10525
  onClick: function() {
10385
10526
  setCitationContent({
10386
10527
  content: item.message,
10528
+ imageUrl: item.extraInfo && JSON.parse(extraInfo).length > 0 && JSON.parse(extraInfo)[0].key == "imageUrl" && JSON.parse(extraInfo)[0].value,
10387
10529
  id: item.id
10388
10530
  });
10389
10531
  resettingBottomHei();
@@ -10480,10 +10622,7 @@ var CustomerService = function(props) {
10480
10622
  };
10481
10623
  //保存粘贴的图片
10482
10624
  var handleFilePaste = function(e) {
10483
- e.preventDefault();
10484
- var items = e.clipboardData.items;
10485
- // console.log(e,items,3333333)
10486
- for(var i = 0; i < items.length; i++){
10625
+ var _loop = function(i) {
10487
10626
  var item = items[i];
10488
10627
  if (item.kind === "file") {
10489
10628
  var file = item.getAsFile();
@@ -10505,8 +10644,27 @@ var CustomerService = function(props) {
10505
10644
  var pastedText = clipboardData.getData("text");
10506
10645
  var con = keyWord + pastedText;
10507
10646
  setKeyWord(con);
10647
+ if (con == "") {
10648
+ setQuestionsList([]);
10649
+ clearTimeout(timer.current);
10650
+ } else {
10651
+ clearTimeout(timer.current);
10652
+ timer.current = setTimeout(function() {
10653
+ if (config && config.type == "video") {
10654
+ getQuestiionsList(String(con), 3);
10655
+ } else {
10656
+ getQuestiionsList(String(con), 2);
10657
+ }
10658
+ }, 1000);
10659
+ }
10660
+ setBottomRecommendationQuestions([]);
10661
+ resettingBottomHei();
10508
10662
  }
10509
- }
10663
+ };
10664
+ e.preventDefault();
10665
+ var items = e.clipboardData.items;
10666
+ // console.log(e,items,3333333)
10667
+ for(var i = 0; i < items.length; i++)_loop(i);
10510
10668
  };
10511
10669
  //发送截图信息
10512
10670
  var sendScreenshotData = function(message) {
@@ -10692,13 +10850,24 @@ var CustomerService = function(props) {
10692
10850
  citationContent.content && /*#__PURE__*/ jsxs("div", {
10693
10851
  className: styles.content_main,
10694
10852
  children: [
10695
- /*#__PURE__*/ jsx("div", {
10853
+ /*#__PURE__*/ jsxs("div", {
10696
10854
  className: styles.content_con,
10697
- children: /*#__PURE__*/ jsx("p", {
10698
- children: /*#__PURE__*/ jsx("span", {
10699
- children: citationContent.content
10855
+ children: [
10856
+ /*#__PURE__*/ jsx("p", {
10857
+ children: /*#__PURE__*/ jsx("span", {
10858
+ children: citationContent.content
10859
+ })
10860
+ }),
10861
+ citationContent.imageUrl && /*#__PURE__*/ jsx("p", {
10862
+ children: /*#__PURE__*/ jsx("img", {
10863
+ src: citationContent.imageUrl,
10864
+ onClick: function() {
10865
+ setViewBase64(citationContent.imageUrl);
10866
+ setVisible(true);
10867
+ }
10868
+ })
10700
10869
  })
10701
- })
10870
+ ]
10702
10871
  }),
10703
10872
  /*#__PURE__*/ jsx("i", {
10704
10873
  className: styles.delete_quote,
@@ -12173,4 +12342,4 @@ var BhdDatePicker = /*#__PURE__*/ forwardRef(function(props, ref) {
12173
12342
  });
12174
12343
  var BhdDatePicker$1 = BhdDatePicker;
12175
12344
 
12176
- export { BhdAppLayout, BhdDatePicker$1 as BhdDatePicker, BhdSelect$1 as BhdSelect, BhdTableSelect$1 as BhdTableSelect, BhdTableSimple$1 as BhdTableSimple, BhdTipModal$1 as BhdTipModal, CustomerService$1 as CustomerService, Pagination, Provider$1 as Provider, Table$1 as Table, TextTootip$1 as TextTootip, TitleBar$1 as TitleBar, ViewImage$1 as ViewImage, BhdMessage$1 as message };
12345
+ export { BhdAppLayout, BhdDatePicker$1 as BhdDatePicker, BhdSelect$1 as BhdSelect, BhdTableSelect$1 as BhdTableSelect, BhdTableSimple$1 as BhdTableSimple, BhdTipModal$1 as BhdTipModal, CustomerService$1 as CustomerService, Pagination, Provider$1 as Provider, Table$1 as Table, TextTootip$1 as TextTootip, TitleBar$1 as TitleBar, ViewImage$1 as ViewImage, message };