bhd-components 0.9.13 → 0.9.15

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.
@@ -2520,7 +2520,7 @@ function BhdAppLayout(props) {
2520
2520
  });
2521
2521
  }
2522
2522
 
2523
- var modules_63b47c51$1 = {"service_ChatWindow_Drawer":"index_module_service_ChatWindow_Drawer__4297734b","ChatWindow_Modal":"index_module_ChatWindow_Modal__4297734b","ChatWindow_Drawer":"index_module_ChatWindow_Drawer__4297734b","header_wrap":"index_module_header_wrap__4297734b","top":"index_module_top__4297734b","user":"index_module_user__4297734b","count":"index_module_count__4297734b","operate":"index_module_operate__4297734b","line":"index_module_line__4297734b","popover_main":"index_module_popover_main__4297734b","popover":"index_module_popover__4297734b","header_wrap_newlabo":"index_module_header_wrap_newlabo__4297734b","Drawer_main":"index_module_Drawer_main__4297734b","loading":"index_module_loading__4297734b","message_con":"index_module_message_con__4297734b","left":"index_module_left__4297734b","head_sculpture":"index_module_head_sculpture__4297734b","main_content":"index_module_main_content__4297734b","right":"index_module_right__4297734b","main":"index_module_main__4297734b","main_content_flag":"index_module_main_content_flag__4297734b","operate_modal":"index_module_operate_modal__4297734b","operate_modal_bottom":"index_module_operate_modal_bottom__4297734b","active":"index_module_active__4297734b","stop_generate":"index_module_stop_generate__4297734b","icon":"index_module_icon__4297734b","find_teacher":"index_module_find_teacher__4297734b","stop_findTeacher":"index_module_stop_findTeacher__4297734b","content":"index_module_content__4297734b","content_child":"index_module_content_child__4297734b","find_teacher_con":"index_module_find_teacher_con__4297734b","sign":"index_module_sign__4297734b","ask_question":"index_module_ask_question__4297734b","bottom":"index_module_bottom__4297734b","association_problem":"index_module_association_problem__4297734b","association_problem_flag":"index_module_association_problem_flag__4297734b","related_issues_flag":"index_module_related_issues_flag__4297734b","img_con":"index_module_img_con__4297734b","mask_zoom":"index_module_mask_zoom__4297734b","img_con2":"index_module_img_con2__4297734b","copyCode":"index_module_copyCode__4297734b","time":"index_module_time__4297734b","citation_content":"index_module_citation_content__4297734b","text_exceed":"index_module_text_exceed__4297734b","popover_content":"index_module_popover_content__4297734b","Drawer_main_newlabo":"index_module_Drawer_main_newlabo__4297734b","Drawer_main_newlabo_no_pic":"index_module_Drawer_main_newlabo_no_pic__4297734b","Drawer_buttom_Issues_List":"index_module_Drawer_buttom_Issues_List__4297734b","issues_list_teacherList":"index_module_issues_list_teacherList__4297734b","item":"index_module_item__4297734b","issues_list":"index_module_issues_list__4297734b","issues_list_flag":"index_module_issues_list_flag__4297734b","Drawer_buttom":"index_module_Drawer_buttom__4297734b","input_wrap":"index_module_input_wrap__4297734b","input":"index_module_input__4297734b","picture_layout":"index_module_picture_layout__4297734b","icon_close":"index_module_icon_close__4297734b","icon_zoom":"index_module_icon_zoom__4297734b","anticon":"index_module_anticon__4297734b","no_AI":"index_module_no_AI__4297734b","screenshot":"index_module_screenshot__4297734b","disabled":"index_module_disabled__4297734b","content_main":"index_module_content_main__4297734b","content_con":"index_module_content_con__4297734b","delete_quote":"index_module_delete_quote__4297734b","sending":"index_module_sending__4297734b","Drawer_buttom_Issues_List_newlabo":"index_module_Drawer_buttom_Issues_List_newlabo__4297734b","main_list":"index_module_main_list__4297734b","chat_content":"index_module_chat_content__4297734b","popover_main_content":"index_module_popover_main_content__4297734b","popover_main_content_name":"index_module_popover_main_content_name__4297734b","teacher_layout":"index_module_teacher_layout__4297734b","delete":"index_module_delete__4297734b","num":"index_module_num__4297734b","shrink":"index_module_shrink__4297734b","teacher_layout_newlabo":"index_module_teacher_layout_newlabo__4297734b","teacher_layout_modal":"index_module_teacher_layout_modal__4297734b","ai":"index_module_ai__4297734b","user_info":"index_module_user_info__4297734b","message":"index_module_message__4297734b","con":"index_module_con__4297734b","teacher_layout_modal_newlabo":"index_module_teacher_layout_modal_newlabo__4297734b","history_list":"index_module_history_list__4297734b","search_layout":"index_module_search_layout__4297734b","mymove":"index_module_mymove__4297734b","title":"index_module_title__4297734b","search_top":"index_module_search_top__4297734b","list_item":"index_module_list_item__4297734b","list_summary":"index_module_list_summary__4297734b","head_img":"index_module_head_img__4297734b","list_desc":"index_module_list_desc__4297734b","name":"index_module_name__4297734b","decs":"index_module_decs__4297734b","open":"index_module_open__4297734b","list_summary_active":"index_module_list_summary_active__4297734b","list_detail":"index_module_list_detail__4297734b","list":"index_module_list__4297734b","list_more":"index_module_list_more__4297734b","no_data":"index_module_no_data__4297734b","history_list_broadside":"index_module_history_list_broadside__4297734b","teacher_list":"index_module_teacher_list__4297734b","screenshot_Modal":"index_module_screenshot_Modal__4297734b","ReactCrop":"index_module_ReactCrop__4297734b","screenshot_Modal_btn":"index_module_screenshot_Modal_btn__4297734b"};
2523
+ var modules_63b47c51$1 = {"service_ChatWindow_Drawer":"index_module_service_ChatWindow_Drawer__2f1165e5","ChatWindow_Modal":"index_module_ChatWindow_Modal__2f1165e5","ChatWindow_Drawer":"index_module_ChatWindow_Drawer__2f1165e5","header_wrap":"index_module_header_wrap__2f1165e5","top":"index_module_top__2f1165e5","user":"index_module_user__2f1165e5","count":"index_module_count__2f1165e5","operate":"index_module_operate__2f1165e5","line":"index_module_line__2f1165e5","popover_main":"index_module_popover_main__2f1165e5","popover":"index_module_popover__2f1165e5","header_wrap_newlabo":"index_module_header_wrap_newlabo__2f1165e5","Drawer_main":"index_module_Drawer_main__2f1165e5","loading":"index_module_loading__2f1165e5","message_con":"index_module_message_con__2f1165e5","left":"index_module_left__2f1165e5","head_sculpture":"index_module_head_sculpture__2f1165e5","main_content":"index_module_main_content__2f1165e5","right":"index_module_right__2f1165e5","main":"index_module_main__2f1165e5","main_content_flag":"index_module_main_content_flag__2f1165e5","operate_modal":"index_module_operate_modal__2f1165e5","operate_modal_bottom":"index_module_operate_modal_bottom__2f1165e5","active":"index_module_active__2f1165e5","stop_generate":"index_module_stop_generate__2f1165e5","icon":"index_module_icon__2f1165e5","find_teacher":"index_module_find_teacher__2f1165e5","stop_findTeacher":"index_module_stop_findTeacher__2f1165e5","content":"index_module_content__2f1165e5","content_child":"index_module_content_child__2f1165e5","find_teacher_con":"index_module_find_teacher_con__2f1165e5","sign":"index_module_sign__2f1165e5","ask_question":"index_module_ask_question__2f1165e5","bottom":"index_module_bottom__2f1165e5","association_problem":"index_module_association_problem__2f1165e5","association_problem_flag":"index_module_association_problem_flag__2f1165e5","related_issues_flag":"index_module_related_issues_flag__2f1165e5","img_con":"index_module_img_con__2f1165e5","mask_zoom":"index_module_mask_zoom__2f1165e5","img_con2":"index_module_img_con2__2f1165e5","copyCode":"index_module_copyCode__2f1165e5","time":"index_module_time__2f1165e5","citation_content":"index_module_citation_content__2f1165e5","text_exceed":"index_module_text_exceed__2f1165e5","popover_content":"index_module_popover_content__2f1165e5","Drawer_main_newlabo":"index_module_Drawer_main_newlabo__2f1165e5","Drawer_main_newlabo_no_pic":"index_module_Drawer_main_newlabo_no_pic__2f1165e5","Drawer_buttom_Issues_List":"index_module_Drawer_buttom_Issues_List__2f1165e5","issues_list_teacherList":"index_module_issues_list_teacherList__2f1165e5","item":"index_module_item__2f1165e5","issues_list":"index_module_issues_list__2f1165e5","issues_list_flag":"index_module_issues_list_flag__2f1165e5","Drawer_buttom":"index_module_Drawer_buttom__2f1165e5","input_wrap":"index_module_input_wrap__2f1165e5","input":"index_module_input__2f1165e5","picture_layout":"index_module_picture_layout__2f1165e5","icon_close":"index_module_icon_close__2f1165e5","icon_zoom":"index_module_icon_zoom__2f1165e5","anticon":"index_module_anticon__2f1165e5","no_AI":"index_module_no_AI__2f1165e5","screenshot":"index_module_screenshot__2f1165e5","disabled":"index_module_disabled__2f1165e5","content_main":"index_module_content_main__2f1165e5","content_con":"index_module_content_con__2f1165e5","delete_quote":"index_module_delete_quote__2f1165e5","sending":"index_module_sending__2f1165e5","Drawer_buttom_Issues_List_newlabo":"index_module_Drawer_buttom_Issues_List_newlabo__2f1165e5","main_list":"index_module_main_list__2f1165e5","chat_content":"index_module_chat_content__2f1165e5","popover_main_content":"index_module_popover_main_content__2f1165e5","popover_main_content_name":"index_module_popover_main_content_name__2f1165e5","teacher_layout":"index_module_teacher_layout__2f1165e5","delete":"index_module_delete__2f1165e5","num":"index_module_num__2f1165e5","shrink":"index_module_shrink__2f1165e5","teacher_layout_newlabo":"index_module_teacher_layout_newlabo__2f1165e5","teacher_layout_modal":"index_module_teacher_layout_modal__2f1165e5","ai":"index_module_ai__2f1165e5","user_info":"index_module_user_info__2f1165e5","message":"index_module_message__2f1165e5","con":"index_module_con__2f1165e5","teacher_layout_modal_newlabo":"index_module_teacher_layout_modal_newlabo__2f1165e5","history_list":"index_module_history_list__2f1165e5","search_layout":"index_module_search_layout__2f1165e5","mymove":"index_module_mymove__2f1165e5","title":"index_module_title__2f1165e5","search_top":"index_module_search_top__2f1165e5","list_item":"index_module_list_item__2f1165e5","list_summary":"index_module_list_summary__2f1165e5","head_img":"index_module_head_img__2f1165e5","list_desc":"index_module_list_desc__2f1165e5","name":"index_module_name__2f1165e5","decs":"index_module_decs__2f1165e5","open":"index_module_open__2f1165e5","list_summary_active":"index_module_list_summary_active__2f1165e5","list_detail":"index_module_list_detail__2f1165e5","list":"index_module_list__2f1165e5","list_more":"index_module_list_more__2f1165e5","no_data":"index_module_no_data__2f1165e5","history_list_broadside":"index_module_history_list_broadside__2f1165e5","teacher_list":"index_module_teacher_list__2f1165e5","screenshot_Modal":"index_module_screenshot_Modal__2f1165e5","ReactCrop":"index_module_ReactCrop__2f1165e5","screenshot_Modal_btn":"index_module_screenshot_Modal_btn__2f1165e5"};
2524
2524
 
