bhd-components 0.7.10 → 0.7.12

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, X, y as I, H, A as Remarkable, D as Drawer, B as HighlightJS, Z as ZoomInOutlined, F as _to_consumable_array } from './e7af2e4a.esm.es5.development.js';
2
- export { G as Affix, J as Alert, K as Anchor, aF as App, N as AutoComplete, O as Avatar, U as BackTop, V as Badge, W as Breadcrumb, Y as Button, $ as Calendar, a0 as Card, a1 as Carousel, a2 as Cascader, a3 as Checkbox, a4 as Col, a5 as Collapse, a6 as DatePicker, a7 as Descriptions, a8 as Divider, D as Drawer, a9 as Dropdown, aa as Empty, Q as FloatButton, ab as Form, ac as Grid, ad as Image, v as Input, ae as InputNumber, af as Layout, ag as List, ah as Mentions, ai as Menu, M as Modal, ak as Popconfirm, al as Popover, am as Progress, aM as QRCode, an as Radio, ao as Rate, ap as Result, aq as Row, ar as Segmented, g as Select, as as Skeleton, at as Slider, au as Space, av as Spin, aw as Statistic, ax as Steps, ay as Switch, az as Tabs, aA as Tag, aC as TimePicker, aD as Timeline, T as Tooltip, aE as Tour, aG as Transfer, aH as Tree, aI as TreeSelect, aJ as Typography, aK as Upload, aL as Watermark, aO as en_US, aj as notification, aB as theme, aN as version, z as zh_CN } from './e7af2e4a.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, X, y as I, H, A as Remarkable, D as Drawer, B as HighlightJS, Z as ZoomInOutlined, F as _to_consumable_array } from './4507d48e.esm.es5.development.js';
2
+ export { G as Affix, J as Alert, K as Anchor, aF as App, N as AutoComplete, O as Avatar, U as BackTop, V as Badge, W as Breadcrumb, Y as Button, $ as Calendar, a0 as Card, a1 as Carousel, a2 as Cascader, a3 as Checkbox, a4 as Col, a5 as Collapse, a6 as DatePicker, a7 as Descriptions, a8 as Divider, D as Drawer, a9 as Dropdown, aa as Empty, Q as FloatButton, ab as Form, ac as Grid, ad as Image, v as Input, ae as InputNumber, af as Layout, ag as List, ah as Mentions, ai as Menu, M as Modal, ak as Popconfirm, al as Popover, am as Progress, aM as QRCode, an as Radio, ao as Rate, ap as Result, aq as Row, ar as Segmented, g as Select, as as Skeleton, at as Slider, au as Space, av as Spin, aw as Statistic, ax as Steps, ay as Switch, az as Tabs, aA as Tag, aC as TimePicker, aD as Timeline, T as Tooltip, aE as Tour, aG as Transfer, aH as Tree, aI as TreeSelect, aJ as Typography, aK as Upload, aL as Watermark, aO as en_US, aj as notification, aB as theme, aN as version, z as zh_CN } from './4507d48e.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';
@@ -3166,7 +3166,7 @@ var AppViewImage = /*#__PURE__*/ forwardRef(function(props, ref) {
3166
3166
  });
3167
3167
  var ViewImage$1 = AppViewImage;
3168
3168
 
