bhd-components 0.6.8 → 0.7.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, C as ConfigProvider, _ as _extends, a as _object_destructuring_empty, j as jsx, b as _object_spread_props, S as StyleProvider, t as transform, c as _object_spread, d as _sliced_to_array, T as Tooltip, e as Table$2, I as Icon, f as jsxs, m as message, E as ExclamationCircleFilled, P as Pagination, g as Select, h as CaretDownOutlined, M as Modal, i as _inherits, k as _create_super, l as _create_class, n as _class_call_check, o as _define_property, p as _assert_this_initialized, q as _async_to_generator, L as LeftOutlined, R as RightOutlined, r as MinusOutlined, s as PlusOutlined, u as __generator, v as Input, w as SearchOutlined, x as CloseOutlined, y as Remarkable, D as Drawer, H as HighlightJS } from './12224038.esm.es5.development.js';
2
- export { A as Affix, B as Alert, F as Anchor, aA as App, G as AutoComplete, J as Avatar, N as BackTop, O as Badge, Q as Breadcrumb, U as Button, V as Calendar, W as Card, X as Carousel, Y as Cascader, Z as Checkbox, $ as Col, a0 as Collapse, a1 as DatePicker, a2 as Descriptions, a3 as Divider, D as Drawer, a4 as Dropdown, a5 as Empty, K as FloatButton, a6 as Form, a7 as Grid, a8 as Image, v as Input, a9 as InputNumber, aa as Layout, ab as List, ac as Mentions, ad as Menu, M as Modal, af as Popconfirm, ag as Popover, ah as Progress, aH as QRCode, ai as Radio, aj as Rate, ak as Result, al as Row, am as Segmented, g as Select, an as Skeleton, ao as Slider, ap as Space, aq as Spin, ar as Statistic, as as Steps, at as Switch, au as Tabs, av as Tag, ax as TimePicker, ay as Timeline, T as Tooltip, az as Tour, aB as Transfer, aC as Tree, aD as TreeSelect, aE as Typography, aF as Upload, aG as Watermark, aJ as en_US, ae as notification, aw as theme, aI as version, z as zh_CN } from './12224038.esm.es5.development.js';
1
+ import { z as zhCN, C as ConfigProvider, _ as _extends, a as _object_destructuring_empty, j as jsx, b as _object_spread_props, S as StyleProvider, t as transform, c as _object_spread, d as _sliced_to_array, T as Tooltip, e as Table$2, I as Icon, f as jsxs, m as message, E as ExclamationCircleFilled, P as Pagination, g as Select, h as CaretDownOutlined, M as Modal, i as _inherits, k as _create_super, l as _create_class, n as _class_call_check, o as _define_property, p as _assert_this_initialized, q as _async_to_generator, L as LeftOutlined, R as RightOutlined, r as MinusOutlined, s as PlusOutlined, u as __generator, v as Input, w as SearchOutlined, x as CloseOutlined, y as Remarkable, D as Drawer, H as HighlightJS } from './fd2fee4a.esm.es5.development.js';
2
+ export { A as Affix, B as Alert, F as Anchor, aA as App, G as AutoComplete, J as Avatar, N as BackTop, O as Badge, Q as Breadcrumb, U as Button, V as Calendar, W as Card, X as Carousel, Y as Cascader, Z as Checkbox, $ as Col, a0 as Collapse, a1 as DatePicker, a2 as Descriptions, a3 as Divider, D as Drawer, a4 as Dropdown, a5 as Empty, K as FloatButton, a6 as Form, a7 as Grid, a8 as Image, v as Input, a9 as InputNumber, aa as Layout, ab as List, ac as Mentions, ad as Menu, M as Modal, af as Popconfirm, ag as Popover, ah as Progress, aH as QRCode, ai as Radio, aj as Rate, ak as Result, al as Row, am as Segmented, g as Select, an as Skeleton, ao as Slider, ap as Space, aq as Spin, ar as Statistic, as as Steps, at as Switch, au as Tabs, av as Tag, ax as TimePicker, ay as Timeline, T as Tooltip, az as Tour, aB as Transfer, aC as Tree, aD as TreeSelect, aE as Typography, aF as Upload, aG as Watermark, aJ as en_US, ae as notification, aw as theme, aI as version, z as zh_CN } from './fd2fee4a.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';
@@ -2332,7 +2332,7 @@ function BhdAppLayout(props) {
2332
2332
  });
