bhd-components 0.7.1 → 0.7.2
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/{f1d44d24.esm.es5.production.js → 03434506.esm.es5.production.js} +1 -1
- package/dist/{fd2fee4a.esm.es5.development.js → 86a6ab15.esm.es5.development.js} +1 -1
- package/dist/index.esm.es5.development.css +1352 -0
- package/dist/index.esm.es5.development.js +266 -267
- package/dist/index.esm.es5.production.css +1 -1
- package/dist/index.esm.es5.production.js +1 -1
- package/es2017/customerService/index.js +250 -251
- package/es2017/customerService/index2.module.less +1392 -0
- package/esm/customerService/index.js +264 -265
- package/esm/customerService/index2.module.less +1392 -0
- 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, y as Remarkable, D as Drawer, H as HighlightJS } from './
|
|
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 './
|
|
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 './86a6ab15.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 './86a6ab15.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';
|
|
@@ -3288,7 +3288,6 @@ var CustomerService = function(props) {
|
|
|
3288
3288
|
var _useState22 = _sliced_to_array(useState(-1), 2), answerMode = _useState22[0], setAnswerMode = _useState22[1]; //设置回答模式。1,召唤老师回答
|
|
3289
3289
|
var _useState23 = _sliced_to_array(useState([]), 2), teacherList = _useState23[0], setTeacherList = _useState23[1]; //老师列表
|
|
3290
3290
|
var _useState24 = _sliced_to_array(useState({}), 2), problem = _useState24[0], setProblem = _useState24[1]; //召唤老师回答的问题
|
|
3291
|
-
// const [roomList,setRoomList] = useState([]);//聊天列表
|
|
3292
3291
|
var _useState25 = _sliced_to_array(useState([]), 2), contactsList = _useState25[0], setContactsList = _useState25[1]; //老师列表
|
|
3293
3292
|
var _useState26 = _sliced_to_array(useState([]), 2), chatObj = _useState26[0], setChatObj = _useState26[1]; //聊天记录id保存,用来在实验报告中记录
|
|
3294
3293
|
var _useState27 = _sliced_to_array(useState(""), 2), keyWordProblem = _useState27[0], setKeyWordProblem = _useState27[1]; //历史记录搜索的内容
|
|
@@ -3513,7 +3512,7 @@ var CustomerService = function(props) {
|
|
|
3513
3512
|
if (pageNumHistory <= 1) {
|
|
3514
3513
|
setHistoryMessageList(function(historyMessageList) {
|
|
3515
3514
|
var newHistoryMessageList = historyMessageList.concat(_object_spread_props(_object_spread({}, obj), {
|
|
3516
|
-
id:
|
|
3515
|
+
id: new Date().getTime() + "dede",
|
|
3517
3516
|
upvoted: false,
|
|
3518
3517
|
downvoted: false,
|
|
3519
3518
|
quotedMessage: "",
|
|
@@ -3623,7 +3622,6 @@ var CustomerService = function(props) {
|
|
|
3623
3622
|
scrollToBottom();
|
|
3624
3623
|
}, 100);
|
|
3625
3624
|
}
|
|
3626
|
-
console.log("不记录1111111");
|
|
3627
3625
|
return;
|
|
3628
3626
|
}
|
|
3629
3627
|
setKeyWord("");
|
|
@@ -4252,10 +4250,10 @@ var CustomerService = function(props) {
|
|
|
4252
4250
|
// }
|
|
4253
4251
|
} else {
|
|
4254
4252
|
setPageCount(0);
|
|
4255
|
-
setGreetingMessage(true);
|
|
4256
4253
|
setBottomLoading(false);
|
|
4257
4254
|
setLoading(false);
|
|
4258
4255
|
setHistoryMessageList([]);
|
|
4256
|
+
setGreetingMessage(true);
|
|
4259
4257
|
//召唤老师回答
|
|
4260
4258
|
if (problem != undefined && problem.user != undefined && problem.question != undefined) {
|
|
4261
4259
|
sendToTeacher(1);
|
|
@@ -4794,19 +4792,21 @@ var CustomerService = function(props) {
|
|
|
4794
4792
|
// }
|
|
4795
4793
|
//渲染问答
|
|
4796
4794
|
var renderQuestion = function() {
|
|
4797
|
-
if (historyMessageList.length > 0) {
|
|
4798
|
-
|
|
4799
|
-
|
|
4800
|
-
|
|
4801
|
-
|
|
4802
|
-
|
|
4803
|
-
|
|
4804
|
-
|
|
4805
|
-
|
|
4806
|
-
|
|
4807
|
-
|
|
4808
|
-
|
|
4809
|
-
|
|
4795
|
+
// if (historyMessageList.length > 0) {
|
|
4796
|
+
return /*#__PURE__*/ jsx("ul", {
|
|
4797
|
+
className: styles.message_con,
|
|
4798
|
+
children: historyMessageList.map(function(item, i) {
|
|
4799
|
+
console.log(item, 444444888888);
|
|
4800
|
+
var timeObj = parseDate(item.createdAt);
|
|
4801
|
+
// console.log(item.message);
|
|
4802
|
+
var message = item.message;
|
|
4803
|
+
var li;
|
|
4804
|
+
// 是否需要显示日期
|
|
4805
|
+
var itemIndex = historyMessageList.findIndex(function(ite) {
|
|
4806
|
+
return ite.id === item.id;
|
|
4807
|
+
});
|
|
4808
|
+
var time = "";
|
|
4809
|
+
if (historyMessageList.length > 1) {
|
|
4810
4810
|
if (itemIndex <= 0) {
|
|
4811
4811
|
//第一项
|
|
4812
4812
|
time = "".concat(timeObj.year, "-").concat(timeObj.month, "-").concat(timeObj.day, " ").concat(timeObj.hours, ":").concat(timeObj.minutes);
|
|
@@ -4826,266 +4826,265 @@ var CustomerService = function(props) {
|
|
|
4826
4826
|
}
|
|
4827
4827
|
}
|
|
4828
4828
|
}
|
|
4829
|
-
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
className: styles.operate_modal,
|
|
4862
|
-
children: /*#__PURE__*/ jsxs("p", {
|
|
4863
|
-
className: styles.operate,
|
|
4864
|
-
children: [
|
|
4865
|
-
/*#__PURE__*/ jsx("i", {
|
|
4866
|
-
className: "yinyong_quote1",
|
|
4867
|
-
onClick: function() {
|
|
4868
|
-
setCitationContent({
|
|
4869
|
-
content: item.message,
|
|
4870
|
-
id: item.id
|
|
4871
|
-
});
|
|
4872
|
-
resettingBottomHei();
|
|
4873
|
-
onEvent(serverName + serverUrl(), "click_智能问答_引用", "提交");
|
|
4874
|
-
},
|
|
4875
|
-
children: /*#__PURE__*/ jsx(CustomQuote$1, {})
|
|
4876
|
-
}),
|
|
4877
|
-
copyTextOBJ.length > 0 && copyTextOBJ.some(function(list) {
|
|
4878
|
-
return list == item.id;
|
|
4879
|
-
}) ? /*#__PURE__*/ jsx("i", {
|
|
4880
|
-
className: "tongyong-xuanzhongdui",
|
|
4881
|
-
children: /*#__PURE__*/ jsx(CustomDuihao$1, {})
|
|
4882
|
-
}) : /*#__PURE__*/ jsx("i", {
|
|
4883
|
-
className: "fuzhi21",
|
|
4884
|
-
onClick: function() {
|
|
4885
|
-
copyText(item.message);
|
|
4886
|
-
{
|
|
4887
|
-
var obj = copyTextOBJ;
|
|
4888
|
-
obj = obj.filter(function(list) {
|
|
4889
|
-
return list != item.id;
|
|
4890
|
-
});
|
|
4891
|
-
obj.push(item.id);
|
|
4892
|
-
setCopyTextObj(obj);
|
|
4893
|
-
}
|
|
4894
|
-
setTimeout(function() {
|
|
4895
|
-
var obj = copyTextOBJ;
|
|
4896
|
-
obj = obj.filter(function(list) {
|
|
4897
|
-
return list != item.id;
|
|
4898
|
-
});
|
|
4899
|
-
setCopyTextObj(obj);
|
|
4900
|
-
}, 3000);
|
|
4901
|
-
onEvent(serverName + serverUrl(), "click_智能问答_复制", "提交");
|
|
4902
|
-
},
|
|
4903
|
-
children: /*#__PURE__*/ jsx(CustomCopy$1, {})
|
|
4904
|
-
})
|
|
4905
|
-
]
|
|
4906
|
-
})
|
|
4907
|
-
}),
|
|
4908
|
-
/*#__PURE__*/ jsx("div", {
|
|
4909
|
-
className: styles.content,
|
|
4910
|
-
children: /*#__PURE__*/ jsx("p", {
|
|
4911
|
-
dangerouslySetInnerHTML: {
|
|
4912
|
-
__html: message
|
|
4913
|
-
},
|
|
4914
|
-
className: styles.content_child
|
|
4915
|
-
})
|
|
4916
|
-
})
|
|
4917
|
-
]
|
|
4918
|
-
}),
|
|
4919
|
-
//引用消息
|
|
4920
|
-
item.quotedMessage && /*#__PURE__*/ jsx("div", {
|
|
4921
|
-
className: styles.citation_content,
|
|
4922
|
-
children: getByteLen(item.quotedMessage) > 120 ? /*#__PURE__*/ jsx(Tooltip, {
|
|
4923
|
-
overlayClassName: styles.popover_main_content,
|
|
4924
|
-
title: item.quotedMessage,
|
|
4925
|
-
placement: "leftTop",
|
|
4829
|
+
}
|
|
4830
|
+
var dataTime = time;
|
|
4831
|
+
if (lastId == item.id && keyWordProblem != "") {
|
|
4832
|
+
message = remarkable.render(message);
|
|
4833
|
+
message = message.replaceAll(keyWordProblem, function(e) {
|
|
4834
|
+
return "<span class=".concat(styles.sign, ">").concat(e, "</span>");
|
|
4835
|
+
});
|
|
4836
|
+
} else {
|
|
4837
|
+
message = remarkable.render(message);
|
|
4838
|
+
}
|
|
4839
|
+
if (item.sender == mid) {
|
|
4840
|
+
//只有引用和复制功能
|
|
4841
|
+
li = /*#__PURE__*/ jsxs(Fragment, {
|
|
4842
|
+
children: [
|
|
4843
|
+
dataTime ? /*#__PURE__*/ jsx("li", {
|
|
4844
|
+
className: styles.time,
|
|
4845
|
+
children: dataTime
|
|
4846
|
+
}) : "",
|
|
4847
|
+
/*#__PURE__*/ jsxs("li", {
|
|
4848
|
+
className: styles.left,
|
|
4849
|
+
id: lastId == item.id ? "li_flag" : "",
|
|
4850
|
+
children: [
|
|
4851
|
+
/*#__PURE__*/ jsx("div", {
|
|
4852
|
+
className: styles.main,
|
|
4853
|
+
children: /*#__PURE__*/ jsxs("div", {
|
|
4854
|
+
className: styles.main_content,
|
|
4855
|
+
children: [
|
|
4856
|
+
/*#__PURE__*/ jsxs("div", {
|
|
4857
|
+
className: styles.main_content_flag,
|
|
4858
|
+
children: [
|
|
4859
|
+
/*#__PURE__*/ jsx("div", {
|
|
4860
|
+
className: styles.operate_modal,
|
|
4926
4861
|
children: /*#__PURE__*/ jsxs("p", {
|
|
4927
|
-
className: styles.
|
|
4862
|
+
className: styles.operate,
|
|
4928
4863
|
children: [
|
|
4929
|
-
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
})
|
|
4939
|
-
}),
|
|
4940
|
-
showType == 2 || showType == 4 ? /*#__PURE__*/ jsx("div", {
|
|
4941
|
-
className: styles.head_sculpture,
|
|
4942
|
-
style: {
|
|
4943
|
-
marginLeft: "12px"
|
|
4944
|
-
},
|
|
4945
|
-
children: /*#__PURE__*/ jsx("img", {
|
|
4946
|
-
src: userData.avatar
|
|
4947
|
-
})
|
|
4948
|
-
}) : ""
|
|
4949
|
-
]
|
|
4950
|
-
}, item.id)
|
|
4951
|
-
]
|
|
4952
|
-
});
|
|
4953
|
-
} else {
|
|
4954
|
-
//获取用户头像
|
|
4955
|
-
var headImg = "";
|
|
4956
|
-
var chatWindow = [];
|
|
4957
|
-
var isAiChatWindow;
|
|
4958
|
-
chatWindow = contactsList.filter(function(item) {
|
|
4959
|
-
return item.roomId == roomId;
|
|
4960
|
-
});
|
|
4961
|
-
if (chatWindow.length > 0 && chatWindow[0].headImg != "") {
|
|
4962
|
-
headImg = chatWindow[0].headImg;
|
|
4963
|
-
}
|
|
4964
|
-
// console.log(chatWindow,'chatWindowchatWindow')
|
|
4965
|
-
//是否在智能客服窗口
|
|
4966
|
-
isAiChatWindow = chatWindow.length > 0 && chatWindow[0].sender != undefined && chatWindow[0].sender == "AI" ? true : false;
|
|
4967
|
-
var header = 2; //代表是ai头像
|
|
4968
|
-
if (isAiChatWindow && item.extraInfo != undefined && JSON.parse(item.extraInfo).length > 0 && JSON.parse(item.extraInfo)[0].key == "isVoteMessage") {
|
|
4969
|
-
//使用AI头像
|
|
4970
|
-
header = 1;
|
|
4971
|
-
}
|
|
4972
|
-
li = /*#__PURE__*/ jsxs(Fragment, {
|
|
4973
|
-
children: [
|
|
4974
|
-
dataTime ? /*#__PURE__*/ jsx("li", {
|
|
4975
|
-
className: styles.time,
|
|
4976
|
-
children: dataTime
|
|
4977
|
-
}) : "",
|
|
4978
|
-
/*#__PURE__*/ jsxs("li", {
|
|
4979
|
-
className: styles.right,
|
|
4980
|
-
id: lastId == item.id ? "li_flag" : "",
|
|
4981
|
-
children: [
|
|
4982
|
-
(showType == 2 || showType == 4) && /*#__PURE__*/ jsx("div", {
|
|
4983
|
-
className: styles.head_sculpture,
|
|
4984
|
-
style: {
|
|
4985
|
-
marginRight: "12px"
|
|
4986
|
-
},
|
|
4987
|
-
children: isAiChatWindow ? item.extraInfo == null || header == 1 ? /*#__PURE__*/ jsx(CustomAiIcon$1, {}) : /*#__PURE__*/ jsx("img", {
|
|
4988
|
-
src: knowledge_icon
|
|
4989
|
-
}) : /*#__PURE__*/ jsx("img", {
|
|
4990
|
-
src: headImg
|
|
4991
|
-
})
|
|
4992
|
-
}),
|
|
4993
|
-
/*#__PURE__*/ jsx("div", {
|
|
4994
|
-
className: styles.main,
|
|
4995
|
-
children: /*#__PURE__*/ jsxs("div", {
|
|
4996
|
-
className: styles.main_content,
|
|
4997
|
-
children: [
|
|
4998
|
-
/*#__PURE__*/ jsxs("div", {
|
|
4999
|
-
className: styles.main_content_flag,
|
|
5000
|
-
children: [
|
|
5001
|
-
/*#__PURE__*/ jsx("div", {
|
|
5002
|
-
className: styles.operate_modal,
|
|
5003
|
-
children: // 不是最后一行,
|
|
5004
|
-
historyMessageList.length - 1 != i && renderOperateBtn(item, isAiChatWindow, i)
|
|
5005
|
-
}),
|
|
5006
|
-
/*#__PURE__*/ jsxs("div", {
|
|
5007
|
-
className: styles.content,
|
|
5008
|
-
children: [
|
|
5009
|
-
/*#__PURE__*/ jsx("p", {
|
|
5010
|
-
dangerouslySetInnerHTML: {
|
|
5011
|
-
__html: message
|
|
4864
|
+
/*#__PURE__*/ jsx("i", {
|
|
4865
|
+
className: "yinyong_quote1",
|
|
4866
|
+
onClick: function() {
|
|
4867
|
+
setCitationContent({
|
|
4868
|
+
content: item.message,
|
|
4869
|
+
id: item.id
|
|
4870
|
+
});
|
|
4871
|
+
resettingBottomHei();
|
|
4872
|
+
onEvent(serverName + serverUrl(), "click_智能问答_引用", "提交");
|
|
5012
4873
|
},
|
|
5013
|
-
|
|
4874
|
+
children: /*#__PURE__*/ jsx(CustomQuote$1, {})
|
|
5014
4875
|
}),
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
|
|
5022
|
-
|
|
5023
|
-
|
|
5024
|
-
|
|
5025
|
-
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
4876
|
+
copyTextOBJ.length > 0 && copyTextOBJ.some(function(list) {
|
|
4877
|
+
return list == item.id;
|
|
4878
|
+
}) ? /*#__PURE__*/ jsx("i", {
|
|
4879
|
+
className: "tongyong-xuanzhongdui",
|
|
4880
|
+
children: /*#__PURE__*/ jsx(CustomDuihao$1, {})
|
|
4881
|
+
}) : /*#__PURE__*/ jsx("i", {
|
|
4882
|
+
className: "fuzhi21",
|
|
4883
|
+
onClick: function() {
|
|
4884
|
+
copyText(item.message);
|
|
4885
|
+
{
|
|
4886
|
+
var obj = copyTextOBJ;
|
|
4887
|
+
obj = obj.filter(function(list) {
|
|
4888
|
+
return list != item.id;
|
|
4889
|
+
});
|
|
4890
|
+
obj.push(item.id);
|
|
4891
|
+
setCopyTextObj(obj);
|
|
4892
|
+
}
|
|
4893
|
+
setTimeout(function() {
|
|
4894
|
+
var obj = copyTextOBJ;
|
|
4895
|
+
obj = obj.filter(function(list) {
|
|
4896
|
+
return list != item.id;
|
|
4897
|
+
});
|
|
4898
|
+
setCopyTextObj(obj);
|
|
4899
|
+
}, 3000);
|
|
4900
|
+
onEvent(serverName + serverUrl(), "click_智能问答_复制", "提交");
|
|
4901
|
+
},
|
|
4902
|
+
children: /*#__PURE__*/ jsx(CustomCopy$1, {})
|
|
5029
4903
|
})
|
|
5030
4904
|
]
|
|
5031
4905
|
})
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
|
|
5037
|
-
|
|
5038
|
-
overlayClassName: styles.popover_main_content,
|
|
5039
|
-
title: item.quotedMessage,
|
|
5040
|
-
placement: "rightTop",
|
|
5041
|
-
children: /*#__PURE__*/ jsxs("p", {
|
|
5042
|
-
className: styles.text_exceed,
|
|
5043
|
-
children: [
|
|
5044
|
-
item.quotedMessage,
|
|
5045
|
-
/*#__PURE__*/ jsx(RightOutlined, {})
|
|
5046
|
-
]
|
|
5047
|
-
})
|
|
5048
|
-
}) : /*#__PURE__*/ jsx("p", {
|
|
5049
|
-
children: item.quotedMessage
|
|
5050
|
-
})
|
|
5051
|
-
}),
|
|
5052
|
-
//findTeacher//是否在召唤老师过程中,是否是最后一条消息
|
|
5053
|
-
!item.findTeacher && historyMessageList.length - 1 == i && item.id != "123456" && renderLastOperateBtn(item, isAiChatWindow, i),
|
|
5054
|
-
//召唤老师回答按钮
|
|
5055
|
-
isAiChatWindow && item.findTeacher && userData.modules.some(function(item) {
|
|
5056
|
-
return item.short == "TeacherAnswer";
|
|
5057
|
-
}) ? /*#__PURE__*/ jsx("div", {
|
|
5058
|
-
className: "".concat(styles.operate_modal_bottom, " "),
|
|
5059
|
-
children: /*#__PURE__*/ jsx("p", {
|
|
5060
|
-
className: styles.stop_findTeacher,
|
|
5061
|
-
children: /*#__PURE__*/ jsx("span", {
|
|
5062
|
-
onClick: function() {
|
|
5063
|
-
setAnswerMode(-1);
|
|
5064
|
-
setTeacherList([]);
|
|
5065
|
-
setHistoryMessageList(function(historyMessageList) {
|
|
5066
|
-
return historyMessageList.filter(function(item) {
|
|
5067
|
-
return item.id != "-1";
|
|
5068
|
-
});
|
|
5069
|
-
});
|
|
4906
|
+
}),
|
|
4907
|
+
/*#__PURE__*/ jsx("div", {
|
|
4908
|
+
className: styles.content,
|
|
4909
|
+
children: /*#__PURE__*/ jsx("p", {
|
|
4910
|
+
dangerouslySetInnerHTML: {
|
|
4911
|
+
__html: message
|
|
5070
4912
|
},
|
|
5071
|
-
|
|
4913
|
+
className: styles.content_child
|
|
5072
4914
|
})
|
|
5073
4915
|
})
|
|
5074
|
-
|
|
5075
|
-
|
|
5076
|
-
|
|
4916
|
+
]
|
|
4917
|
+
}),
|
|
4918
|
+
//引用消息
|
|
4919
|
+
item.quotedMessage && /*#__PURE__*/ jsx("div", {
|
|
4920
|
+
className: styles.citation_content,
|
|
4921
|
+
children: getByteLen(item.quotedMessage) > 120 ? /*#__PURE__*/ jsx(Tooltip, {
|
|
4922
|
+
overlayClassName: styles.popover_main_content,
|
|
4923
|
+
title: item.quotedMessage,
|
|
4924
|
+
placement: "leftTop",
|
|
4925
|
+
children: /*#__PURE__*/ jsxs("p", {
|
|
4926
|
+
className: styles.text_exceed,
|
|
4927
|
+
children: [
|
|
4928
|
+
item.quotedMessage,
|
|
4929
|
+
/*#__PURE__*/ jsx(RightOutlined, {})
|
|
4930
|
+
]
|
|
4931
|
+
})
|
|
4932
|
+
}) : /*#__PURE__*/ jsx("p", {
|
|
4933
|
+
children: item.quotedMessage
|
|
4934
|
+
})
|
|
4935
|
+
})
|
|
4936
|
+
]
|
|
5077
4937
|
})
|
|
5078
|
-
|
|
5079
|
-
|
|
5080
|
-
|
|
5081
|
-
|
|
4938
|
+
}),
|
|
4939
|
+
showType == 2 || showType == 4 ? /*#__PURE__*/ jsx("div", {
|
|
4940
|
+
className: styles.head_sculpture,
|
|
4941
|
+
style: {
|
|
4942
|
+
marginLeft: "12px"
|
|
4943
|
+
},
|
|
4944
|
+
children: /*#__PURE__*/ jsx("img", {
|
|
4945
|
+
src: userData.avatar
|
|
4946
|
+
})
|
|
4947
|
+
}) : ""
|
|
4948
|
+
]
|
|
4949
|
+
}, item.id)
|
|
4950
|
+
]
|
|
4951
|
+
});
|
|
4952
|
+
} else {
|
|
4953
|
+
//获取用户头像
|
|
4954
|
+
var headImg = "";
|
|
4955
|
+
var chatWindow = [];
|
|
4956
|
+
var isAiChatWindow;
|
|
4957
|
+
chatWindow = contactsList.filter(function(item) {
|
|
4958
|
+
return item.roomId == roomId;
|
|
4959
|
+
});
|
|
4960
|
+
if (chatWindow.length > 0 && chatWindow[0].headImg != "") {
|
|
4961
|
+
headImg = chatWindow[0].headImg;
|
|
5082
4962
|
}
|
|
5083
|
-
|
|
5084
|
-
|
|
5085
|
-
|
|
5086
|
-
|
|
5087
|
-
|
|
5088
|
-
|
|
4963
|
+
// console.log(chatWindow,'chatWindowchatWindow')
|
|
4964
|
+
//是否在智能客服窗口
|
|
4965
|
+
isAiChatWindow = chatWindow.length > 0 && chatWindow[0].sender != undefined && chatWindow[0].sender == "AI" ? true : false;
|
|
4966
|
+
var header = 2; //代表是ai头像
|
|
4967
|
+
if (isAiChatWindow && item.extraInfo != undefined && JSON.parse(item.extraInfo).length > 0 && JSON.parse(item.extraInfo)[0].key == "isVoteMessage") {
|
|
4968
|
+
//使用AI头像
|
|
4969
|
+
header = 1;
|
|
4970
|
+
}
|
|
4971
|
+
li = /*#__PURE__*/ jsxs(Fragment, {
|
|
4972
|
+
children: [
|
|
4973
|
+
dataTime ? /*#__PURE__*/ jsx("li", {
|
|
4974
|
+
className: styles.time,
|
|
4975
|
+
children: dataTime
|
|
4976
|
+
}) : "",
|
|
4977
|
+
/*#__PURE__*/ jsxs("li", {
|
|
4978
|
+
className: styles.right,
|
|
4979
|
+
id: lastId == item.id ? "li_flag" : "",
|
|
4980
|
+
children: [
|
|
4981
|
+
(showType == 2 || showType == 4) && /*#__PURE__*/ jsx("div", {
|
|
4982
|
+
className: styles.head_sculpture,
|
|
4983
|
+
style: {
|
|
4984
|
+
marginRight: "12px"
|
|
4985
|
+
},
|
|
4986
|
+
children: isAiChatWindow ? item.extraInfo == null || header == 1 ? /*#__PURE__*/ jsx(CustomAiIcon$1, {}) : /*#__PURE__*/ jsx("img", {
|
|
4987
|
+
src: knowledge_icon
|
|
4988
|
+
}) : /*#__PURE__*/ jsx("img", {
|
|
4989
|
+
src: headImg
|
|
4990
|
+
})
|
|
4991
|
+
}),
|
|
4992
|
+
/*#__PURE__*/ jsx("div", {
|
|
4993
|
+
className: styles.main,
|
|
4994
|
+
children: /*#__PURE__*/ jsxs("div", {
|
|
4995
|
+
className: styles.main_content,
|
|
4996
|
+
children: [
|
|
4997
|
+
/*#__PURE__*/ jsxs("div", {
|
|
4998
|
+
className: styles.main_content_flag,
|
|
4999
|
+
children: [
|
|
5000
|
+
/*#__PURE__*/ jsx("div", {
|
|
5001
|
+
className: styles.operate_modal,
|
|
5002
|
+
children: // 不是最后一行,
|
|
5003
|
+
historyMessageList.length - 1 != i && renderOperateBtn(item, isAiChatWindow, i)
|
|
5004
|
+
}),
|
|
5005
|
+
/*#__PURE__*/ jsxs("div", {
|
|
5006
|
+
className: styles.content,
|
|
5007
|
+
children: [
|
|
5008
|
+
/*#__PURE__*/ jsx("p", {
|
|
5009
|
+
dangerouslySetInnerHTML: {
|
|
5010
|
+
__html: message
|
|
5011
|
+
},
|
|
5012
|
+
className: styles.content_child
|
|
5013
|
+
}),
|
|
5014
|
+
item.extraInfo != undefined && JSON.parse(item.extraInfo).length > 0 && JSON.parse(item.extraInfo)[0].key == "messageSource" && JSON.parse(item.extraInfo)[0].value != "knowledgebase" && /*#__PURE__*/ jsx("ul", {
|
|
5015
|
+
className: styles.association_problem,
|
|
5016
|
+
children: JSON.parse(item.extraInfo).map(function(list, index) {
|
|
5017
|
+
return /*#__PURE__*/ jsxs("li", {
|
|
5018
|
+
onClick: function() {
|
|
5019
|
+
sendMessage(list, 1);
|
|
5020
|
+
},
|
|
5021
|
+
children: [
|
|
5022
|
+
index + 1,
|
|
5023
|
+
".",
|
|
5024
|
+
list.question
|
|
5025
|
+
]
|
|
5026
|
+
}, i + "_" + index + "_" + list.value);
|
|
5027
|
+
})
|
|
5028
|
+
})
|
|
5029
|
+
]
|
|
5030
|
+
})
|
|
5031
|
+
]
|
|
5032
|
+
}),
|
|
5033
|
+
//引用消息
|
|
5034
|
+
item.quotedMessage && /*#__PURE__*/ jsx("div", {
|
|
5035
|
+
className: styles.citation_content,
|
|
5036
|
+
children: getByteLen(item.quotedMessage) > 120 ? /*#__PURE__*/ jsx(Tooltip, {
|
|
5037
|
+
overlayClassName: styles.popover_main_content,
|
|
5038
|
+
title: item.quotedMessage,
|
|
5039
|
+
placement: "rightTop",
|
|
5040
|
+
children: /*#__PURE__*/ jsxs("p", {
|
|
5041
|
+
className: styles.text_exceed,
|
|
5042
|
+
children: [
|
|
5043
|
+
item.quotedMessage,
|
|
5044
|
+
/*#__PURE__*/ jsx(RightOutlined, {})
|
|
5045
|
+
]
|
|
5046
|
+
})
|
|
5047
|
+
}) : /*#__PURE__*/ jsx("p", {
|
|
5048
|
+
children: item.quotedMessage
|
|
5049
|
+
})
|
|
5050
|
+
}),
|
|
5051
|
+
//findTeacher//是否在召唤老师过程中,是否是最后一条消息
|
|
5052
|
+
!item.findTeacher && historyMessageList.length - 1 == i && item.id != "123456" && renderLastOperateBtn(item, isAiChatWindow, i),
|
|
5053
|
+
//召唤老师回答按钮
|
|
5054
|
+
isAiChatWindow && item.findTeacher && userData.modules.some(function(item) {
|
|
5055
|
+
return item.short == "TeacherAnswer";
|
|
5056
|
+
}) ? /*#__PURE__*/ jsx("div", {
|
|
5057
|
+
className: "".concat(styles.operate_modal_bottom, " "),
|
|
5058
|
+
children: /*#__PURE__*/ jsx("p", {
|
|
5059
|
+
className: styles.stop_findTeacher,
|
|
5060
|
+
children: /*#__PURE__*/ jsx("span", {
|
|
5061
|
+
onClick: function() {
|
|
5062
|
+
setAnswerMode(-1);
|
|
5063
|
+
setTeacherList([]);
|
|
5064
|
+
setHistoryMessageList(function(historyMessageList) {
|
|
5065
|
+
return historyMessageList.filter(function(item) {
|
|
5066
|
+
return item.id != "-1";
|
|
5067
|
+
});
|
|
5068
|
+
});
|
|
5069
|
+
},
|
|
5070
|
+
children: "停止召唤老师"
|
|
5071
|
+
})
|
|
5072
|
+
})
|
|
5073
|
+
}) : ""
|
|
5074
|
+
]
|
|
5075
|
+
})
|
|
5076
|
+
})
|
|
5077
|
+
]
|
|
5078
|
+
}, item.id)
|
|
5079
|
+
]
|
|
5080
|
+
});
|
|
5081
|
+
}
|
|
5082
|
+
return li;
|
|
5083
|
+
})
|
|
5084
|
+
});
|
|
5085
|
+
// } else {
|
|
5086
|
+
// return "";
|
|
5087
|
+
// }
|
|
5089
5088
|
};
|
|
5090
5089
|
//渲染相关操作按钮 header == 1 ai ,== 2 知识库
|
|
5091
5090
|
var renderOperateBtn = function(item, isAiChatWindow, i) {
|