3169
- var modules_63b47c51 = {"service_ChatWindow_Drawer":"index_module_service_ChatWindow_Drawer__cb4626a6","ChatWindow_Modal":"index_module_ChatWindow_Modal__cb4626a6","ChatWindow_Drawer":"index_module_ChatWindow_Drawer__cb4626a6","header_wrap":"index_module_header_wrap__cb4626a6","top":"index_module_top__cb4626a6","user":"index_module_user__cb4626a6","count":"index_module_count__cb4626a6","operate":"index_module_operate__cb4626a6","line":"index_module_line__cb4626a6","popover_main":"index_module_popover_main__cb4626a6","popover":"index_module_popover__cb4626a6","header_wrap_newlabo":"index_module_header_wrap_newlabo__cb4626a6","Drawer_main":"index_module_Drawer_main__cb4626a6","loading":"index_module_loading__cb4626a6","message_con":"index_module_message_con__cb4626a6","left":"index_module_left__cb4626a6","head_sculpture":"index_module_head_sculpture__cb4626a6","main_content":"index_module_main_content__cb4626a6","right":"index_module_right__cb4626a6","main":"index_module_main__cb4626a6","main_content_flag":"index_module_main_content_flag__cb4626a6","operate_modal":"index_module_operate_modal__cb4626a6","operate_modal_bottom":"index_module_operate_modal_bottom__cb4626a6","active":"index_module_active__cb4626a6","stop_generate":"index_module_stop_generate__cb4626a6","icon":"index_module_icon__cb4626a6","find_teacher":"index_module_find_teacher__cb4626a6","stop_findTeacher":"index_module_stop_findTeacher__cb4626a6","content":"index_module_content__cb4626a6","content_child":"index_module_content_child__cb4626a6","sign":"index_module_sign__cb4626a6","ask_question":"index_module_ask_question__cb4626a6","association_problem":"index_module_association_problem__cb4626a6","img_con":"index_module_img_con__cb4626a6","mask_zoom":"index_module_mask_zoom__cb4626a6","copyCode":"index_module_copyCode__cb4626a6","association_problem_flag":"index_module_association_problem_flag__cb4626a6","related_issues_flag":"index_module_related_issues_flag__cb4626a6","time":"index_module_time__cb4626a6","citation_content":"index_module_citation_content__cb4626a6","text_exceed":"index_module_text_exceed__cb4626a6","popover_content":"index_module_popover_content__cb4626a6","Drawer_main_newlabo":"index_module_Drawer_main_newlabo__cb4626a6","Drawer_main_newlabo_no_pic":"index_module_Drawer_main_newlabo_no_pic__cb4626a6","Drawer_buttom_Issues_List":"index_module_Drawer_buttom_Issues_List__cb4626a6","issues_list_teacherList":"index_module_issues_list_teacherList__cb4626a6","item":"index_module_item__cb4626a6","issues_list":"index_module_issues_list__cb4626a6","issues_list_flag":"index_module_issues_list_flag__cb4626a6","Drawer_buttom":"index_module_Drawer_buttom__cb4626a6","input_wrap":"index_module_input_wrap__cb4626a6","input":"index_module_input__cb4626a6","picture_layout":"index_module_picture_layout__cb4626a6","icon_close":"index_module_icon_close__cb4626a6","icon_zoom":"index_module_icon_zoom__cb4626a6","anticon":"index_module_anticon__cb4626a6","no_AI":"index_module_no_AI__cb4626a6","screenshot":"index_module_screenshot__cb4626a6","disabled":"index_module_disabled__cb4626a6","content_main":"index_module_content_main__cb4626a6","content_con":"index_module_content_con__cb4626a6","delete_quote":"index_module_delete_quote__cb4626a6","sending":"index_module_sending__cb4626a6","Drawer_buttom_Issues_List_newlabo":"index_module_Drawer_buttom_Issues_List_newlabo__cb4626a6","main_list":"index_module_main_list__cb4626a6","chat_content":"index_module_chat_content__cb4626a6","popover_main_content":"index_module_popover_main_content__cb4626a6","popover_main_content_name":"index_module_popover_main_content_name__cb4626a6","teacher_layout":"index_module_teacher_layout__cb4626a6","bottom":"index_module_bottom__cb4626a6","delete":"index_module_delete__cb4626a6","num":"index_module_num__cb4626a6","shrink":"index_module_shrink__cb4626a6","teacher_layout_newlabo":"index_module_teacher_layout_newlabo__cb4626a6","teacher_layout_modal":"index_module_teacher_layout_modal__cb4626a6","ai":"index_module_ai__cb4626a6","user_info":"index_module_user_info__cb4626a6","message":"index_module_message__cb4626a6","con":"index_module_con__cb4626a6","teacher_layout_modal_newlabo":"index_module_teacher_layout_modal_newlabo__cb4626a6","history_list":"index_module_history_list__cb4626a6","search_layout":"index_module_search_layout__cb4626a6","mymove":"index_module_mymove__cb4626a6","title":"index_module_title__cb4626a6","search_top":"index_module_search_top__cb4626a6","list_item":"index_module_list_item__cb4626a6","list_summary":"index_module_list_summary__cb4626a6","head_img":"index_module_head_img__cb4626a6","list_desc":"index_module_list_desc__cb4626a6","name":"index_module_name__cb4626a6","decs":"index_module_decs__cb4626a6","open":"index_module_open__cb4626a6","list_summary_active":"index_module_list_summary_active__cb4626a6","list_detail":"index_module_list_detail__cb4626a6","list":"index_module_list__cb4626a6","list_more":"index_module_list_more__cb4626a6","no_data":"index_module_no_data__cb4626a6","history_list_broadside":"index_module_history_list_broadside__cb4626a6","screenshot_Modal":"index_module_screenshot_Modal__cb4626a6","screenshot_Modal_btn":"index_module_screenshot_Modal_btn__cb4626a6"};
3169
+ var modules_63b47c51 = {"service_ChatWindow_Drawer":"index_module_service_ChatWindow_Drawer__474cc44d","ChatWindow_Modal":"index_module_ChatWindow_Modal__474cc44d","ChatWindow_Drawer":"index_module_ChatWindow_Drawer__474cc44d","header_wrap":"index_module_header_wrap__474cc44d","top":"index_module_top__474cc44d","user":"index_module_user__474cc44d","count":"index_module_count__474cc44d","operate":"index_module_operate__474cc44d","line":"index_module_line__474cc44d","popover_main":"index_module_popover_main__474cc44d","popover":"index_module_popover__474cc44d","header_wrap_newlabo":"index_module_header_wrap_newlabo__474cc44d","Drawer_main":"index_module_Drawer_main__474cc44d","loading":"index_module_loading__474cc44d","message_con":"index_module_message_con__474cc44d","left":"index_module_left__474cc44d","head_sculpture":"index_module_head_sculpture__474cc44d","main_content":"index_module_main_content__474cc44d","right":"index_module_right__474cc44d","main":"index_module_main__474cc44d","main_content_flag":"index_module_main_content_flag__474cc44d","operate_modal":"index_module_operate_modal__474cc44d","operate_modal_bottom":"index_module_operate_modal_bottom__474cc44d","active":"index_module_active__474cc44d","stop_generate":"index_module_stop_generate__474cc44d","icon":"index_module_icon__474cc44d","find_teacher":"index_module_find_teacher__474cc44d","stop_findTeacher":"index_module_stop_findTeacher__474cc44d","content":"index_module_content__474cc44d","content_child":"index_module_content_child__474cc44d","sign":"index_module_sign__474cc44d","ask_question":"index_module_ask_question__474cc44d","association_problem":"index_module_association_problem__474cc44d","img_con":"index_module_img_con__474cc44d","mask_zoom":"index_module_mask_zoom__474cc44d","img_con2":"index_module_img_con2__474cc44d","copyCode":"index_module_copyCode__474cc44d","association_problem_flag":"index_module_association_problem_flag__474cc44d","related_issues_flag":"index_module_related_issues_flag__474cc44d","time":"index_module_time__474cc44d","citation_content":"index_module_citation_content__474cc44d","text_exceed":"index_module_text_exceed__474cc44d","popover_content":"index_module_popover_content__474cc44d","Drawer_main_newlabo":"index_module_Drawer_main_newlabo__474cc44d","Drawer_main_newlabo_no_pic":"index_module_Drawer_main_newlabo_no_pic__474cc44d","Drawer_buttom_Issues_List":"index_module_Drawer_buttom_Issues_List__474cc44d","issues_list_teacherList":"index_module_issues_list_teacherList__474cc44d","item":"index_module_item__474cc44d","issues_list":"index_module_issues_list__474cc44d","issues_list_flag":"index_module_issues_list_flag__474cc44d","Drawer_buttom":"index_module_Drawer_buttom__474cc44d","input_wrap":"index_module_input_wrap__474cc44d","input":"index_module_input__474cc44d","picture_layout":"index_module_picture_layout__474cc44d","icon_close":"index_module_icon_close__474cc44d","icon_zoom":"index_module_icon_zoom__474cc44d","anticon":"index_module_anticon__474cc44d","no_AI":"index_module_no_AI__474cc44d","screenshot":"index_module_screenshot__474cc44d","disabled":"index_module_disabled__474cc44d","content_main":"index_module_content_main__474cc44d","content_con":"index_module_content_con__474cc44d","delete_quote":"index_module_delete_quote__474cc44d","sending":"index_module_sending__474cc44d","Drawer_buttom_Issues_List_newlabo":"index_module_Drawer_buttom_Issues_List_newlabo__474cc44d","main_list":"index_module_main_list__474cc44d","chat_content":"index_module_chat_content__474cc44d","popover_main_content":"index_module_popover_main_content__474cc44d","popover_main_content_name":"index_module_popover_main_content_name__474cc44d","teacher_layout":"index_module_teacher_layout__474cc44d","bottom":"index_module_bottom__474cc44d","delete":"index_module_delete__474cc44d","num":"index_module_num__474cc44d","shrink":"index_module_shrink__474cc44d","teacher_layout_newlabo":"index_module_teacher_layout_newlabo__474cc44d","teacher_layout_modal":"index_module_teacher_layout_modal__474cc44d","ai":"index_module_ai__474cc44d","user_info":"index_module_user_info__474cc44d","message":"index_module_message__474cc44d","con":"index_module_con__474cc44d","teacher_layout_modal_newlabo":"index_module_teacher_layout_modal_newlabo__474cc44d","history_list":"index_module_history_list__474cc44d","search_layout":"index_module_search_layout__474cc44d","mymove":"index_module_mymove__474cc44d","title":"index_module_title__474cc44d","search_top":"index_module_search_top__474cc44d","list_item":"index_module_list_item__474cc44d","list_summary":"index_module_list_summary__474cc44d","head_img":"index_module_head_img__474cc44d","list_desc":"index_module_list_desc__474cc44d","name":"index_module_name__474cc44d","decs":"index_module_decs__474cc44d","open":"index_module_open__474cc44d","list_summary_active":"index_module_list_summary_active__474cc44d","list_detail":"index_module_list_detail__474cc44d","list":"index_module_list__474cc44d","list_more":"index_module_list_more__474cc44d","no_data":"index_module_no_data__474cc44d","history_list_broadside":"index_module_history_list_broadside__474cc44d","screenshot_Modal":"index_module_screenshot_Modal__474cc44d","screenshot_Modal_btn":"index_module_screenshot_Modal_btn__474cc44d"};
3170
3170
 