2333
2333
  }
2334
2334
 
2335
- var modules_63b47c51 = {"service_ChatWindow_Drawer":"index_module_service_ChatWindow_Drawer__1d39865c","ChatWindow_Modal":"index_module_ChatWindow_Modal__1d39865c","ChatWindow_Drawer":"index_module_ChatWindow_Drawer__1d39865c","header_wrap":"index_module_header_wrap__1d39865c","top":"index_module_top__1d39865c","user":"index_module_user__1d39865c","count":"index_module_count__1d39865c","operate":"index_module_operate__1d39865c","line":"index_module_line__1d39865c","header_wrap_newlabo":"index_module_header_wrap_newlabo__1d39865c","Drawer_main":"index_module_Drawer_main__1d39865c","loading":"index_module_loading__1d39865c","message_con":"index_module_message_con__1d39865c","left":"index_module_left__1d39865c","head_sculpture":"index_module_head_sculpture__1d39865c","main_content":"index_module_main_content__1d39865c","right":"index_module_right__1d39865c","main":"index_module_main__1d39865c","main_content_flag":"index_module_main_content_flag__1d39865c","operate_modal":"index_module_operate_modal__1d39865c","content":"index_module_content__1d39865c","content_child":"index_module_content_child__1d39865c","active":"index_module_active__1d39865c","ask_question":"index_module_ask_question__1d39865c","operate_modal_bottom":"index_module_operate_modal_bottom__1d39865c","stop_generate":"index_module_stop_generate__1d39865c","icon":"index_module_icon__1d39865c","find_teacher":"index_module_find_teacher__1d39865c","stop_findTeacher":"index_module_stop_findTeacher__1d39865c","association_problem":"index_module_association_problem__1d39865c","time":"index_module_time__1d39865c","citation_content":"index_module_citation_content__1d39865c","text_exceed":"index_module_text_exceed__1d39865c","popover_content":"index_module_popover_content__1d39865c","Drawer_main_newlabo":"index_module_Drawer_main_newlabo__1d39865c","Drawer_main_newlabo_no_pic":"index_module_Drawer_main_newlabo_no_pic__1d39865c","Drawer_buttom_Issues_List":"index_module_Drawer_buttom_Issues_List__1d39865c","issues_list_teacherList":"index_module_issues_list_teacherList__1d39865c","item":"index_module_item__1d39865c","issues_list":"index_module_issues_list__1d39865c","sign":"index_module_sign__1d39865c","Drawer_buttom":"index_module_Drawer_buttom__1d39865c","input_wrap":"index_module_input_wrap__1d39865c","input":"index_module_input__1d39865c","no_AI":"index_module_no_AI__1d39865c","voice":"index_module_voice__1d39865c","voice_btn":"index_module_voice_btn__1d39865c","disabled":"index_module_disabled__1d39865c","content_main":"index_module_content_main__1d39865c","content_con":"index_module_content_con__1d39865c","delete_quote":"index_module_delete_quote__1d39865c","sending":"index_module_sending__1d39865c","Drawer_buttom_Issues_List_newlabo":"index_module_Drawer_buttom_Issues_List_newlabo__1d39865c","main_list":"index_module_main_list__1d39865c","chat_content":"index_module_chat_content__1d39865c","popover_main_content":"index_module_popover_main_content__1d39865c","popover_main_content_name":"index_module_popover_main_content_name__1d39865c","teacher_layout":"index_module_teacher_layout__1d39865c","bottom":"index_module_bottom__1d39865c","delete":"index_module_delete__1d39865c","num":"index_module_num__1d39865c","shrink":"index_module_shrink__1d39865c","teacher_layout_newlabo":"index_module_teacher_layout_newlabo__1d39865c","teacher_layout_modal":"index_module_teacher_layout_modal__1d39865c","ai":"index_module_ai__1d39865c","user_info":"index_module_user_info__1d39865c","message":"index_module_message__1d39865c","con":"index_module_con__1d39865c","teacher_layout_modal_newlabo":"index_module_teacher_layout_modal_newlabo__1d39865c","history_list":"index_module_history_list__1d39865c","search_layout":"index_module_search_layout__1d39865c","mymove":"index_module_mymove__1d39865c","title":"index_module_title__1d39865c","search_top":"index_module_search_top__1d39865c","list_item":"index_module_list_item__1d39865c","list_summary":"index_module_list_summary__1d39865c","head_img":"index_module_head_img__1d39865c","list_desc":"index_module_list_desc__1d39865c","name":"index_module_name__1d39865c","decs":"index_module_decs__1d39865c","open":"index_module_open__1d39865c","list_detail":"index_module_list_detail__1d39865c","list":"index_module_list__1d39865c","list_more":"index_module_list_more__1d39865c","no_data":"index_module_no_data__1d39865c","history_list_broadside":"index_module_history_list_broadside__1d39865c"};
2335
+ var modules_63b47c51 = {"service_ChatWindow_Drawer":"index_module_service_ChatWindow_Drawer__1c3a52cb","ChatWindow_Modal":"index_module_ChatWindow_Modal__1c3a52cb","ChatWindow_Drawer":"index_module_ChatWindow_Drawer__1c3a52cb","header_wrap":"index_module_header_wrap__1c3a52cb","top":"index_module_top__1c3a52cb","user":"index_module_user__1c3a52cb","count":"index_module_count__1c3a52cb","operate":"index_module_operate__1c3a52cb","line":"index_module_line__1c3a52cb","header_wrap_newlabo":"index_module_header_wrap_newlabo__1c3a52cb","Drawer_main":"index_module_Drawer_main__1c3a52cb","loading":"index_module_loading__1c3a52cb","message_con":"index_module_message_con__1c3a52cb","left":"index_module_left__1c3a52cb","head_sculpture":"index_module_head_sculpture__1c3a52cb","main_content":"index_module_main_content__1c3a52cb","right":"index_module_right__1c3a52cb","main":"index_module_main__1c3a52cb","main_content_flag":"index_module_main_content_flag__1c3a52cb","operate_modal":"index_module_operate_modal__1c3a52cb","content":"index_module_content__1c3a52cb","content_child":"index_module_content_child__1c3a52cb","sign":"index_module_sign__1c3a52cb","active":"index_module_active__1c3a52cb","ask_question":"index_module_ask_question__1c3a52cb","operate_modal_bottom":"index_module_operate_modal_bottom__1c3a52cb","stop_generate":"index_module_stop_generate__1c3a52cb","icon":"index_module_icon__1c3a52cb","find_teacher":"index_module_find_teacher__1c3a52cb","stop_findTeacher":"index_module_stop_findTeacher__1c3a52cb","association_problem":"index_module_association_problem__1c3a52cb","time":"index_module_time__1c3a52cb","citation_content":"index_module_citation_content__1c3a52cb","text_exceed":"index_module_text_exceed__1c3a52cb","popover_content":"index_module_popover_content__1c3a52cb","Drawer_main_newlabo":"index_module_Drawer_main_newlabo__1c3a52cb","Drawer_main_newlabo_no_pic":"index_module_Drawer_main_newlabo_no_pic__1c3a52cb","Drawer_buttom_Issues_List":"index_module_Drawer_buttom_Issues_List__1c3a52cb","issues_list_teacherList":"index_module_issues_list_teacherList__1c3a52cb","item":"index_module_item__1c3a52cb","issues_list":"index_module_issues_list__1c3a52cb","Drawer_buttom":"index_module_Drawer_buttom__1c3a52cb","input_wrap":"index_module_input_wrap__1c3a52cb","input":"index_module_input__1c3a52cb","no_AI":"index_module_no_AI__1c3a52cb","voice":"index_module_voice__1c3a52cb","voice_btn":"index_module_voice_btn__1c3a52cb","disabled":"index_module_disabled__1c3a52cb","content_main":"index_module_content_main__1c3a52cb","content_con":"index_module_content_con__1c3a52cb","delete_quote":"index_module_delete_quote__1c3a52cb","sending":"index_module_sending__1c3a52cb","Drawer_buttom_Issues_List_newlabo":"index_module_Drawer_buttom_Issues_List_newlabo__1c3a52cb","main_list":"index_module_main_list__1c3a52cb","chat_content":"index_module_chat_content__1c3a52cb","popover_main_content":"index_module_popover_main_content__1c3a52cb","popover_main_content_name":"index_module_popover_main_content_name__1c3a52cb","teacher_layout":"index_module_teacher_layout__1c3a52cb","bottom":"index_module_bottom__1c3a52cb","delete":"index_module_delete__1c3a52cb","num":"index_module_num__1c3a52cb","shrink":"index_module_shrink__1c3a52cb","teacher_layout_newlabo":"index_module_teacher_layout_newlabo__1c3a52cb","teacher_layout_modal":"index_module_teacher_layout_modal__1c3a52cb","ai":"index_module_ai__1c3a52cb","user_info":"index_module_user_info__1c3a52cb","message":"index_module_message__1c3a52cb","con":"index_module_con__1c3a52cb","teacher_layout_modal_newlabo":"index_module_teacher_layout_modal_newlabo__1c3a52cb","history_list":"index_module_history_list__1c3a52cb","search_layout":"index_module_search_layout__1c3a52cb","mymove":"index_module_mymove__1c3a52cb","title":"index_module_title__1c3a52cb","search_top":"index_module_search_top__1c3a52cb","list_item":"index_module_list_item__1c3a52cb","list_summary":"index_module_list_summary__1c3a52cb","head_img":"index_module_head_img__1c3a52cb","list_desc":"index_module_list_desc__1c3a52cb","name":"index_module_name__1c3a52cb","decs":"index_module_decs__1c3a52cb","open":"index_module_open__1c3a52cb","list_summary_active":"index_module_list_summary_active__1c3a52cb","list_detail":"index_module_list_detail__1c3a52cb","list":"index_module_list__1c3a52cb","list_more":"index_module_list_more__1c3a52cb","no_data":"index_module_no_data__1c3a52cb","history_list_broadside":"index_module_history_list_broadside__1c3a52cb"};
2336
2336
 