2525
2525
  //消息已读
2526
2526
  var readMessage = function(roomId, urllocation, userData, http) {
@@ -2669,7 +2669,8 @@ var urlToBase64 = function(url) {
2669
2669
  return new Promise(function(resolve) {
2670
2670
  var image = new Image();
2671
2671
  // 先设置图片跨域属性
2672
- image.crossOrigin = "Anonymous";
2672
+ // image.crossOrigin = 'Anonymous'
2673
+ image.setAttribute("crossOrigin", "Anonymous"); // 解决控制台跨域报错的问题
2673
2674
  // 再给image赋值src属性,先后顺序不能颠倒
2674
2675
  image.src = url;
2675
2676
  image.onload = function() {
@@ -8398,7 +8399,7 @@ var CustomerService = function(props) {
8398
8399
  roomId: roomId,
8399
8400
  sender: "AI",
8400
8401
  recevier: mid,
8401
- message: "Hi,我是智能学习助手,你遇到了什么问题?111",
8402
+ message: "Hi,我是智能学习助手,你遇到了什么问题?",
8402
8403
  extraInfos: questionsList == null ? null : questionsList
8403
8404
  };
8404
8405
  if (pageNumHistory <= 1) {
@@ -8428,7 +8429,7 @@ var CustomerService = function(props) {
8428
8429
  roomId: roomId,
8429
8430
  sender: "AI",
8430
8431
  recevier: mid,
8431
- message: "Hi,我是智能学习助手,你遇到了什么问题?222哈哈"
8432
+ message: "Hi,我是智能学习助手,你遇到了什么问题?"
8432
8433
  };
8433
8434
  if (pageNumHistory <= 1) {
8434
8435
  setHistoryMessageList(function(historyMessageList) {
@@ -8596,117 +8597,90 @@ var CustomerService = function(props) {
8596
8597
  //消息发送给老师type == 1,召唤老师时发送,type == 2,在老师聊天窗口聊天
8597
8598
  var sendToTeacher = function() {
8598
8599
  var _ref = _async_to_generator(function(type) {
8599
- var message, obj, list, recevier, base64;
8600
+ var message, obj, list, recevier;
8600
8601
  var _arguments = arguments;
8601
8602
  return __generator(this, function(_state) {
8602
- switch(_state.label){
8603
- case 0:
8604
- message = _arguments.length > 1 && _arguments[1] !== void 0 ? _arguments[1] : "";
8605
- console.log("消息发送给老师111");
8606
- obj = {};
8607
- if (!(type == 1)) return [
8608
- 3,
8609
- 1
8610
- ];
8611
- obj = {
8612
- roomId: roomId,
8613
- sender: mid,
8614
- recevier: chatWith.uid,
8615
- message: problem.question
8616
- };
8617
- if (problem.url) {
8618
- obj.image = problem.url;
8619
- }
8620
- setProblem({});
8621
- return [
8622
- 3,
8623
- 4
8624
- ];
8625
- case 1:
8626
- if (!(type == 2 || type == 3)) return [
8627
- 3,
8628
- 4
8629
- ];
8630
- list = contactsList.filter(function(item) {
8631
- return item.roomId == roomId;
8632
- });
8633
- recevier = "";
8634
- if (list.length > 0) {
8635
- recevier = list[0].sender;
8636
- }
8637
- obj = {
8638
- roomId: roomId,
8639
- sender: mid,
8640
- recevier: recevier,
8641
- message: type == 2 ? keyWord : message,
8642
- quotedMessage: citationContent.content || ""
8643
- };
8644
- if (!citationContent.imageUrl) return [
8645
- 3,
8646
- 3
8647
- ];
8648
- return [
8649
- 4,
8650
- urlToBase64(citationContent.imageUrl)
8651
- ];
8652
- case 2:
8653
- base64 = _state.sent();
8654
- console.log("citationContent.imageUrl", citationContent.imageUrl);
8655
- //imageUrl = citationContent.imageUrl;
8656
- obj.image = base64;
8657
- _state.label = 3;
8658
- case 3:
8659
- if (screenshotBese64) {
8660
- obj.image = screenshotBese64;
8661
- setScreenshotBese64("");
8662
- }
8663
- _state.label = 4;
8664
- case 4:
8665
- http.post("".concat(urllocation, "/chat-service/public/v1.0/chat-with-user/messages"), obj).then(function(res) {
8666
- if (res.data.id) {
8667
- // console.log(pageNum, pageNumHistory, lastId, "dlskskdsd4444");
8668
- if (pageNum == 1 || pageNumHistory == 1 || pageNumHistory == 0) {
8669
- setHistoryMessageList(function(historyMessageList) {
8670
- var newHistoryMessageList = historyMessageList.concat(_object_spread_props(_object_spread({}, obj), {
8671
- id: res.data.id,
8672
- upvoted: false,
8673
- downvoted: false,
8674
- createdAt: getDataTime(-1),
8675
- extraInfo: obj.image ? JSON.stringify([
8676
- {
8677
- key: "imageUrl",
8678
- value: obj.image
8679
- }
8680
- ]) : null
8681
- }));
8682
- return newHistoryMessageList;
8683
- });
8684
- // console.log(lastId,'消息发送给老师111');
8685
- scrollToBottom();
8686
- }
8687
- //判断当前窗口是否是
8688
- if (type == 1) {
8689
- var roomList = [
8603
+ message = _arguments.length > 1 && _arguments[1] !== void 0 ? _arguments[1] : "";
8604
+ console.log("消息发送给老师111");
8605
+ obj = {};
8606
+ if (type == 1) {
8607
+ obj = {
8608
+ roomId: roomId,
8609
+ sender: mid,
8610
+ recevier: chatWith.uid,
8611
+ message: problem.question
8612
+ };
8613
+ if (problem.url) {
8614
+ obj.image = problem.url;
8615
+ }
8616
+ setProblem({});
8617
+ } else if (type == 2 || type == 3) {
8618
+ list = contactsList.filter(function(item) {
8619
+ return item.roomId == roomId;
8620
+ });
8621
+ recevier = "";
8622
+ if (list.length > 0) {
8623
+ recevier = list[0].sender;
8624
+ }
8625
+ obj = {
8626
+ roomId: roomId,
8627
+ sender: mid,
8628
+ recevier: recevier,
8629
+ message: type == 2 ? keyWord : message,
8630
+ quotedMessage: citationContent.content || ""
8631
+ };
8632
+ if (citationContent.imageUrl) {
8633
+ obj.image = citationContent.imageUrl;
8634
+ }
8635
+ if (screenshotBese64) {
8636
+ obj.image = screenshotBese64;
8637
+ setScreenshotBese64("");
8638
+ }
8639
+ }
8640
+ http.post("".concat(urllocation, "/chat-service/public/v1.0/chat-with-user/messages"), obj).then(function(res) {
8641
+ if (res.data.id) {
8642
+ // console.log(pageNum, pageNumHistory, lastId, "dlskskdsd4444");
8643
+ if (pageNum == 1 || pageNumHistory == 1 || pageNumHistory == 0) {
8644
+ setHistoryMessageList(function(historyMessageList) {
8645
+ var newHistoryMessageList = historyMessageList.concat(_object_spread_props(_object_spread({}, obj), {
8646
+ id: res.data.id,
8647
+ upvoted: false,
8648
+ downvoted: false,
8649
+ createdAt: getDataTime(-1),
8650
+ extraInfo: obj.image ? JSON.stringify([
8690
8651
  {
8691
- roomId: roomId,
8692
- id: res.data.id
8652
+ key: "imageUrl",
8653
+ value: obj.image
8693
8654
  }
8694
- ];
8695
- setChatObj(function(list) {
8696
- var list2 = list.filter(function(item) {
8697
- return item.id != roomList[0].id;
8698
- });
8699
- return list2.concat(roomList);
8700
- });
8655
+ ]) : null
8656
+ }));
8657
+ return newHistoryMessageList;
8658
+ });
8659
+ // console.log(lastId,'消息发送给老师111');
8660
+ scrollToBottom();
8661
+ }
8662
+ //判断当前窗口是否是
8663
+ if (type == 1) {
8664
+ var roomList = [
8665
+ {
8666
+ roomId: roomId,
8667
+ id: res.data.id
8701
8668
  }
8702
- }
8703
- }).catch(function(err) {
8704
- console.log(err);
8705
- });
8706
- return [
8707
- 2
8708
- ];
8709
- }
8669
+ ];
8670
+ setChatObj(function(list) {
8671
+ var list2 = list.filter(function(item) {
8672
+ return item.id != roomList[0].id;
8673
+ });
8674
+ return list2.concat(roomList);
8675
+ });
8676
+ }
8677
+ }
8678
+ }).catch(function(err) {
8679
+ console.log(err);
8680
+ });
8681
+ return [
8682
+ 2
8683
+ ];
8710
8684
  });
8711
8685
  });
8712
8686
  return function sendToTeacher(type) {
@@ -8822,9 +8796,9 @@ var CustomerService = function(props) {
8822
8796
  ];
8823
8797
  case 2:
8824
8798
  base64 = _state.sent();
8799
+ console.log("base64", base64);
8825
8800
  console.log("citationContent.imageUrl", citationContent.imageUrl);
8826
- sendData1.image = citationContent.imageUrl;
8827
- //imageUrl = citationContent.imageUrl;
8801
+ sendData1.image = base64;
8828
8802
  imageUrl = base64;
8829
8803
  _state.label = 3;
8830
8804
  case 3:
@@ -10303,171 +10277,169 @@ var CustomerService = function(props) {
10303
10277
  }),
10304
10278
  /*#__PURE__*/ jsx("div", {
10305
10279
  className: styles.main,
10306
- children: /*#__PURE__*/ jsxs("div", {
10280
+ children: /*#__PURE__*/ jsx("div", {
10307
10281
  className: styles.main_content,
10308
- children: [
10309
- /*#__PURE__*/ jsxs("div", {
10310
- className: styles.main_content_flag,
10311
- onMouseEnter: function() {
10312
- var dom = document.getElementById(item.id);
10313
- if (dom) {
10314
- var con_h = document.getElementById("chat_content").clientHeight - 24; //滚动区域的高度
10315
- var rectY = dom.getBoundingClientRect().y - 48;
10316
- var h = dom.clientHeight + 24; //当前元素高度
10317
- var topDom = dom.getElementsByClassName("operate_modal_showtop")[0];
10318
- var bottomDom = dom.getElementsByClassName("operate_modal_showbottom")[0];
10319
- if (topDom && bottomDom) {
10320
- console.log(h, con_h, rectY);
10321
- if (rectY > 0) {
10322
- topDom.style.cssText = "";
10323
- bottomDom.style.cssText = "visibility: hidden;";
10324
- // 上下都能显示时,显示到下边
10325
- if (h < con_h - rectY) {
10326
- topDom.style.cssText = "visibility: hidden;";
10327
- bottomDom.style.cssText = "";
10328
- }
10282
+ children: /*#__PURE__*/ jsxs("div", {
10283
+ className: styles.main_content_flag,
10284
+ onMouseEnter: function() {
10285
+ var dom = document.getElementById(item.id);
10286
+ if (dom) {
10287
+ var con_h = document.getElementById("chat_content").clientHeight - 24; //滚动区域的高度
10288
+ var rectY = dom.getBoundingClientRect().y - 48;
10289
+ var h = dom.clientHeight + 24; //当前元素高度
10290
+ var topDom = dom.getElementsByClassName("operate_modal_showtop")[0];
10291
+ var bottomDom = dom.getElementsByClassName("operate_modal_showbottom")[0];
10292
+ if (topDom && bottomDom) {
10293
+ console.log(h, con_h, rectY);
10294
+ if (rectY > 0) {
10295
+ topDom.style.cssText = "";
10296
+ bottomDom.style.cssText = "visibility: hidden;";
10297
+ // 上下都能显示时,显示到下边
10298
+ if (h < con_h - rectY) {
10299
+ topDom.style.cssText = "visibility: hidden;";
10300
+ bottomDom.style.cssText = "";
10301
+ }
10302
+ } else {
10303
+ // 上下都不显示
10304
+ if (h > con_h && h - con_h > Math.abs(rectY)) {
10305
+ console.log("rerererererer");
10306
+ topDom.style.cssText = "visibility: hidden;";
10307
+ bottomDom.style.cssText = "top:".concat(-(h + rectY - 51), "px");
10329
10308
  } else {
10330
- // 上下都不显示
10331
- if (h > con_h && h - con_h > Math.abs(rectY)) {
10332
- console.log("rerererererer");
10333
- topDom.style.cssText = "visibility: hidden;";
10334
- bottomDom.style.cssText = "top:".concat(-(h + rectY - 51), "px");
10335
- } else {
10336
- topDom.style.cssText = "visibility: hidden;";
10337
- bottomDom.style.cssText = "";
10338
- }
10309
+ topDom.style.cssText = "visibility: hidden;";
10310
+ bottomDom.style.cssText = "";
10339
10311
  }
10340
10312
  }
10341
10313
  }
10342
- },
10343
- children: [
10344
- /*#__PURE__*/ jsx("div", {
10345
- className: "".concat(styles.operate_modal, " operate_modal_showtop"),
10346
- children: // 不是最后一行,
10347
- historyMessageList.length - 1 != i && renderOperateBtn(item, isAiChatWindow, i)
10348
- }),
10349
- /*#__PURE__*/ jsxs("div", {
10350
- className: styles.content,
10351
- children: [
10352
- item.message != "AI助手繁忙,请稍后再提问或" && /*#__PURE__*/ jsx("p", {
10353
- dangerouslySetInnerHTML: {
10354
- __html: message
10355
- },
10356
- className: styles.content_child
10357
- }),
10358
- item.message == "AI助手繁忙,请稍后再提问或" && /*#__PURE__*/ jsxs("p", {
10359
- children: [
10360
- "AI助手繁忙,请稍后再提问或",
10361
- /*#__PURE__*/ jsx("span", {
10362
- className: styles.find_teacher_con,
10314
+ }
10315
+ },
10316
+ children: [
10317
+ /*#__PURE__*/ jsx("div", {
10318
+ className: "".concat(styles.operate_modal, " operate_modal_showtop"),
10319
+ children: // 不是最后一行,
10320
+ historyMessageList.length - 1 != i && renderOperateBtn(item, isAiChatWindow, i)
10321
+ }),
10322
+ /*#__PURE__*/ jsxs("div", {
10323
+ className: styles.content,
10324
+ children: [
10325
+ item.message != "AI助手繁忙,请稍后再提问或" && /*#__PURE__*/ jsx("p", {
10326
+ dangerouslySetInnerHTML: {
10327
+ __html: message
10328
+ },
10329
+ className: styles.content_child
10330
+ }),
10331
+ item.message == "AI助手繁忙,请稍后再提问或" && /*#__PURE__*/ jsxs("p", {
10332
+ children: [
10333
+ "AI助手繁忙,请稍后再提问或",
10334
+ /*#__PURE__*/ jsx("span", {
10335
+ className: styles.find_teacher_con,
10336
+ onClick: function() {
10337
+ var extraInfo = historyMessageList[i - 1].extraInfo;
10338
+ var url = "";
10339
+ if (extraInfo && JSON.parse(extraInfo).length > 0 && JSON.parse(extraInfo)[0].key == "imageUrl" && JSON.parse(extraInfo)[0].value) {
10340
+ url = JSON.parse(extraInfo)[0].value;
10341
+ }
10342
+ setProblem({
10343
+ question: historyMessageList[i - 1].message,
10344
+ url: url
10345
+ });
10346
+ setShowTeacherList(true);
10347
+ },
10348
+ children: "召唤老师回答"
10349
+ })
10350
+ ]
10351
+ }),
10352
+ !item.quotedMessage && item.extraInfo && JSON.parse(item.extraInfo).length > 0 && JSON.parse(item.extraInfo)[0].key == "imageUrl" && /*#__PURE__*/ jsxs("p", {
10353
+ className: "".concat(styles.img_con, " ").concat(showType == 2 || showType == 4 ? styles.img_con2 : ""),
10354
+ children: [
10355
+ /*#__PURE__*/ jsx("img", {
10356
+ src: JSON.parse(item.extraInfo)[0].value
10357
+ }),
10358
+ /*#__PURE__*/ jsx("div", {
10359
+ className: styles.mask_zoom,
10360
+ children: /*#__PURE__*/ jsx(ZoomInOutlined, {
10363
10361
  onClick: function() {
10364
- var extraInfo = historyMessageList[i - 1].extraInfo;
10365
- var url = "";
10366
- if (extraInfo && JSON.parse(extraInfo).length > 0 && JSON.parse(extraInfo)[0].key == "imageUrl" && JSON.parse(extraInfo)[0].value) {
10367
- url = JSON.parse(extraInfo)[0].value;
10368
- }
10369
- setProblem({
10370
- question: historyMessageList[i - 1].message,
10371
- url: url
10372
- });
10373
- setShowTeacherList(true);
10374
- },
10375
- children: "召唤老师回答"
10362
+ setViewBase64(JSON.parse(item.extraInfo)[0].value);
10363
+ setVisible(true);
10364
+ }
10376
10365
  })
10377
- ]
10378
- }),
10379
- item.extraInfo && JSON.parse(item.extraInfo).length > 0 && JSON.parse(item.extraInfo)[0].key == "imageUrl" && /*#__PURE__*/ jsxs("p", {
10380
- className: "".concat(styles.img_con, " ").concat(showType == 2 || showType == 4 ? styles.img_con2 : ""),
10381
- children: [
10382
- /*#__PURE__*/ jsx("img", {
10383
- src: JSON.parse(item.extraInfo)[0].value
10384
- }),
10385
- /*#__PURE__*/ jsx("div", {
10386
- className: styles.mask_zoom,
10387
- children: /*#__PURE__*/ jsx(ZoomInOutlined, {
10388
- onClick: function() {
10389
- setViewBase64(JSON.parse(item.extraInfo)[0].value);
10390
- setVisible(true);
10391
- }
10392
- })
10366
+ })
10367
+ ]
10368
+ }),
10369
+ item.extraInfo && JSON.parse(item.extraInfo).length > 0 && JSON.parse(item.extraInfo)[0].key == "messageSource" && JSON.parse(item.extraInfo)[0].value != "knowledgebase" && /*#__PURE__*/ jsxs("ul", {
10370
+ className: "".concat(styles.association_problem, " ").concat(item.message == "抱歉,我暂时无法回答这样的问题。" ? styles.association_problem_flag : ""),
10371
+ children: [
10372
+ item.message == "抱歉,我暂时无法回答这样的问题。" && /*#__PURE__*/ jsx("li", {
10373
+ className: styles.related_issues_flag,
10374
+ children: /*#__PURE__*/ jsx("span", {
10375
+ children: "相关问题"
10393
10376
  })
10394
- ]
10395
- }),
10396
- item.extraInfo && JSON.parse(item.extraInfo).length > 0 && JSON.parse(item.extraInfo)[0].key == "messageSource" && JSON.parse(item.extraInfo)[0].value != "knowledgebase" && /*#__PURE__*/ jsxs("ul", {
10397
- className: "".concat(styles.association_problem, " ").concat(item.message == "抱歉,我暂时无法回答这样的问题。" ? styles.association_problem_flag : ""),
10398
- children: [
10399
- item.message == "抱歉,我暂时无法回答这样的问题。" && /*#__PURE__*/ jsx("li", {
10400
- className: styles.related_issues_flag,
10401
- children: /*#__PURE__*/ jsx("span", {
10402
- children: "相关问题"
10377
+ }),
10378
+ JSON.parse(item.extraInfo).map(function(list, index) {
10379
+ return /*#__PURE__*/ jsx("li", {
10380
+ onClick: function() {
10381
+ sendMessage(list, 1);
10382
+ setBottomRecommendationQuestions([]);
10383
+ resettingBottomHei();
10384
+ },
10385
+ children: item.message == "抱歉,我暂时无法回答这样的问题。" ? list.question : /*#__PURE__*/ jsxs(Fragment, {
10386
+ children: [
10387
+ JSON.parse(item.extraInfo).length > 1 ? index + 1 + "." : "",
10388
+ list.question
10389
+ ]
10403
10390
  })
10404
- }),
10405
- JSON.parse(item.extraInfo).map(function(list, index) {
10406
- return /*#__PURE__*/ jsx("li", {
10407
- onClick: function() {
10408
- sendMessage(list, 1);
10409
- setBottomRecommendationQuestions([]);
10410
- resettingBottomHei();
10411
- },
10412
- children: item.message == "抱歉,我暂时无法回答这样的问题。" ? list.question : /*#__PURE__*/ jsxs(Fragment, {
10413
- children: [
10414
- JSON.parse(item.extraInfo).length > 1 ? index + 1 + "." : "",
10415
- list.question
10416
- ]
10417
- })
10418
- }, i + "_" + index + "_" + list.value);
10419
- })
10391
+ }, i + "_" + index + "_" + list.value);
10392
+ })
10393
+ ]
10394
+ }),
10395
+ //findTeacher//是否在召唤老师过程中,是否是最后一条消息
10396
+ !item.findTeacher && historyMessageList.length - 1 == i && item.id != "123456" && item.id != "123456_date" && renderLastOperateBtn(item, isAiChatWindow, i)
10397
+ ]
10398
+ }),
10399
+ //引用消息
10400
+ item.quotedMessage && /*#__PURE__*/ jsxs("div", {
10401
+ className: styles.citation_content,
10402
+ children: [
10403
+ getByteLen(item.quotedMessage) > 120 ? /*#__PURE__*/ jsx(Tooltip, {
10404
+ overlayClassName: styles.popover_main_content,
10405
+ title: item.quotedMessage,
10406
+ placement: "rightTop",
10407
+ children: /*#__PURE__*/ jsxs("p", {
10408
+ className: styles.text_exceed,
10409
+ children: [
10410
+ item.quotedMessage,
10411
+ /*#__PURE__*/ jsx(RightOutlined, {})
10420
10412
  ]
10421
- }),
10422
- //findTeacher//是否在召唤老师过程中,是否是最后一条消息
10423
- !item.findTeacher && historyMessageList.length - 1 == i && item.id != "123456" && item.id != "123456_date" && renderLastOperateBtn(item, isAiChatWindow, i)
10424
- ]
10425
- }),
10426
- historyMessageList.length - 1 !== i && /*#__PURE__*/ jsx("div", {
10427
- className: "".concat(styles.operate_modal, " ").concat(styles.bottom, " operate_modal_showbottom"),
10428
- children: // 不是最后一行,
10429
- renderOperateBtn(item, isAiChatWindow, i)
10430
- })
10431
- ]
10432
- }),
10433
- //引用消息
10434
- item.quotedMessage && /*#__PURE__*/ jsxs("div", {
10435
- className: styles.citation_content,
10436
- children: [
10437
- getByteLen(item.quotedMessage) > 120 ? /*#__PURE__*/ jsx(Tooltip, {
10438
- overlayClassName: styles.popover_main_content,
10439
- title: item.quotedMessage,
10440
- placement: "rightTop",
10441
- children: /*#__PURE__*/ jsxs("p", {
10442
- className: styles.text_exceed,
10413
+ })
10414
+ }) : /*#__PURE__*/ jsx("p", {
10415
+ children: item.quotedMessage
10416
+ }),
10417
+ item.quotedMessage && item.extraInfo && JSON.parse(item.extraInfo).length > 0 && JSON.parse(item.extraInfo)[0].key == "imageUrl" && /*#__PURE__*/ jsxs("p", {
10418
+ className: "".concat(styles.img_con, " ").concat(showType == 2 || showType == 4 ? styles.img_con2 : ""),
10443
10419
  children: [
10444
- item.quotedMessage,
10445
- /*#__PURE__*/ jsx(RightOutlined, {})
10420
+ /*#__PURE__*/ jsx("img", {
10421
+ src: JSON.parse(item.extraInfo)[0].value
10422
+ }),
10423
+ /*#__PURE__*/ jsx("div", {
10424
+ className: styles.mask_zoom,
10425
+ children: /*#__PURE__*/ jsx(ZoomInOutlined, {
10426
+ onClick: function() {
10427
+ setViewBase64(JSON.parse(item.extraInfo)[0].value);
10428
+ setVisible(true);
10429
+ }
10430
+ })
10431
+ })
10446
10432
  ]
10447
10433
  })
10448
- }) : /*#__PURE__*/ jsx("p", {
10449
- children: item.quotedMessage
10450
- }),
10451
- item.extraInfo && JSON.parse(item.extraInfo).length > 0 && JSON.parse(item.extraInfo)[0].key == "imageUrl" && /*#__PURE__*/ jsxs("p", {
10452
- className: "".concat(styles.img_con, " ").concat(showType == 2 || showType == 4 ? styles.img_con2 : ""),
10453
- children: [
10454
- /*#__PURE__*/ jsx("img", {
10455
- src: JSON.parse(item.extraInfo)[0].value
10456
- }),
10457
- /*#__PURE__*/ jsx("div", {
10458
- className: styles.mask_zoom,
10459
- children: /*#__PURE__*/ jsx(ZoomInOutlined, {
10460
- onClick: function() {
10461
- setViewBase64(JSON.parse(item.extraInfo)[0].value);
10462
- setVisible(true);
10463
- }
10464
- })
10465
- })
10466
- ]
10467
- })
10468
- ]
10469
- })
10470
- ]
10434
+ ]
10435
+ }),
10436
+ historyMessageList.length - 1 !== i && /*#__PURE__*/ jsx("div", {
10437
+ className: "".concat(styles.operate_modal, " ").concat(styles.bottom, " operate_modal_showbottom"),
10438
+ children: // 不是最后一行,
10439
+ renderOperateBtn(item, isAiChatWindow, i)
10440
+ })
10441
+ ]
10442
+ })
10471
10443
  })
10472
10444
  })
10473
10445
  ]