bhd-components 0.7.11 → 0.7.13
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.
- package/README.md +1 -1
- package/dist/{901ed6b6.esm.es5.production.js → 1c455680.esm.es5.production.js} +1 -1
- package/dist/{facd5ad8.esm.es5.development.js → 75d9e8b4.esm.es5.development.js} +1 -1
- package/dist/index.esm.es5.development.css +2064 -1992
- package/dist/index.esm.es5.development.js +93 -44
- package/dist/index.esm.es5.production.css +1 -1
- package/dist/index.esm.es5.production.js +1 -1
- package/es2017/customerService/index.js +78 -36
- package/es2017/customerService/index.module.less +50 -28
- package/es2017/customerService/index2.module.less +15 -3
- package/es2017/customerService/screenshotTool.js +13 -7
- package/esm/customerService/index.js +78 -35
- package/esm/customerService/index.module.less +50 -28
- package/esm/customerService/index2.module.less +15 -3
- package/esm/customerService/screenshotTool.js +13 -7
- package/package.json +1 -1
|
@@ -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 './
|
|
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 './
|
|
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 './75d9e8b4.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 './75d9e8b4.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":"
|
|
3169
|
+
var modules_63b47c51 = {"service_ChatWindow_Drawer":"index_module_service_ChatWindow_Drawer__f4576182","ChatWindow_Modal":"index_module_ChatWindow_Modal__f4576182","ChatWindow_Drawer":"index_module_ChatWindow_Drawer__f4576182","header_wrap":"index_module_header_wrap__f4576182","top":"index_module_top__f4576182","user":"index_module_user__f4576182","count":"index_module_count__f4576182","operate":"index_module_operate__f4576182","line":"index_module_line__f4576182","popover_main":"index_module_popover_main__f4576182","popover":"index_module_popover__f4576182","header_wrap_newlabo":"index_module_header_wrap_newlabo__f4576182","Drawer_main":"index_module_Drawer_main__f4576182","loading":"index_module_loading__f4576182","message_con":"index_module_message_con__f4576182","left":"index_module_left__f4576182","head_sculpture":"index_module_head_sculpture__f4576182","main_content":"index_module_main_content__f4576182","right":"index_module_right__f4576182","main":"index_module_main__f4576182","main_content_flag":"index_module_main_content_flag__f4576182","operate_modal":"index_module_operate_modal__f4576182","operate_modal_bottom":"index_module_operate_modal_bottom__f4576182","active":"index_module_active__f4576182","stop_generate":"index_module_stop_generate__f4576182","icon":"index_module_icon__f4576182","find_teacher":"index_module_find_teacher__f4576182","stop_findTeacher":"index_module_stop_findTeacher__f4576182","content":"index_module_content__f4576182","content_child":"index_module_content_child__f4576182","sign":"index_module_sign__f4576182","ask_question":"index_module_ask_question__f4576182","association_problem":"index_module_association_problem__f4576182","association_problem_flag":"index_module_association_problem_flag__f4576182","related_issues_flag":"index_module_related_issues_flag__f4576182","img_con":"index_module_img_con__f4576182","mask_zoom":"index_module_mask_zoom__f4576182","img_con2":"index_module_img_con2__f4576182","copyCode":"index_module_copyCode__f4576182","time":"index_module_time__f4576182","citation_content":"index_module_citation_content__f4576182","text_exceed":"index_module_text_exceed__f4576182","popover_content":"index_module_popover_content__f4576182","Drawer_main_newlabo":"index_module_Drawer_main_newlabo__f4576182","Drawer_main_newlabo_no_pic":"index_module_Drawer_main_newlabo_no_pic__f4576182","Drawer_buttom_Issues_List":"index_module_Drawer_buttom_Issues_List__f4576182","issues_list_teacherList":"index_module_issues_list_teacherList__f4576182","item":"index_module_item__f4576182","issues_list":"index_module_issues_list__f4576182","issues_list_flag":"index_module_issues_list_flag__f4576182","Drawer_buttom":"index_module_Drawer_buttom__f4576182","input_wrap":"index_module_input_wrap__f4576182","input":"index_module_input__f4576182","picture_layout":"index_module_picture_layout__f4576182","icon_close":"index_module_icon_close__f4576182","icon_zoom":"index_module_icon_zoom__f4576182","anticon":"index_module_anticon__f4576182","no_AI":"index_module_no_AI__f4576182","screenshot":"index_module_screenshot__f4576182","disabled":"index_module_disabled__f4576182","content_main":"index_module_content_main__f4576182","content_con":"index_module_content_con__f4576182","delete_quote":"index_module_delete_quote__f4576182","sending":"index_module_sending__f4576182","Drawer_buttom_Issues_List_newlabo":"index_module_Drawer_buttom_Issues_List_newlabo__f4576182","main_list":"index_module_main_list__f4576182","chat_content":"index_module_chat_content__f4576182","popover_main_content":"index_module_popover_main_content__f4576182","popover_main_content_name":"index_module_popover_main_content_name__f4576182","teacher_layout":"index_module_teacher_layout__f4576182","bottom":"index_module_bottom__f4576182","delete":"index_module_delete__f4576182","num":"index_module_num__f4576182","shrink":"index_module_shrink__f4576182","teacher_layout_newlabo":"index_module_teacher_layout_newlabo__f4576182","teacher_layout_modal":"index_module_teacher_layout_modal__f4576182","ai":"index_module_ai__f4576182","user_info":"index_module_user_info__f4576182","message":"index_module_message__f4576182","con":"index_module_con__f4576182","teacher_layout_modal_newlabo":"index_module_teacher_layout_modal_newlabo__f4576182","history_list":"index_module_history_list__f4576182","search_layout":"index_module_search_layout__f4576182","mymove":"index_module_mymove__f4576182","title":"index_module_title__f4576182","search_top":"index_module_search_top__f4576182","list_item":"index_module_list_item__f4576182","list_summary":"index_module_list_summary__f4576182","head_img":"index_module_head_img__f4576182","list_desc":"index_module_list_desc__f4576182","name":"index_module_name__f4576182","decs":"index_module_decs__f4576182","open":"index_module_open__f4576182","list_summary_active":"index_module_list_summary_active__f4576182","list_detail":"index_module_list_detail__f4576182","list":"index_module_list__f4576182","list_more":"index_module_list_more__f4576182","no_data":"index_module_no_data__f4576182","history_list_broadside":"index_module_history_list_broadside__f4576182","screenshot_Modal":"index_module_screenshot_Modal__f4576182","screenshot_Modal_btn":"index_module_screenshot_Modal_btn__f4576182"};
|
|
3170
3170
|
|
|
3171
3171
|
//消息已读
|
|
3172
3172
|
var readMessage = function(roomId, urllocation, userData, http) {
|
|
@@ -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,
|
|
@@ -4185,6 +4191,7 @@ var CustomerService = function(props) {
|
|
|
4185
4191
|
var isPosition = useRef(true);
|
|
4186
4192
|
var recommendeQuestionID = useRef([]); //推荐问题id
|
|
4187
4193
|
var videoHotQuestionsList = useRef([]); //视频热门问题
|
|
4194
|
+
var newHotQuestionsList = useRef([]); //视频热门问题
|
|
4188
4195
|
var mid = props.userData.mid;
|
|
4189
4196
|
var remarkable = new Remarkable({
|
|
4190
4197
|
highlight: function highlight(str, lang) {
|
|
@@ -4420,19 +4427,34 @@ var CustomerService = function(props) {
|
|
|
4420
4427
|
var questionsList = [];
|
|
4421
4428
|
var obj = {};
|
|
4422
4429
|
if (type == 1) {
|
|
4423
|
-
console.log(hotQuestionsList, "33322221111");
|
|
4424
|
-
|
|
4425
|
-
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4430
|
+
console.log(hotQuestionsList, newHotQuestionsList.current, "33322221111");
|
|
4431
|
+
if (newHotQuestionsList.current.length > 0) {
|
|
4432
|
+
questionsList = newHotQuestionsList.current.map(function(item, index) {
|
|
4433
|
+
if (index < 3) {
|
|
4434
|
+
return {
|
|
4435
|
+
key: "messageSource",
|
|
4436
|
+
value: item.id,
|
|
4437
|
+
question: item.question,
|
|
4438
|
+
answer: item.answer
|
|
4439
|
+
};
|
|
4440
|
+
} else {
|
|
4441
|
+
return null;
|
|
4442
|
+
}
|
|
4443
|
+
});
|
|
4444
|
+
} else {
|
|
4445
|
+
questionsList = hotQuestionsList.map(function(item, index) {
|
|
4446
|
+
if (index < 3) {
|
|
4447
|
+
return {
|
|
4448
|
+
key: "messageSource",
|
|
4449
|
+
value: item.id,
|
|
4450
|
+
question: item.question,
|
|
4451
|
+
answer: item.answer
|
|
4452
|
+
};
|
|
4453
|
+
} else {
|
|
4454
|
+
return null;
|
|
4455
|
+
}
|
|
4456
|
+
});
|
|
4457
|
+
}
|
|
4436
4458
|
questionsList = questionsList.filter(function(i) {
|
|
4437
4459
|
return i != null;
|
|
4438
4460
|
});
|
|
@@ -4644,7 +4666,8 @@ var CustomerService = function(props) {
|
|
|
4644
4666
|
};
|
|
4645
4667
|
//发送知识库问题 item,flag == 1 是获取问候信息的答案,flag == 2 是普通消息,flag == 3 是针对视频页面点击底部推荐问题
|
|
4646
4668
|
var sendMessage = function(item, flag) {
|
|
4647
|
-
|
|
4669
|
+
var type = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "";
|
|
4670
|
+
console.log(item, flag, 888888888);
|
|
4648
4671
|
var questions = [];
|
|
4649
4672
|
if (item && flag) {
|
|
4650
4673
|
questions = [
|
|
@@ -4706,7 +4729,7 @@ var CustomerService = function(props) {
|
|
|
4706
4729
|
key: "questionId",
|
|
4707
4730
|
value: flag == 1 ? questions.value : questions.id,
|
|
4708
4731
|
answer: questions.answer
|
|
4709
|
-
});
|
|
4732
|
+
}, type);
|
|
4710
4733
|
setKeyWord("");
|
|
4711
4734
|
setQuestionsList([]);
|
|
4712
4735
|
setCitationContent({});
|
|
@@ -4758,7 +4781,7 @@ var CustomerService = function(props) {
|
|
|
4758
4781
|
}
|
|
4759
4782
|
};
|
|
4760
4783
|
//向知识库发送问题 或答案 type:1 发送问题 2 接受答案
|
|
4761
|
-
var sendingExistingIssues = function(type, obj, questions) {
|
|
4784
|
+
var sendingExistingIssues = function(type, obj, questions, problemType) {
|
|
4762
4785
|
if (pageNumHistory <= 1) {
|
|
4763
4786
|
setHistoryMessageList(function(historyMessageList) {
|
|
4764
4787
|
var newHistoryMessageList = historyMessageList.concat(_object_spread_props(_object_spread({}, obj), {
|
|
@@ -4809,10 +4832,10 @@ var CustomerService = function(props) {
|
|
|
4809
4832
|
}
|
|
4810
4833
|
]
|
|
4811
4834
|
};
|
|
4812
|
-
sendingExistingIssues(2, dataObj, "");
|
|
4835
|
+
sendingExistingIssues(2, dataObj, "", problemType);
|
|
4813
4836
|
testLabQuestion(obj.message, questions.answer, "");
|
|
4814
4837
|
}
|
|
4815
|
-
if (type == 2 && config && config.type == "video") {
|
|
4838
|
+
if (type == 2 && config && config.type == "video" && problemType != "AssociativeProblem") {
|
|
4816
4839
|
//先请求问题列表
|
|
4817
4840
|
videoPageQuestiionsList(2);
|
|
4818
4841
|
}
|
|
@@ -4862,6 +4885,7 @@ var CustomerService = function(props) {
|
|
|
4862
4885
|
obj.regenerate = false;
|
|
4863
4886
|
}
|
|
4864
4887
|
var data = JSON.stringify(obj);
|
|
4888
|
+
var flagKeyWord = keyWord;
|
|
4865
4889
|
setKeyWord("");
|
|
4866
4890
|
setQuestionsList([]);
|
|
4867
4891
|
setTimeout(function() {
|
|
@@ -5008,7 +5032,9 @@ var CustomerService = function(props) {
|
|
|
5008
5032
|
}
|
|
5009
5033
|
if (msg.finished) {
|
|
5010
5034
|
setFinished(true); //发送结束
|
|
5011
|
-
|
|
5035
|
+
if (!flagKeyWord) {
|
|
5036
|
+
videoPageQuestiionsList(2);
|
|
5037
|
+
}
|
|
5012
5038
|
// isPosition.current = true;
|
|
5013
5039
|
setTimeout(function() {
|
|
5014
5040
|
isPosition.current = true;
|
|
@@ -5473,15 +5499,12 @@ var CustomerService = function(props) {
|
|
|
5473
5499
|
var flag = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 1;
|
|
5474
5500
|
console.log(flag, props, 3333333);
|
|
5475
5501
|
if (config && config.type == "video" && config.params) {
|
|
5476
|
-
|
|
5477
|
-
|
|
5478
|
-
|
|
5479
|
-
|
|
5480
|
-
|
|
5481
|
-
|
|
5482
|
-
// sectionId= "462347",
|
|
5483
|
-
// videoId= "29707",
|
|
5484
|
-
// watchTime= 262
|
|
5502
|
+
// let params = config.params;
|
|
5503
|
+
// let videoId = params.videoId;
|
|
5504
|
+
// let watchTime = params.videoProgress;
|
|
5505
|
+
// let courseId = getQuery('yc_id');
|
|
5506
|
+
// let sectionId = params.VideoBriefSummaryId;
|
|
5507
|
+
var courseId = "20899", sectionId = "462347", videoId = "29715", watchTime = 677;
|
|
5485
5508
|
if (videoId && courseId && sectionId) {
|
|
5486
5509
|
console.log(recommendeQuestionID.current, "recommendeQuestionID.current");
|
|
5487
5510
|
http.post("".concat(urllocation, "/chat-service/public/v1.0/knowledge-base/questions:recommend"), {
|
|
@@ -5509,6 +5532,7 @@ var CustomerService = function(props) {
|
|
|
5509
5532
|
setBottomRecommendationQuestions(data);
|
|
5510
5533
|
} else {
|
|
5511
5534
|
setHotQuestionsList(data);
|
|
5535
|
+
newHotQuestionsList.current = data;
|
|
5512
5536
|
}
|
|
5513
5537
|
// let ids:any[] = [];
|
|
5514
5538
|
// data.map((str: { id: string; })=>{
|
|
@@ -6031,7 +6055,7 @@ var CustomerService = function(props) {
|
|
|
6031
6055
|
className: styles.content_child
|
|
6032
6056
|
}),
|
|
6033
6057
|
item.extraInfo && JSON.parse(item.extraInfo).length > 0 && JSON.parse(item.extraInfo)[0].key == "imageUrl" && /*#__PURE__*/ jsxs("p", {
|
|
6034
|
-
className: styles.img_con,
|
|
6058
|
+
className: "".concat(styles.img_con, " ").concat(showType == 2 || showType == 4 ? styles.img_con2 : ""),
|
|
6035
6059
|
children: [
|
|
6036
6060
|
/*#__PURE__*/ jsx("img", {
|
|
6037
6061
|
src: JSON.parse(item.extraInfo)[0].value
|
|
@@ -6148,7 +6172,7 @@ var CustomerService = function(props) {
|
|
|
6148
6172
|
className: styles.content_child
|
|
6149
6173
|
}),
|
|
6150
6174
|
item.extraInfo && JSON.parse(item.extraInfo).length > 0 && JSON.parse(item.extraInfo)[0].key == "imageUrl" && /*#__PURE__*/ jsxs("p", {
|
|
6151
|
-
className: styles.img_con,
|
|
6175
|
+
className: "".concat(styles.img_con, " ").concat(showType == 2 || showType == 4 ? styles.img_con2 : ""),
|
|
6152
6176
|
children: [
|
|
6153
6177
|
/*#__PURE__*/ jsx("img", {
|
|
6154
6178
|
src: JSON.parse(item.extraInfo)[0].value
|
|
@@ -6165,7 +6189,7 @@ var CustomerService = function(props) {
|
|
|
6165
6189
|
]
|
|
6166
6190
|
}),
|
|
6167
6191
|
item.extraInfo != undefined && JSON.parse(item.extraInfo).length > 0 && JSON.parse(item.extraInfo)[0].key == "messageSource" && JSON.parse(item.extraInfo)[0].value != "knowledgebase" && /*#__PURE__*/ jsxs("ul", {
|
|
6168
|
-
className: "".concat(styles.association_problem, " ").concat(item.message == "抱歉,我暂时无法回答这样的问题。" ?
|
|
6192
|
+
className: "".concat(styles.association_problem, " ").concat(item.message == "抱歉,我暂时无法回答这样的问题。" ? styles.association_problem_flag : ""),
|
|
6169
6193
|
children: [
|
|
6170
6194
|
item.message == "抱歉,我暂时无法回答这样的问题。" && /*#__PURE__*/ jsx("li", {
|
|
6171
6195
|
className: styles.related_issues_flag,
|
|
@@ -6261,13 +6285,23 @@ var CustomerService = function(props) {
|
|
|
6261
6285
|
return "";
|
|
6262
6286
|
}
|
|
6263
6287
|
// console.log(historyMessageList,i,'sdcsd;sldcscsdsd')
|
|
6288
|
+
//根据上一行数据,判断是否显示招唤老师按钮
|
|
6289
|
+
var showTeacherBtn = true;
|
|
6290
|
+
var previousLineData = historyMessageList[i - 1];
|
|
6291
|
+
if (!previousLineData) {
|
|
6292
|
+
showTeacherBtn = true;
|
|
6293
|
+
} else if (!previousLineData.extraInfo) {
|
|
6294
|
+
showTeacherBtn = true;
|
|
6295
|
+
} else if (JSON.parse(previousLineData.extraInfo).length > 0 && JSON.parse(previousLineData.extraInfo)[0].key == "imageUrl") {
|
|
6296
|
+
showTeacherBtn = false;
|
|
6297
|
+
}
|
|
6264
6298
|
return /*#__PURE__*/ jsxs("p", {
|
|
6265
6299
|
className: styles.operate,
|
|
6266
6300
|
children: [
|
|
6267
6301
|
// 不在智能客服窗口,并已经点击了召唤老师,并有召唤老师权限
|
|
6268
6302
|
isAiChatWindow && answerMode != 1 && userData.modules.some(function(item) {
|
|
6269
6303
|
return item.short == "TeacherAnswer";
|
|
6270
|
-
}) &&
|
|
6304
|
+
}) && showTeacherBtn && /*#__PURE__*/ jsx("span", {
|
|
6271
6305
|
className: styles.ask_question,
|
|
6272
6306
|
onClick: function() {
|
|
6273
6307
|
setAnswerMode(1);
|
|
@@ -6414,9 +6448,20 @@ var CustomerService = function(props) {
|
|
|
6414
6448
|
}
|
|
6415
6449
|
//3、是否显示召唤老师回答按钮
|
|
6416
6450
|
var findTeacherBtn = false;
|
|
6417
|
-
if (!showStopBtn && isAiChatWindow && (extraInfo != undefined && JSON.parse(extraInfo).length > 0 && JSON.parse(extraInfo)[0].key == "questionId" || extraInfo == null)
|
|
6451
|
+
if (!showStopBtn && isAiChatWindow && (extraInfo != undefined && JSON.parse(extraInfo).length > 0 && JSON.parse(extraInfo)[0].key == "questionId" || extraInfo == null)) {
|
|
6418
6452
|
findTeacherBtn = true;
|
|
6419
6453
|
}
|
|
6454
|
+
//根据上一行数据,判断是否显示招唤老师按钮
|
|
6455
|
+
var showTeacherBtn = true;
|
|
6456
|
+
var previousLineData = historyMessageList[i - 1];
|
|
6457
|
+
if (!previousLineData) {
|
|
6458
|
+
showTeacherBtn = true;
|
|
6459
|
+
} else if (!previousLineData.extraInfo) {
|
|
6460
|
+
showTeacherBtn = true;
|
|
6461
|
+
} else if (JSON.parse(previousLineData.extraInfo).length > 0 && JSON.parse(previousLineData.extraInfo)[0].key == "imageUrl") {
|
|
6462
|
+
showTeacherBtn = false;
|
|
6463
|
+
}
|
|
6464
|
+
console.log(showTeacherBtn, "dlvkdfl");
|
|
6420
6465
|
/// style={{position:showStopBtn && isPosition.current ? 'sticky' : 'relative'}}
|
|
6421
6466
|
return /*#__PURE__*/ jsxs("div", {
|
|
6422
6467
|
className: "".concat(styles.operate_modal_bottom),
|
|
@@ -6468,7 +6513,7 @@ var CustomerService = function(props) {
|
|
|
6468
6513
|
//在ai窗口并ai已经生成完答案
|
|
6469
6514
|
findTeacherBtn && userData.modules.some(function(item) {
|
|
6470
6515
|
return item.short == "TeacherAnswer";
|
|
6471
|
-
}) && /*#__PURE__*/ jsx("span", {
|
|
6516
|
+
}) && showTeacherBtn && /*#__PURE__*/ jsx("span", {
|
|
6472
6517
|
className: styles.find_teacher,
|
|
6473
6518
|
onClick: function() {
|
|
6474
6519
|
setAnswerMode(1);
|
|
@@ -6814,6 +6859,8 @@ var CustomerService = function(props) {
|
|
|
6814
6859
|
}
|
|
6815
6860
|
}, 1000);
|
|
6816
6861
|
}
|
|
6862
|
+
setBottomRecommendationQuestions([]);
|
|
6863
|
+
resettingBottomHei();
|
|
6817
6864
|
},
|
|
6818
6865
|
onPressEnter: function(e) {
|
|
6819
6866
|
// console.log('发送内容22222',props)
|
|
@@ -6824,6 +6871,8 @@ var CustomerService = function(props) {
|
|
|
6824
6871
|
clearTimeout(timer.current);
|
|
6825
6872
|
setKeyWord("");
|
|
6826
6873
|
setCitationContent({});
|
|
6874
|
+
setBottomRecommendationQuestions([]);
|
|
6875
|
+
resettingBottomHei();
|
|
6827
6876
|
//查找是否是召唤老师回答并有相应的老师名称
|
|
6828
6877
|
if (answerMode == 1 && teacherList.length > 0) {
|
|
6829
6878
|
var list = teacherList.filter(function(v) {
|
|
@@ -7054,7 +7103,7 @@ var CustomerService = function(props) {
|
|
|
7054
7103
|
className: styles.item,
|
|
7055
7104
|
children: /*#__PURE__*/ jsx("span", {
|
|
7056
7105
|
onClick: function() {
|
|
7057
|
-
sendMessage(item, 2);
|
|
7106
|
+
sendMessage(item, 2, "AssociativeProblem");
|
|
7058
7107
|
setKeyWord("");
|
|
7059
7108
|
onEvent(serverName + serverUrl(), "click_智能问答_ 发送", "提交");
|
|
7060
7109
|
},
|