bhd-components 0.6.8 → 0.6.9

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 './769f0c13.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 './769f0c13.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__c8b380c0","ChatWindow_Modal":"index_module_ChatWindow_Modal__c8b380c0","ChatWindow_Drawer":"index_module_ChatWindow_Drawer__c8b380c0","header_wrap":"index_module_header_wrap__c8b380c0","top":"index_module_top__c8b380c0","user":"index_module_user__c8b380c0","count":"index_module_count__c8b380c0","operate":"index_module_operate__c8b380c0","line":"index_module_line__c8b380c0","header_wrap_newlabo":"index_module_header_wrap_newlabo__c8b380c0","Drawer_main":"index_module_Drawer_main__c8b380c0","loading":"index_module_loading__c8b380c0","message_con":"index_module_message_con__c8b380c0","left":"index_module_left__c8b380c0","head_sculpture":"index_module_head_sculpture__c8b380c0","main_content":"index_module_main_content__c8b380c0","right":"index_module_right__c8b380c0","main":"index_module_main__c8b380c0","main_content_flag":"index_module_main_content_flag__c8b380c0","operate_modal":"index_module_operate_modal__c8b380c0","content":"index_module_content__c8b380c0","content_child":"index_module_content_child__c8b380c0","active":"index_module_active__c8b380c0","ask_question":"index_module_ask_question__c8b380c0","operate_modal_bottom":"index_module_operate_modal_bottom__c8b380c0","stop_generate":"index_module_stop_generate__c8b380c0","icon":"index_module_icon__c8b380c0","find_teacher":"index_module_find_teacher__c8b380c0","stop_findTeacher":"index_module_stop_findTeacher__c8b380c0","association_problem":"index_module_association_problem__c8b380c0","time":"index_module_time__c8b380c0","citation_content":"index_module_citation_content__c8b380c0","text_exceed":"index_module_text_exceed__c8b380c0","popover_content":"index_module_popover_content__c8b380c0","Drawer_main_newlabo":"index_module_Drawer_main_newlabo__c8b380c0","Drawer_main_newlabo_no_pic":"index_module_Drawer_main_newlabo_no_pic__c8b380c0","Drawer_buttom_Issues_List":"index_module_Drawer_buttom_Issues_List__c8b380c0","issues_list_teacherList":"index_module_issues_list_teacherList__c8b380c0","item":"index_module_item__c8b380c0","issues_list":"index_module_issues_list__c8b380c0","sign":"index_module_sign__c8b380c0","Drawer_buttom":"index_module_Drawer_buttom__c8b380c0","input_wrap":"index_module_input_wrap__c8b380c0","input":"index_module_input__c8b380c0","no_AI":"index_module_no_AI__c8b380c0","voice":"index_module_voice__c8b380c0","voice_btn":"index_module_voice_btn__c8b380c0","disabled":"index_module_disabled__c8b380c0","content_main":"index_module_content_main__c8b380c0","content_con":"index_module_content_con__c8b380c0","delete_quote":"index_module_delete_quote__c8b380c0","sending":"index_module_sending__c8b380c0","Drawer_buttom_Issues_List_newlabo":"index_module_Drawer_buttom_Issues_List_newlabo__c8b380c0","main_list":"index_module_main_list__c8b380c0","chat_content":"index_module_chat_content__c8b380c0","popover_main_content":"index_module_popover_main_content__c8b380c0","popover_main_content_name":"index_module_popover_main_content_name__c8b380c0","teacher_layout":"index_module_teacher_layout__c8b380c0","bottom":"index_module_bottom__c8b380c0","delete":"index_module_delete__c8b380c0","num":"index_module_num__c8b380c0","shrink":"index_module_shrink__c8b380c0","teacher_layout_newlabo":"index_module_teacher_layout_newlabo__c8b380c0","teacher_layout_modal":"index_module_teacher_layout_modal__c8b380c0","ai":"index_module_ai__c8b380c0","user_info":"index_module_user_info__c8b380c0","message":"index_module_message__c8b380c0","con":"index_module_con__c8b380c0","teacher_layout_modal_newlabo":"index_module_teacher_layout_modal_newlabo__c8b380c0","history_list":"index_module_history_list__c8b380c0","search_layout":"index_module_search_layout__c8b380c0","mymove":"index_module_mymove__c8b380c0","title":"index_module_title__c8b380c0","search_top":"index_module_search_top__c8b380c0","list_item":"index_module_list_item__c8b380c0","list_summary":"index_module_list_summary__c8b380c0","head_img":"index_module_head_img__c8b380c0","list_desc":"index_module_list_desc__c8b380c0","name":"index_module_name__c8b380c0","decs":"index_module_decs__c8b380c0","open":"index_module_open__c8b380c0","list_detail":"index_module_list_detail__c8b380c0","list":"index_module_list__c8b380c0","list_more":"index_module_list_more__c8b380c0","no_data":"index_module_no_data__c8b380c0","history_list_broadside":"index_module_history_list_broadside__c8b380c0"};
2336
2336
 
2337
2337
  //消息已读