3171
3171
  //消息已读
3172
3172
  var readMessage = function(roomId, urllocation, userData, http) {
@@ -3904,7 +3904,7 @@ var ContactsList = /*#__PURE__*/ forwardRef(function(props, ref) {
3904
3904
  }) : /*#__PURE__*/ jsxs("div", {
3905
3905
  className: "".concat(modules_63b47c51.teacher_layout, " ").concat(type == 3 ? modules_63b47c51.teacher_layout_newlabo : ""),
3906
3906
  style: {
3907
- left: type == 3 ? document.getElementById("box").offsetWidth + 10 + "px" : "auto"
3907
+ left: type == 3 ? document.getElementById("box") && document.getElementById("box").offsetWidth + 10 + "px" : "auto"
3908
3908
  },
3909
3909
  children: [
3910
3910
  /*#__PURE__*/ jsxs("div", {
@@ -3994,7 +3994,6 @@ var ScreenshotTool = /*#__PURE__*/ forwardRef(function(props) {
3994
3994
  var imgBese64 = props.imgBese64, saveScreenshotBese64 = props.saveScreenshotBese64, cancelScreenshot = props.cancelScreenshot;
3995
3995
  var _useState = _sliced_to_array(useState(), 2), crop = _useState[0], setCrop = _useState[1];
3996
3996
  var _useState1 = _sliced_to_array(useState(), 2), completedCrop = _useState1[0], setCompletedCrop = _useState1[1];
3997
- useRef(null);
3998
3997
  var _useState2 = _sliced_to_array(useState(16 / 9), 2), aspect = _useState2[0]; _useState2[1];
3999
3998
  var _useState3 = _sliced_to_array(useState({
4000
3999
  top: 0,
@@ -4070,20 +4069,22 @@ var ScreenshotTool = /*#__PURE__*/ forwardRef(function(props) {
4070
4069
  className: modules_63b47c51.ReactCrop,
4071
4070
  crop: crop,
4072
4071
  onChange: function(_, percentCrop) {
4072
+ if (percentCrop.height === 0 && percentCrop.width === 0) {
4073
+ return;
4074
+ }
4073
4075
  setShowBtn(false);
4074
4076
  setCrop(percentCrop);
4075
4077
  },
4076
4078
  onComplete: function(c) {
4079
+ if (c.height === 0 && c.width === 0) {
4080
+ return;
4081
+ }
4077
4082
  setCompletedCrop(c);
4078
4083
  savePosition(c);
4079
- // console.log(c,'剪裁222');
4080
4084
  },
4081
- // aspect={aspect}
4082
- // minWidth={400}
4083
4085
  minHeight: 100,
4084
4086
  minWidth: 100,
4085
4087
  children: /*#__PURE__*/ jsx("img", {
4086
- // ref={imgRef}
4087
4088
  alt: "Crop me",
4088
4089
  src: imgBese64,
4089
4090
  onLoad: onImageLoad
@@ -4098,7 +4099,12 @@ var ScreenshotTool = /*#__PURE__*/ forwardRef(function(props) {
4098
4099
  children: [
4099
4100
  /*#__PURE__*/ jsx("span", {
4100
4101
  onClick: cancelScreenshot,
4101
- children: /*#__PURE__*/ jsx(CloseOutlined, {})
4102
+ children: /*#__PURE__*/ jsx(CloseOutlined, {
4103
+ style: {
4104
+ position: "relative",
4105
+ top: "1px"
4106
+ }
4107
+ })
4102
4108
  }),
4103
4109
  /*#__PURE__*/ jsx("span", {
4104
4110
  onClick: saveImage,
@@ -4135,7 +4141,7 @@ var img = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAA
4135
4141
  var styles = modules_63b47c51;
4136
4142
  var TextArea = Input.TextArea;
4137
4143
  var CustomerService = function(props) {
4138
- var userData = props.userData, http = props.http, urllocation = props.urllocation, onCancel = props.onCancel, serverName = props.serverName, fetchEventSource = props.fetchEventSource, initShowType = props.initShowType, onEvent = props.onEvent, stepIds = props.stepIds, stepId = props.stepId, screenshotAreaId = props.screenshotAreaId; props.config;
4144
+ var userData = props.userData, http = props.http, urllocation = props.urllocation, onCancel = props.onCancel, serverName = props.serverName, fetchEventSource = props.fetchEventSource, initShowType = props.initShowType, onEvent = props.onEvent, stepIds = props.stepIds, stepId = props.stepId, screenshotAreaId = props.screenshotAreaId, config = props.config;
4139
4145
  // const { bese64String, startRecord, stopRecord } = useMediaRecorder(); //语音转文字
4140
4146
  // const [voiceRecordingStatus, setVoiceRecordingStatus] = useState(3); //语音录制状态 3,语音识别完成 2,录制中, 1,录制结束
4141
4147
  var _useState = _sliced_to_array(useState([]), 2), copyTextOBJ = _useState[0], setCopyTextObj = _useState[1]; //复制的消息id
@@ -4171,7 +4177,8 @@ var CustomerService = function(props) {
4171
4177
  var _useState29 = _sliced_to_array(useState(""), 2), viewBase64 = _useState29[0], setViewBase64 = _useState29[1]; //图片预览
4172
4178
  var _useState30 = _sliced_to_array(useState(false), 2), visible = _useState30[0], setVisible = _useState30[1]; //是否显示图片预览
4173
4179
  var _useState31 = _sliced_to_array(useState([]), 2), bottomRecommendationQuestions = _useState31[0], setBottomRecommendationQuestions = _useState31[1]; //底部推荐问题
4174
- var _useState32 = _sliced_to_array(useState(-1), 2), saveShowType = _useState32[0], setSaveShowType = _useState32[1]; //保存截图时的状态
4180
+ var _useState32 = _sliced_to_array(useState(false), 2), showScreenshot = _useState32[0], setShowScreenshot = _useState32[1]; //是否显示截图 主要用于newlabo页面
4181
+ var _useState33 = _sliced_to_array(useState(-1), 2), saveShowType = _useState33[0], setSaveShowType = _useState33[1]; //保存截图时的状态
4175
4182
  var timer = useRef(null); //文本框输入时
4176
4183
  var receiveMessageTimer = useRef(null); //接收ai发回的消息
4177
4184
  // let voiceCountdownTimer = useRef(null); //语音录制倒计时
@@ -4199,22 +4206,17 @@ var CustomerService = function(props) {
4199
4206
  }
4200
4207
  });
4201
4208
  useEffect(function() {
4202
- // console.log(props,'lsdkcmsdlcksd')
4203
- // getQuestiionsList("", 1);
4204
- if (props.config && props.config.type == "video") {
4209
+ if (config && config.type == "video") {
4205
4210
  //获取热门推荐
4206
4211
  videoPageQuestiionsList(1);
4207
- // getQuestiionsList("", 3)
4208
4212
  }
4209
4213
  setShowType(initShowType);
4210
- //获取视频页面推荐问题
4211
- // videoPageQuestiionsList();
4212
- // scrollToBottom();
4213
4214
  }, [
4214
4215
  initShowType
4215
4216
  ]);
4216
4217
  useEffect(function() {
4217
- if (showType == 5) {
4218
+ //|| showScreenshot
4219
+ if (showType == 5 || showScreenshot) {
4218
4220
  try {
4219
4221
  setImgBese64("");
4220
4222
  // html2canvas(document.getElementsByTagName('html')[0],{
@@ -4307,7 +4309,8 @@ var CustomerService = function(props) {
4307
4309
  }, [
4308
4310
  historyMessageList,
4309
4311
  showType,
4310
- pageCount
4312
+ pageCount,
4313
+ showScreenshot
4311
4314
  ]);
4312
4315
  useEffect(function() {
4313
4316
  resettingBottomHei();
@@ -4815,6 +4818,10 @@ var CustomerService = function(props) {
4815
4818
  sendingExistingIssues(2, dataObj, "");
4816
4819
  testLabQuestion(obj.message, questions.answer, "");
4817
4820
  }
4821
+ if (type == 2 && config && config.type == "video") {
4822
+ //先请求问题列表
4823
+ videoPageQuestiionsList(2);
4824
+ }
4818
4825
  });
4819
4826
  };
4820
4827
  //向AI发送问题 type == 1 发送点赞或踩消息,type == 2 发送重新生成消息,type == 3 正常发送消息
@@ -4843,8 +4850,8 @@ var CustomerService = function(props) {
4843
4850
  });
4844
4851
  });
4845
4852
  }, 60 * 1000);
4846
- if (props.config && props.config.type == "video" && props.config.params) {
4847
- var params = props.config.params;
4853
+ if (config && config.type == "video" && config.params) {
4854
+ var params = config.params;
4848
4855
  var videoId = params.videoId;
4849
4856
  var watchTime = params.videoProgress;
4850
4857
  var courseId = getQuery("yc_id");
@@ -4899,7 +4906,7 @@ var CustomerService = function(props) {
4899
4906
  });
4900
4907
  scrollToBottom();
4901
4908
  }
4902
- if (props.config && props.config.type == "video") {
4909
+ if (config && config.type == "video") {
4903
4910
  //先请求问题列表
4904
4911
  videoPageQuestiionsList(3);
4905
4912
  }
@@ -5007,6 +5014,7 @@ var CustomerService = function(props) {
5007
5014
  }
5008
5015
  if (msg.finished) {
5009
5016
  setFinished(true); //发送结束
5017
+ videoPageQuestiionsList(2);
5010
5018
  // isPosition.current = true;
5011
5019
  setTimeout(function() {
5012
5020
  isPosition.current = true;
@@ -5407,6 +5415,7 @@ var CustomerService = function(props) {
5407
5415
  };
5408
5416
  //获取问题列表flag ==1 是问候消息 2,搜索列表 展示相关问题 ,3.视频页面,4.视频联想问题不够时,增加知识库联想问题
5409
5417
  var getQuestiionsList = function(value, flag) {
5418
+ // console.log(flag,'dlfkvdmflkvmdfklv');
5410
5419
  var data = {};
5411
5420
  if (flag == 1) {
5412
5421
  data = {
@@ -5456,7 +5465,7 @@ var CustomerService = function(props) {
5456
5465
  }
5457
5466
  }).then(function(res) {
5458
5467
  if (res.data.questions) {
5459
- setHotQuestionsList(function(questionList) {
5468
+ setQuestionsList(function(questionList) {
5460
5469
  return _to_consumable_array(questionList).concat(_to_consumable_array(res.data.questions));
5461
5470
  });
5462
5471
  }
@@ -5469,16 +5478,20 @@ var CustomerService = function(props) {
5469
5478
  var videoPageQuestiionsList = function() {
5470
5479
  var flag = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 1;
5471
5480
  console.log(flag, props, 3333333);
5472
- var config = props.config;
5473
5481
  if (config && config.type == "video" && config.params) {
5474
5482
  var params = config.params;
5475
5483
  var videoId = params.videoId;
5476
5484
  var watchTime = params.videoProgress;
5477
5485
  var courseId = getQuery("yc_id");
5478
5486
  var sectionId = params.VideoBriefSummaryId;
5487
+ // let courseId="20899",
5488
+ // sectionId= "462347",
5489
+ // videoId= "29707",
5490
+ // watchTime= 262
5479
5491
  if (videoId && courseId && sectionId) {
5492
+ console.log(recommendeQuestionID.current, "recommendeQuestionID.current");
5480
5493
  http.post("".concat(urllocation, "/chat-service/public/v1.0/knowledge-base/questions:recommend"), {
5481
- "recommendedQuestions": [],
5494
+ "recommendedQuestions": recommendeQuestionID.current,
5482
5495
  "contexts": [
5483
5496
  {
5484
5497
  "type": "VIDEO",
@@ -5503,11 +5516,11 @@ var CustomerService = function(props) {
5503
5516
  } else {
5504
5517
  setHotQuestionsList(data);
5505
5518
  }
5506
- var ids = [];
5507
- data.map(function(str) {
5508
- ids.push(str.id);
5509
- });
5510
- recommendeQuestionID.current = Array.from(new Set(recommendeQuestionID.current.concat(ids)));
5519
+ // let ids:any[] = [];
5520
+ // data.map((str: { id: string; })=>{
5521
+ // ids.push(str.id);
5522
+ // })
5523
+ // recommendeQuestionID.current = Array.from(new Set(recommendeQuestionID.current.concat(ids)));
5511
5524
  resettingBottomHei();
5512
5525
  scrollToBottom();
5513
5526
  // console.log(data,99999);
@@ -6024,7 +6037,7 @@ var CustomerService = function(props) {
6024
6037
  className: styles.content_child
6025
6038
  }),
6026
6039
  item.extraInfo && JSON.parse(item.extraInfo).length > 0 && JSON.parse(item.extraInfo)[0].key == "imageUrl" && /*#__PURE__*/ jsxs("p", {
6027
- className: styles.img_con,
6040
+ className: "".concat(styles.img_con, " ").concat(showType == 2 || showType == 4 ? styles.img_con2 : ""),
6028
6041
  children: [
6029
6042
  /*#__PURE__*/ jsx("img", {
6030
6043
  src: JSON.parse(item.extraInfo)[0].value
@@ -6141,7 +6154,7 @@ var CustomerService = function(props) {
6141
6154
  className: styles.content_child
6142
6155
  }),
6143
6156
  item.extraInfo && JSON.parse(item.extraInfo).length > 0 && JSON.parse(item.extraInfo)[0].key == "imageUrl" && /*#__PURE__*/ jsxs("p", {
6144
- className: styles.img_con,
6157
+ className: "".concat(styles.img_con, " ").concat(showType == 2 || showType == 4 ? styles.img_con2 : ""),
6145
6158
  children: [
6146
6159
  /*#__PURE__*/ jsx("img", {
6147
6160
  src: JSON.parse(item.extraInfo)[0].value
@@ -6170,10 +6183,9 @@ var CustomerService = function(props) {
6170
6183
  return /*#__PURE__*/ jsx("li", {
6171
6184
  onClick: function() {
6172
6185
  sendMessage(list, 1);
6173
- if (props.config && props.config.type == "video") {
6174
- //先请求问题列表
6175
- videoPageQuestiionsList(2);
6176
- }
6186
+ recommendeQuestionID.current = recommendeQuestionID.current.concat(list.value);
6187
+ setBottomRecommendationQuestions([]);
6188
+ resettingBottomHei();
6177
6189
  },
6178
6190
  children: item.message == "抱歉,我暂时无法回答这样的问题。" ? list.question : /*#__PURE__*/ jsxs(Fragment, {
6179
6191
  children: [
@@ -6255,13 +6267,23 @@ var CustomerService = function(props) {
6255
6267
  return "";
6256
6268
  }
6257
6269
  // console.log(historyMessageList,i,'sdcsd;sldcscsdsd')
6270
+ //根据上一行数据,判断是否显示招唤老师按钮
6271
+ var showTeacherBtn = true;
6272
+ var previousLineData = historyMessageList[i - 1];
6273
+ if (!previousLineData) {
6274
+ showTeacherBtn = true;
6275
+ } else if (!previousLineData.extraInfo) {
6276
+ showTeacherBtn = true;
6277
+ } else if (JSON.parse(previousLineData.extraInfo).length > 0 && JSON.parse(previousLineData.extraInfo)[0].key == "imageUrl") {
6278
+ showTeacherBtn = false;
6279
+ }
6258
6280
  return /*#__PURE__*/ jsxs("p", {
6259
6281
  className: styles.operate,
6260
6282
  children: [
6261
6283
  // 不在智能客服窗口,并已经点击了召唤老师,并有召唤老师权限
6262
6284
  isAiChatWindow && answerMode != 1 && userData.modules.some(function(item) {
6263
6285
  return item.short == "TeacherAnswer";
6264
- }) && historyMessageList[i - 1] && historyMessageList[i - 1].extraInfo && JSON.parse(historyMessageList[i - 1].extraInfo).length > 0 && JSON.parse(historyMessageList[i - 1].extraInfo)[0].key != "imageUrl" && /*#__PURE__*/ jsx("span", {
6286
+ }) && showTeacherBtn && /*#__PURE__*/ jsx("span", {
6265
6287
  className: styles.ask_question,
6266
6288
  onClick: function() {
6267
6289
  setAnswerMode(1);
@@ -6408,9 +6430,19 @@ var CustomerService = function(props) {
6408
6430
  }
6409
6431
  //3、是否显示召唤老师回答按钮
6410
6432
  var findTeacherBtn = false;
6411
- if (!showStopBtn && isAiChatWindow && (extraInfo != undefined && JSON.parse(extraInfo).length > 0 && JSON.parse(extraInfo)[0].key == "questionId" || extraInfo == null) && historyMessageList[i - 1] && historyMessageList[i - 1].extraInfo && JSON.parse(historyMessageList[i - 1].extraInfo).length > 0 && JSON.parse(historyMessageList[i - 1].extraInfo)[0].key != "imageUrl") {
6433
+ if (!showStopBtn && isAiChatWindow && (extraInfo != undefined && JSON.parse(extraInfo).length > 0 && JSON.parse(extraInfo)[0].key == "questionId" || extraInfo == null)) {
6412
6434
  findTeacherBtn = true;
6413
6435
  }
6436
+ //根据上一行数据,判断是否显示招唤老师按钮
6437
+ var showTeacherBtn = true;
6438
+ var previousLineData = historyMessageList[i - 1];
6439
+ if (!previousLineData) {
6440
+ showTeacherBtn = true;
6441
+ } else if (!previousLineData.extraInfo) {
6442
+ showTeacherBtn = true;
6443
+ } else if (JSON.parse(previousLineData.extraInfo).length > 0 && JSON.parse(previousLineData.extraInfo)[0].key == "imageUrl") {
6444
+ showTeacherBtn = false;
6445
+ }
6414
6446
  /// style={{position:showStopBtn && isPosition.current ? 'sticky' : 'relative'}}
6415
6447
  return /*#__PURE__*/ jsxs("div", {
6416
6448
  className: "".concat(styles.operate_modal_bottom),
@@ -6462,7 +6494,7 @@ var CustomerService = function(props) {
6462
6494
  //在ai窗口并ai已经生成完答案
6463
6495
  findTeacherBtn && userData.modules.some(function(item) {
6464
6496
  return item.short == "TeacherAnswer";
6465
- }) && /*#__PURE__*/ jsx("span", {
6497
+ }) && showTeacherBtn && /*#__PURE__*/ jsx("span", {
6466
6498
  className: styles.find_teacher,
6467
6499
  onClick: function() {
6468
6500
  setAnswerMode(1);
@@ -6736,6 +6768,7 @@ var CustomerService = function(props) {
6736
6768
  "讲解这张图片涉及到的知识内容"
6737
6769
  ]
6738
6770
  }),
6771
+ /*#__PURE__*/ jsx("br", {}),
6739
6772
  /*#__PURE__*/ jsxs("p", {
6740
6773
  onClick: function() {
6741
6774
  setHistoryMessageList(function(historyMessageList) {
@@ -6799,7 +6832,7 @@ var CustomerService = function(props) {
6799
6832
  var roomList = contactsList;
6800
6833
  if (roomList.length > 0 && roomList[0].roomId != roomId) return;
6801
6834
  console.log(props, 333333);
6802
- if (props.config && props.config.type == "video") {
6835
+ if (config && config.type == "video") {
6803
6836
  getQuestiionsList(String(e.target.value), 3);
6804
6837
  } else {
6805
6838
  getQuestiionsList(String(e.target.value), 2);
@@ -6896,7 +6929,11 @@ var CustomerService = function(props) {
6896
6929
  onClick: function() {
6897
6930
  if (!finished) return;
6898
6931
  setSaveShowType(showType);
6899
- setShowType(5);
6932
+ if (showType == 3) {
6933
+ setShowScreenshot(true);
6934
+ } else {
6935
+ setShowType(5);
6936
+ }
6900
6937
  },
6901
6938
  children: /*#__PURE__*/ jsx(CustomScreenshot$1, {})
6902
6939
  })
@@ -7056,17 +7093,20 @@ var CustomerService = function(props) {
7056
7093
  });
7057
7094
  }
7058
7095
  };
7096
+ //视频页面底部推荐问题
7059
7097
  var renderBottomAssociationProblem = function() {
7060
7098
  return /*#__PURE__*/ jsx("div", {
7061
7099
  className: styles.issues_list_flag,
7062
- style: {
7063
- bottom: "".concat(buttomHei - 60, "px")
7064
- },
7065
7100
  id: "BottomAssociationProblem",
7066
7101
  children: bottomRecommendationQuestions.map(function(item) {
7067
7102
  return /*#__PURE__*/ jsx("p", {
7068
7103
  onClick: function() {
7069
7104
  sendMessage(item, 1);
7105
+ if (config && config.type == "video") {
7106
+ recommendeQuestionID.current = recommendeQuestionID.current.concat(item.id);
7107
+ setBottomRecommendationQuestions([]);
7108
+ resettingBottomHei();
7109
+ }
7070
7110
  },
7071
7111
  children: item.question
7072
7112
  }, item.id);
@@ -7278,7 +7318,7 @@ var CustomerService = function(props) {
7278
7318
  })
7279
7319
  ]
7280
7320
  }),
7281
- showType == 3 ? /*#__PURE__*/ jsxs("div", {
7321
+ showType == 3 && /*#__PURE__*/ jsxs("div", {
7282
7322
  className: "".concat(styles.ChatWindow_Drawer),
7283
7323
  id: "",
7284
7324
  onClick: function() {
@@ -7389,12 +7429,12 @@ var CustomerService = function(props) {
7389
7429
  })
7390
7430
  })
7391
7431
  ]
7392
- }) : "",
7393
- showType == 4 && /*#__PURE__*/ jsxs(Fragment, {
7432
+ }),
7433
+ (showType == 4 || showType == 5) && /*#__PURE__*/ jsxs(Fragment, {
7394
7434
  children: [
7395
7435
  /*#__PURE__*/ jsxs(Modal, {
7396
7436
  title: "AI助手",
7397
- open: true,
7437
+ open: showType == 4 ? true : false,
7398
7438
  onCancel: function() {
7399
7439
  onCancel();
7400
7440
  onEvent(serverName + serverUrl(), "click_智能问答_收起侧边栏", "提交");
@@ -7480,7 +7520,7 @@ var CustomerService = function(props) {
7480
7520
  })
7481
7521
  ]
7482
7522
  }),
7483
- /*#__PURE__*/ jsxs("div", {
7523
+ (showType == 4 || showType == 5) && /*#__PURE__*/ jsxs("div", {
7484
7524
  className: "".concat(styles.ChatWindow_Drawer),
7485
7525
  id: "",
7486
7526
  children: [
@@ -7578,7 +7618,7 @@ var CustomerService = function(props) {
7578
7618
  })
7579
7619
  ]
7580
7620
  }),
7581
- showType == 5 && imgBese64 && /*#__PURE__*/ jsx(ScreenshotTool$1, {
7621
+ (showType == 5 || showScreenshot) && imgBese64 && /*#__PURE__*/ jsx(ScreenshotTool$1, {
7582
7622
  imgBese64: imgBese64,
7583
7623
  saveScreenshotBese64: function(base64) {
7584
7624
  setScreenshotBese64(base64);
@@ -7587,9 +7627,15 @@ var CustomerService = function(props) {
7587
7627
  } else {
7588
7628
  setShowType(1);
7589
7629
  }
7630
+ setShowScreenshot(false);
7590
7631
  },
7591
7632
  cancelScreenshot: function() {
7592
- setShowType(1);
7633
+ if (saveShowType != -1) {
7634
+ setShowType(saveShowType);
7635
+ } else {
7636
+ setShowType(1);
7637
+ }
7638
+ setShowScreenshot(false);
7593
7639
  }
7594
7640
  }),
7595
7641
  viewBase64 && visible && /*#__PURE__*/ jsx(ViewImage$1, {