2337
2337
  //消息已读
2338
2338
  var readMessage = function(roomId, urllocation, userData, http) {
@@ -2522,8 +2522,11 @@ var HistoryFun = function(props) {
2522
2522
  }
2523
2523
  });
2524
2524
  var pageNumber = findPageNumber(30, Math.ceil(total / 30), number);
2525
+ if (number == 0) {
2526
+ pageNumber = 1;
2527
+ }
2525
2528
  console.log(roomId, pageNumber, id, receiver, "第几页第几页第几页第几页第几页第几页");
2526
- loadSpecifiedData(roomId, pageNumber, id, receiver);
2529
+ loadSpecifiedData(roomId, pageNumber, id, receiver, keyWordProblem);
2527
2530
  onClose();
2528
2531
  setKeyWordProblem("");
2529
2532
  setTotalData([]);
@@ -2790,7 +2793,7 @@ var HistoryFun = function(props) {
2790
2793
  return /*#__PURE__*/ jsxs(Fragment, {
2791
2794
  children: [
2792
2795
  /*#__PURE__*/ jsxs("div", {
2793
- className: modules_63b47c51.list_summary,
2796
+ className: "".concat(modules_63b47c51.list_summary, " ").concat(item.show ? modules_63b47c51.list_summary_active : ""),
2794
2797
  id: item.roomId,
2795
2798
  onClick: function() {
2796
2799
  if (item.count == 1) {
@@ -3288,6 +3291,7 @@ var CustomerService = function(props) {
3288
3291
  // const [roomList,setRoomList] = useState([]);//聊天列表
3289
3292
  var _useState25 = _sliced_to_array(useState([]), 2), contactsList = _useState25[0], setContactsList = _useState25[1]; //老师列表
3290
3293
  var _useState26 = _sliced_to_array(useState([]), 2), chatObj = _useState26[0], setChatObj = _useState26[1]; //聊天记录id保存,用来在实验报告中记录
3294
+ var _useState27 = _sliced_to_array(useState(""), 2), keyWordProblem = _useState27[0], setKeyWordProblem = _useState27[1]; //历史记录搜索的内容
3291
3295
  var timer = useRef(null); //文本框输入时
3292
3296
  var receiveMessageTimer = useRef(null); //接收ai发回的消息
3293
3297
  var voiceCountdownTimer = useRef(null); //语音录制倒计时
@@ -3296,6 +3300,8 @@ var CustomerService = function(props) {
3296
3300
  var chatRoomList = useRef(null); //获取聊天室列表
3297
3301
  var ctrl = useRef(); //停止生成ai回答时使用
3298
3302
  var childRef = useRef(null); //获取子组件方法
3303
+ var scrollTopHei = useRef(0);
3304
+ var isPosition = useRef(true);
3299
3305
  var mid = props.userData.mid;
3300
3306
  var remarkable = new Remarkable({
3301
3307
  highlight: function highlight(str, lang) {
@@ -3362,6 +3368,16 @@ var CustomerService = function(props) {
3362
3368
  getHistoryMessage(number1, 2);
3363
3369
  }, 1000);
3364
3370
  }
3371
+ //生成答案过程中
3372
+ if (!finished && scrollTopHei.current > scrollTop) {
3373
+ // setIsPosition(false);
3374
+ isPosition.current = false;
3375
+ }
3376
+ if (!finished && clientHeight + scrollTop >= scrollHeight) {
3377
+ // console.log('到顶了111');
3378
+ isPosition.current = true;
3379
+ }
3380
+ scrollTopHei.current = scrollTop;
3365
3381
  }
3366
3382
  var content = document.getElementById(showType == 1 || showType == 3 ? "chat_content" : "chat_content_modal");
3367
3383
  if (content) {
@@ -3475,28 +3491,48 @@ var CustomerService = function(props) {
3475
3491
  var questionsList = [];
3476
3492
  var obj = {};
3477
3493
  if (type == 1) {
3478
- questionsList = hotQuestionsList.map(function(item, index) {
3479
- if (index < 3) {
3480
- return {
3481
- key: "messageSource",
3482
- value: item.id,
3483
- question: item.question,
3484
- answer: item.answer
3485
- };
3486
- } else {
3487
- return null;
3488
- }
3489
- });
3490
- questionsList = questionsList.filter(function(i) {
3491
- return i != null;
3492
- });
3494
+ // questionsList = hotQuestionsList.map((item, index) => {
3495
+ // if (index < 3) {
3496
+ // return {
3497
+ // key: "messageSource",
3498
+ // value: item.id,
3499
+ // question: item.question,
3500
+ // answer: item.answer,
3501
+ // };
3502
+ // } else {
3503
+ // return null;
3504
+ // }
3505
+ // });
3506
+ // questionsList = questionsList.filter((i) => i != null);
3493
3507
  obj = {
3494
3508
  roomId: roomId,
3495
3509
  sender: "AI",
3496
3510
  recevier: mid,
3497
- message: "Hi!我是有问必答的实训云智能客服,请问您遇到了什么问题?",
3498
- extraInfos: questionsList
3511
+ message: "Hi!我是有问必答的实训云智能客服,请问您遇到了什么问题?"
3499
3512
  };
3513
+ if (pageNumHistory <= 1) {
3514
+ setHistoryMessageList(function(historyMessageList) {
3515
+ var newHistoryMessageList = historyMessageList.concat(_object_spread_props(_object_spread({}, obj), {
3516
+ id: "p" + new Date().getTime(),
3517
+ upvoted: false,
3518
+ downvoted: false,
3519
+ quotedMessage: "",
3520
+ createdAt: getDataTime(-1),
3521
+ // extraInfo: JSON.stringify(obj.extraInfos),
3522
+ extraInfo: JSON.stringify([
3523
+ {
3524
+ key: "messageSource",
3525
+ value: "knowledgebase"
3526
+ }
3527
+ ])
3528
+ }));
3529
+ return newHistoryMessageList;
3530
+ });
3531
+ setTimeout(function() {
3532
+ scrollToBottom();
3533
+ }, 100);
3534
+ }
3535
+ return;
3500
3536
  } else if (type == 2) {
3501
3537
  obj = {
3502
3538
  roomId: roomId,
@@ -3571,6 +3607,24 @@ var CustomerService = function(props) {
3571
3607
  message: "猜你想问:",
3572
3608
  extraInfos: questionsList
3573
3609
  };
3610
+ if (pageNumHistory <= 1) {
3611
+ setHistoryMessageList(function(historyMessageList) {
3612
+ var newHistoryMessageList = historyMessageList.concat(_object_spread_props(_object_spread({}, obj), {
3613
+ id: "p" + new Date().getTime(),
3614
+ upvoted: false,
3615
+ downvoted: false,
3616
+ quotedMessage: "",
3617
+ createdAt: getDataTime(-1),
3618
+ extraInfo: JSON.stringify(obj.extraInfos)
3619
+ }));
3620
+ return newHistoryMessageList;
3621
+ });
3622
+ setTimeout(function() {
3623
+ scrollToBottom();
3624
+ }, 100);
3625
+ }
3626
+ console.log("不记录1111111");
3627
+ return;
3574
3628
  }
3575
3629
  setKeyWord("");
3576
3630
  setQuestionsList([]);
@@ -3640,11 +3694,13 @@ var CustomerService = function(props) {
3640
3694
  }));
3641
3695
  return newHistoryMessageList;
3642
3696
  });
3643
- if (!lastId) {
3644
- setTimeout(function() {
3645
- scrollToBottom();
3646
- }, 100);
3647
- }
3697
+ // console.log(lastId,'消息发送给老师111');
3698
+ // if (!lastId) {
3699
+ setTimeout(function() {
3700
+ console.log("滚动到底部");
3701
+ scrollToBottom();
3702
+ }, 100);
3703
+ // }
3648
3704
  }
3649
3705
  //判断当前窗口是否是
3650
3706
  if (type == 1) {
@@ -3969,11 +4025,19 @@ var CustomerService = function(props) {
3969
4025
  }
3970
4026
  if (msg.finished) {
3971
4027
  setFinished(true); //发送结束
4028
+ // isPosition.current = true;
4029
+ setTimeout(function() {
4030
+ isPosition.current = true;
4031
+ }, 100);
3972
4032
  testLabQuestion(JSON.parse(data).message, content, "");
3973
4033
  }
3974
4034
  },
3975
4035
  onclose: function() {
3976
4036
  setFinished(true); //发送结束
4037
+ // isPosition.current = true;
4038
+ setTimeout(function() {
4039
+ isPosition.current = true;
4040
+ }, 100);
3977
4041
  setHistoryMessageList(function(historyMessageList) {
3978
4042
  return historyMessageList.filter(function(item) {
3979
4043
  return item.id != "123456";
@@ -4039,7 +4103,9 @@ var CustomerService = function(props) {
4039
4103
  }
4040
4104
  });
4041
4105
  setTimeout(function() {
4042
- scrollToBottom();
4106
+ if (isPosition.current) {
4107
+ scrollToBottom();
4108
+ }
4043
4109
  }, 10);
4044
4110
  };
4045
4111
  //问题记录到实验报告中
@@ -4088,7 +4154,7 @@ var CustomerService = function(props) {
4088
4154
  var getHistoryMessage = function(pageNum, flag) {
4089
4155
  var id = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "1", raw_data = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : [];
4090
4156
  clearTimeout(roomMessage.current);
4091
- // console.log(pageNum,flag,'dkfjvndfjvndfkvdf')
4157
+ console.log(pageNum, flag, "dkfjvndfjvndfkvdf");
4092
4158
  // flag == 1 时已经设置好了位置标记
4093
4159
  var last_id = "";
4094
4160
  if (flag == 2 && historyMessageList.length > 0) {
@@ -4179,6 +4245,11 @@ var CustomerService = function(props) {
4179
4245
  if (problem != undefined && problem.user != undefined && problem.question != undefined) {
4180
4246
  sendToTeacher(1);
4181
4247
  }
4248
+ // if(flag == 1){
4249
+ setTimeout(function() {
4250
+ setKeyWordProblem("");
4251
+ }, 3100);
4252
+ // }
4182
4253
  } else {
4183
4254
  setPageCount(0);
4184
4255
  setGreetingMessage(true);
@@ -4756,6 +4827,16 @@ var CustomerService = function(props) {
4756
4827
  }
4757
4828
  }
4758
4829
  var dataTime = time;
4830
+ if (lastId == item.id && keyWordProblem != "") {
4831
+ message = remarkable.render(message);
4832
+ console.log(message, 444444);
4833
+ message = message.replaceAll(keyWordProblem, function(e) {
4834
+ return "<span class=".concat(styles.sign, ">").concat(e, "</span>");
4835
+ });
4836
+ console.log(message, 55555);
4837
+ } else {
4838
+ message = remarkable.render(message);
4839
+ }
4759
4840
  if (item.sender == mid) {
4760
4841
  //只有引用和复制功能
4761
4842
  li = /*#__PURE__*/ jsxs(Fragment, {
@@ -4828,7 +4909,7 @@ var CustomerService = function(props) {
4828
4909
  className: styles.content,
4829
4910
  children: /*#__PURE__*/ jsx("p", {
4830
4911
  dangerouslySetInnerHTML: {
4831
- __html: remarkable.render(message)
4912
+ __html: message
4832
4913
  },
4833
4914
  className: styles.content_child
4834
4915
  })
@@ -4927,7 +5008,7 @@ var CustomerService = function(props) {
4927
5008
  children: [
4928
5009
  /*#__PURE__*/ jsx("p", {
4929
5010
  dangerouslySetInnerHTML: {
4930
- __html: remarkable.render(message)
5011
+ __html: message
4931
5012
  },
4932
5013
  className: styles.content_child
4933
5014
  }),
@@ -5173,7 +5254,7 @@ var CustomerService = function(props) {
5173
5254
  return /*#__PURE__*/ jsxs("div", {
5174
5255
  className: "".concat(styles.operate_modal_bottom),
5175
5256
  style: {
5176
- position: showStopBtn ? "sticky" : "relative"
5257
+ position: showStopBtn && isPosition.current ? "sticky" : "relative"
5177
5258
  },
5178
5259
  children: [
5179
5260
  /*#__PURE__*/ jsxs("p", {
@@ -5456,6 +5537,11 @@ var CustomerService = function(props) {
5456
5537
  setQuestionsList([]);
5457
5538
  setAnswerMode(-1);
5458
5539
  setTeacherList([]);
5540
+ setTimeout(function() {
5541
+ setQuestionsList([]);
5542
+ setTeacherList([]);
5543
+ clearTimeout(timer.current);
5544
+ }, 200);
5459
5545
  setHistoryMessageList(function(historyMessageList) {
5460
5546
  return historyMessageList.filter(function(item) {
5461
5547
  return item.id != "-1";
@@ -5565,6 +5651,11 @@ var CustomerService = function(props) {
5565
5651
  setQuestionsList([]);
5566
5652
  setAnswerMode(-1);
5567
5653
  setTeacherList([]);
5654
+ setTimeout(function() {
5655
+ setQuestionsList([]);
5656
+ setTeacherList([]);
5657
+ clearTimeout(timer.current);
5658
+ }, 200);
5568
5659
  setHistoryMessageList(function(historyMessageList) {
5569
5660
  return historyMessageList.filter(function(item) {
5570
5661
  return item.id != "-1";
@@ -5682,11 +5773,14 @@ var CustomerService = function(props) {
5682
5773
  }
5683
5774
  };
5684
5775
  //加载指定数据,点击历史记录
5685
- var loadSpecifiedData = function(renewRoomId, page, id, receiver) {
5776
+ var loadSpecifiedData = function(renewRoomId, page, id, receiver, keyWordProblem) {
5686
5777
  // let renewRoomId = '4a615d7126b343f78d10dcb06dbc29b0';
5687
5778
  // let page = 1;
5688
5779
  // let id = '0e459f0a3a62438698f170b42b94d150';
5689
5780
  // let receiver = mid;
5781
+ if (keyWordProblem != "") {
5782
+ setKeyWordProblem(keyWordProblem);
5783
+ }
5690
5784
  if (page != 1) {
5691
5785
  setPageNumHistory(page);
5692
5786
  }
@@ -5750,6 +5844,9 @@ var CustomerService = function(props) {
5750
5844
  style: {
5751
5845
  maxHeight: "calc(100vh-".concat(buttomHei + 48, "px)")
5752
5846
  },
5847
+ onClick: function() {
5848
+ setKeyWordProblem("");
5849
+ },
5753
5850
  children: [
5754
5851
  loading ? /*#__PURE__*/ jsx("div", {
5755
5852
  className: styles.loading,
@@ -5758,7 +5855,7 @@ var CustomerService = function(props) {
5758
5855
  alt: ""
5759
5856
  })
5760
5857
  }) : "",
5761
- renderQuestion(),
5858
+ keyWordProblem ? renderQuestion() : renderQuestion(),
5762
5859
  bottomLoading ? /*#__PURE__*/ jsx("div", {
5763
5860
  className: styles.loading,
5764
5861
  children: /*#__PURE__*/ jsx("img", {
@@ -5814,6 +5911,9 @@ var CustomerService = function(props) {
5814
5911
  }),
5815
5912
  /*#__PURE__*/ jsxs("div", {
5816
5913
  className: "".concat(styles.Drawer_wrap_main),
5914
+ onClick: function() {
5915
+ setKeyWordProblem("");
5916
+ },
5817
5917
  children: [
5818
5918
  /*#__PURE__*/ jsxs("div", {
5819
5919
  className: "".concat(styles.Drawer_main, " ChatWindow_Modal_history_list"),
@@ -5846,7 +5946,7 @@ var CustomerService = function(props) {
5846
5946
  alt: ""
5847
5947
  })
5848
5948
  }) : "",
5849
- renderQuestion()
5949
+ keyWordProblem ? renderQuestion() : renderQuestion()
5850
5950
  ]
5851
5951
  })
5852
5952
  ]
@@ -5880,6 +5980,9 @@ var CustomerService = function(props) {
5880
5980
  showType == 3 ? /*#__PURE__*/ jsxs("div", {
5881
5981
  className: "".concat(styles.ChatWindow_Drawer),
5882
5982
  id: "",
5983
+ onClick: function() {
5984
+ setKeyWordProblem("");
5985
+ },
5883
5986
  children: [
5884
5987
  /*#__PURE__*/ jsx("div", {
5885
5988
  className: "".concat(styles.header_wrap, " ").concat(styles.header_wrap_newlabo),
@@ -5940,7 +6043,7 @@ var CustomerService = function(props) {
5940
6043
  alt: ""
5941
6044
  })
5942
6045
  }) : "",
5943
- renderQuestion()
6046
+ keyWordProblem ? renderQuestion() : renderQuestion()
5944
6047
  ]
5945
6048
  }),
5946
6049
  /*#__PURE__*/ jsxs("div", {
@@ -6017,6 +6120,9 @@ var CustomerService = function(props) {
6017
6120
  style: {
6018
6121
  maxHeight: "".concat(window.innerHeight - 148 - buttomHei, "px")
6019
6122
  },
6123
+ onClick: function() {
6124
+ setKeyWordProblem("");
6125
+ },
6020
6126
  children: [
6021
6127
  /*#__PURE__*/ jsx(ContactsList$1, {
6022
6128
  type: 4,
@@ -6042,7 +6148,7 @@ var CustomerService = function(props) {
6042
6148
  alt: ""
6043
6149
  })
6044
6150
  }) : "",
6045
- renderQuestion()
6151
+ keyWordProblem ? renderQuestion() : renderQuestion()
6046
6152
  ]
6047
6153
  })
6048
6154
  ]
@@ -6134,7 +6240,7 @@ var CustomerService = function(props) {
6134
6240
  alt: ""
6135
6241
  })
6136
6242
  }) : "",
6137
- renderQuestion()
6243
+ keyWordProblem ? renderQuestion() : renderQuestion()
6138
6244
  ]
6139
6245
  }),
6140
6246
  /*#__PURE__*/ jsxs("div", {