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