2338
2338
  var readMessage = function(roomId, urllocation, userData, http) {
@@ -2522,6 +2522,9 @@ 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
2529
  loadSpecifiedData(roomId, pageNumber, id, receiver);
2527
2530
  onClose();
@@ -3296,6 +3299,8 @@ var CustomerService = function(props) {
3296
3299
  var chatRoomList = useRef(null); //获取聊天室列表
3297
3300
  var ctrl = useRef(); //停止生成ai回答时使用
3298
3301
  var childRef = useRef(null); //获取子组件方法
3302
+ var scrollTopHei = useRef(0);
3303
+ var isPosition = useRef(true);
3299
3304
  var mid = props.userData.mid;
3300
3305
  var remarkable = new Remarkable({
3301
3306
  highlight: function highlight(str, lang) {
@@ -3362,6 +3367,16 @@ var CustomerService = function(props) {
3362
3367
  getHistoryMessage(number1, 2);
3363
3368
  }, 1000);
3364
3369
  }
3370
+ //生成答案过程中
3371
+ if (!finished && scrollTopHei.current > scrollTop) {
3372
+ // setIsPosition(false);
3373
+ isPosition.current = false;
3374
+ }
3375
+ if (!finished && clientHeight + scrollTop >= scrollHeight) {
3376
+ // console.log('到顶了111');
3377
+ isPosition.current = true;
3378
+ }
3379
+ scrollTopHei.current = scrollTop;
3365
3380
  }
3366
3381
  var content = document.getElementById(showType == 1 || showType == 3 ? "chat_content" : "chat_content_modal");
3367
3382
  if (content) {
@@ -3640,11 +3655,13 @@ var CustomerService = function(props) {
3640
3655
  }));
3641
3656
  return newHistoryMessageList;
3642
3657
  });
3643
- if (!lastId) {
3644
- setTimeout(function() {
3645
- scrollToBottom();
3646
- }, 100);
3647
- }
3658
+ // console.log(lastId,'消息发送给老师111');
3659
+ // if (!lastId) {
3660
+ setTimeout(function() {
3661
+ console.log("滚动到底部");
3662
+ scrollToBottom();
3663
+ }, 100);
3664
+ // }
3648
3665
  }
3649
3666
  //判断当前窗口是否是
3650
3667
  if (type == 1) {
@@ -3969,11 +3986,19 @@ var CustomerService = function(props) {
3969
3986
  }
3970
3987
  if (msg.finished) {
3971
3988
  setFinished(true); //发送结束
3989
+ // isPosition.current = true;
3990
+ setTimeout(function() {
3991
+ isPosition.current = true;
3992
+ }, 100);
3972
3993
  testLabQuestion(JSON.parse(data).message, content, "");
3973
3994
  }
3974
3995
  },
3975
3996
  onclose: function() {
3976
3997
  setFinished(true); //发送结束
3998
+ // isPosition.current = true;
3999
+ setTimeout(function() {
4000
+ isPosition.current = true;
4001
+ }, 100);
3977
4002
  setHistoryMessageList(function(historyMessageList) {
3978
4003
  return historyMessageList.filter(function(item) {
3979
4004
  return item.id != "123456";
@@ -4039,7 +4064,9 @@ var CustomerService = function(props) {
4039
4064
  }
4040
4065
  });
4041
4066
  setTimeout(function() {
4042
- scrollToBottom();
4067
+ if (isPosition.current) {
4068
+ scrollToBottom();
4069
+ }
4043
4070
  }, 10);
4044
4071
  };
4045
4072
  //问题记录到实验报告中
@@ -4088,13 +4115,14 @@ var CustomerService = function(props) {
4088
4115
  var getHistoryMessage = function(pageNum, flag) {
4089
4116
  var id = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "1", raw_data = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : [];
4090
4117
  clearTimeout(roomMessage.current);
4091
- // console.log(pageNum,flag,'dkfjvndfjvndfkvdf')
4118
+ console.log(pageNum, flag, "dkfjvndfjvndfkvdf");
4092
4119
  // flag == 1 时已经设置好了位置标记
4093
4120
  var last_id = "";
4094
4121
  if (flag == 2 && historyMessageList.length > 0) {
4095
4122
  last_id = historyMessageList[0].id;
4096
4123
  }
4097
4124
  if (flag != 1 && last_id != "") {
4125
+ console.log(last_id, "dkfjvndfjvndfkvdflast_idlast_idlast_id");
4098
4126
  setLastId(last_id);
4099
4127
  }
4100
4128
  //取消搜索页码标记
@@ -5173,7 +5201,7 @@ var CustomerService = function(props) {
5173
5201
  return /*#__PURE__*/ jsxs("div", {
5174
5202
  className: "".concat(styles.operate_modal_bottom),
5175
5203
  style: {
5176
- position: showStopBtn ? "sticky" : "relative"
5204
+ position: showStopBtn && isPosition.current ? "sticky" : "relative"
5177
5205
  },
5178
5206
  children: [
5179
5207
  /*#__PURE__*/ jsxs("p", {
@@ -5456,6 +5484,11 @@ var CustomerService = function(props) {
5456
5484
  setQuestionsList([]);
5457
5485
  setAnswerMode(-1);
5458
5486
  setTeacherList([]);
5487
+ setTimeout(function() {
5488
+ setQuestionsList([]);
5489
+ setTeacherList([]);
5490
+ clearTimeout(timer.current);
5491
+ }, 200);
5459
5492
  setHistoryMessageList(function(historyMessageList) {
5460
5493
  return historyMessageList.filter(function(item) {
5461
5494
  return item.id != "-1";
@@ -5565,6 +5598,11 @@ var CustomerService = function(props) {
5565
5598
  setQuestionsList([]);
5566
5599
  setAnswerMode(-1);
5567
5600
  setTeacherList([]);
5601
+ setTimeout(function() {
5602
+ setQuestionsList([]);
5603
+ setTeacherList([]);
5604
+ clearTimeout(timer.current);
5605
+ }, 200);
5568
5606
  setHistoryMessageList(function(historyMessageList) {
5569
5607
  return historyMessageList.filter(function(item) {
5570
5608
  return item.id != "-1";