bhd-components 0.6.1 → 0.6.3

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.
Files changed (39) hide show
  1. package/dist/{ab2a98d6.esm.es5.development.js → a0cd97b9.esm.es5.development.js} +1 -1
  2. package/dist/{b8edd934.esm.es5.production.js → e88a10a0.esm.es5.production.js} +1 -1
  3. package/dist/index.esm.es5.development.css +1711 -827
  4. package/dist/index.esm.es5.development.js +515 -384
  5. package/dist/index.esm.es5.production.css +1 -1
  6. package/dist/index.esm.es5.production.js +1 -1
  7. package/es2017/bhdSelect/index.d.ts +3 -0
  8. package/es2017/bhdSelect/index.js +18 -13
  9. package/es2017/bhdSelect/index.module.less +4 -1
  10. package/es2017/customerService/{contactsList/index.js → contactsList.js} +92 -77
  11. package/es2017/customerService/function.d.ts +1 -1
  12. package/es2017/customerService/function.js +10 -2
  13. package/es2017/customerService/{historyFun/index.d.ts → historyFun.d.ts} +0 -1
  14. package/es2017/customerService/{historyFun/index.js → historyFun.js} +62 -16
  15. package/es2017/customerService/index.d.ts +3 -3
  16. package/es2017/customerService/index.js +144 -81
  17. package/es2017/customerService/index.module.less +496 -5
  18. package/es2017/customerService/index2.module.less +1282 -0
  19. package/es2017/typings.d.ts +12 -0
  20. package/esm/bhdSelect/index.d.ts +3 -0
  21. package/esm/bhdSelect/index.js +18 -13
  22. package/esm/bhdSelect/index.module.less +4 -1
  23. package/esm/customerService/{contactsList/index.js → contactsList.js} +83 -66
  24. package/esm/customerService/function.d.ts +1 -1
  25. package/esm/customerService/function.js +10 -1
  26. package/esm/customerService/{historyFun/index.d.ts → historyFun.d.ts} +0 -1
  27. package/esm/customerService/{historyFun/index.js → historyFun.js} +64 -17
  28. package/esm/customerService/index.d.ts +3 -3
  29. package/esm/customerService/index.js +176 -111
  30. package/esm/customerService/index.module.less +496 -5
  31. package/esm/customerService/index2.module.less +1282 -0
  32. package/esm/typings.d.ts +12 -0
  33. package/package.json +1 -1
  34. package/es2017/customerService/contactsList/index.module.less +0 -206
  35. package/es2017/customerService/historyFun/index.module.less +0 -223
  36. package/esm/customerService/contactsList/index.module.less +0 -206
  37. package/esm/customerService/historyFun/index.module.less +0 -223
  38. /package/es2017/customerService/{contactsList/index.d.ts → contactsList.d.ts} +0 -0
  39. /package/esm/customerService/{contactsList/index.d.ts → contactsList.d.ts} +0 -0
@@ -1,14 +1,18 @@
1
- /* eslint-disable import/first */ import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
1
+ import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
2
2
  import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
3
3
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "@ice/jsx-runtime/jsx-runtime";
4
4
  import React, { useEffect, useState, useRef } from "react";
5
5
  import { Modal, Drawer, Input, Tooltip } from "antd";
6
- import styles from "./index.module.less";
7
- // const inOnline = process.env.NODE_TYPE === "online";
6
+ import cssStyle from "./index.module.less";
7
+ import cssStyleOnline from "./index2.module.less";
8
+ let styles = cssStyle;
9
+ if (false) {
10
+ styles = cssStyleOnline;
11
+ }
8
12
  import { CustomAiIcon, CustomRecord, CustomFullScreen, CustomExitFullScreen, CustomReloading, CustomCopy, CustomLike, CustomDislike, CustomQuote, CustomSending, CustomContacts, CustomDuihao, CustomSoundRecording, CustomRoundClose } from "../icons/index";
9
- import { CloseOutlined } from "@ant-design/icons";
10
- import HistoryFun from "./historyFun/index";
11
- import ContactsList from "./contactsList/index";
13
+ import { CloseOutlined, RightOutlined } from "@ant-design/icons";
14
+ import HistoryFun from "./historyFun";
15
+ import ContactsList from "./contactsList";
12
16
  import { parseDate } from "../utils/Date";
13
17
  import { Remarkable } from "remarkable";
14
18
  import hljs from "highlight.js";
@@ -21,7 +25,6 @@ import { useMediaRecorder } from "./useMediaRecorder"; //录音使用文件
21
25
  import { readMessage, getByteLen, serverUrl, copyText, getDataTime } from "./function"; //一些方法
22
26
  const CustomerService = (props)=>{
23
27
  let { userData , http , urllocation , onCancel , serverName , fetchEventSource , initShowType , onEvent , stepIds , stepId } = props;
24
- const [mid, setmid] = useState(props.userData.mid); //当前用户id
25
28
  const { bese64String , startRecord , stopRecord } = useMediaRecorder(); //语音转文字
26
29
  const [voiceRecordingStatus, setVoiceRecordingStatus] = useState(3); //语音录制状态 3,语音识别完成 2,录制中, 1,录制结束
27
30
  const [copyTextOBJ, setCopyTextObj] = useState([]); //复制的消息id
@@ -57,6 +60,8 @@ const CustomerService = (props)=>{
57
60
  let roomMessage = useRef(null); //循环当前页面的新消息
58
61
  const ctrl = useRef(); //停止生成ai回答时使用
59
62
  let childRef = useRef(null); //获取子组件方法
63
+ // const [mid, setmid] = useState(props.userData.mid); //当前用户id
64
+ const mid = props.userData.mid;
60
65
  const remarkable = new Remarkable({
61
66
  highlight: function(str, lang) {
62
67
  if (lang && hljs.getLanguage(lang)) {
@@ -90,34 +95,36 @@ const CustomerService = (props)=>{
90
95
  const container = document.getElementById(showType == 1 || showType == 3 ? "chat_content" : "chat_content_modal");
91
96
  const scrollTop = container.scrollTop;
92
97
  // const scrollBottom = container.scroll;
93
- // console.log(container,'sdcsdcsdcsdc');
94
- container.onscroll = (e)=>{
95
- //元素内部页面滚动到达底部
96
- if (e.target.clientHeight + e.target.scrollTop >= e.target.scrollHeight) {
97
- //console.log('元素内部页面滚动到达底部');
98
- if (pageNumHistory > 1) {
99
- console.log(pageNumHistory, 'pageNumpageNumpageNum');
100
- let number = pageNumHistory - 1;
101
- // setPageNum((pageNum) => {
102
- // return pageNum - 1;
103
- // });
104
- setPageNumHistory(number);
105
- clearTimeout(listTimer.current);
106
- setBottomLoading(true);
107
- listTimer.current = setTimeout(()=>{
108
- console.log("加载下一页", number);
109
- getHistoryMessage(number, 4);
110
- }, 1000);
111
- }
98
+ const clientHeight = container.clientHeight;
99
+ const scrollHeight = container.scrollHeight;
100
+ // console.log(scrollTop,clientHeight,scrollHeight,'333dfkvmdfv')
101
+ if (clientHeight + scrollTop + 0.5 >= scrollHeight) {
102
+ console.log('到底部了22222');
103
+ // console.log(11111111,pageNumHistory)
104
+ if (pageNumHistory > 1) {
105
+ // console.log(pageNumHistory,'pageNumpageNumpageNum')
106
+ let number = pageNumHistory - 1;
107
+ setPageNumHistory(number);
108
+ clearTimeout(listTimer.current);
109
+ setBottomLoading(true);
110
+ listTimer.current = setTimeout(()=>{
111
+ // console.log("加载下一页", number);
112
+ getHistoryMessage(number, 4);
113
+ }, 1000);
114
+ } else {
115
+ setLastId('');
112
116
  }
113
- };
117
+ }
114
118
  if (scrollTop == 0 && pageCount > pageNum && pageCount > 0) {
119
+ console.log('到顶了', pageNum);
120
+ // if(pageNum == 1){
121
+ // setFirstpage(true);//代表是否存在第一页
122
+ // }
115
123
  setLoading(true);
116
124
  let number = pageNum + 1;
117
125
  setPageNum((pageNum)=>{
118
126
  return pageNum + 1;
119
127
  });
120
- clearTimeout(listTimer.current);
121
128
  listTimer.current = setTimeout(()=>{
122
129
  console.log("下拉加载下一页", number);
123
130
  getHistoryMessage(number, 2);
@@ -398,19 +405,23 @@ const CustomerService = (props)=>{
398
405
  }
399
406
  }).then((res)=>{
400
407
  if (res.data.id) {
401
- setHistoryMessageList((historyMessageList)=>{
402
- let newHistoryMessageList = historyMessageList.concat(_object_spread_props(_object_spread({}, obj), {
403
- id: res.data.id,
404
- upvoted: false,
405
- downvoted: false,
406
- createdAt: getDataTime(-1)
407
- }));
408
- return newHistoryMessageList;
409
- });
410
- scrollToBottom();
411
- //记录一个问题id,用于记录老师和学生之间的聊天保存到实验报告中
412
- // if(stepIds != undefined && stepIds != '' && (showType == 3 || showType == 4)){
413
- // setChatObj({'roomId':roomId,'id':res.data.id});
408
+ console.log(pageNum, pageNumHistory, lastId, 'dlskskdsd4444');
409
+ if (pageNum == 1 || pageNumHistory == 1 || pageNumHistory == 0) {
410
+ setHistoryMessageList((historyMessageList)=>{
411
+ let newHistoryMessageList = historyMessageList.concat(_object_spread_props(_object_spread({}, obj), {
412
+ id: res.data.id,
413
+ upvoted: false,
414
+ downvoted: false,
415
+ createdAt: getDataTime(-1)
416
+ }));
417
+ return newHistoryMessageList;
418
+ });
419
+ if (!lastId) {
420
+ setTimeout(()=>{
421
+ scrollToBottom();
422
+ }, 100);
423
+ }
424
+ }
414
425
  //判断当前窗口是否是
415
426
  if (type == 1) {
416
427
  let roomList = [
@@ -424,7 +435,6 @@ const CustomerService = (props)=>{
424
435
  return list2.concat(roomList);
425
436
  });
426
437
  }
427
- // }
428
438
  }
429
439
  }).catch((err)=>{
430
440
  console.log(err);
@@ -864,6 +874,7 @@ const CustomerService = (props)=>{
864
874
  //获取历史消息 flag:1,历史记录点击定位,2,代表是上拉加载,3,存在新的消息-->老师回答等,4,下拉加载,滚动到底部时,主要用于查看历史记录
865
875
  const getHistoryMessage = (pageNum, flag, id = "1")=>{
866
876
  clearTimeout(roomMessage.current);
877
+ console.log(pageNum, flag, 'dkfjvndfjvndfkvdf');
867
878
  // flag == 1 时已经设置好了位置标记
868
879
  let last_id = "";
869
880
  if (flag == 2 && historyMessageList.length > 0) {
@@ -963,7 +974,7 @@ const CustomerService = (props)=>{
963
974
  //不是ai窗口循环查询消息
964
975
  let chatWindow = roomList.filter((item)=>item.roomId == rid);
965
976
  let isAiChatWindow = chatWindow.length > 0 && chatWindow[0].sender != undefined && chatWindow[0].sender == 'AI' ? true : false;
966
- if (!isAiChatWindow && roomList.length > 0) {
977
+ if (!isAiChatWindow && roomList.length > 0 && (pageNum == 1 || pageNumHistory == 0)) {
967
978
  getRoomidHistoryMessage(totalNumber, rid);
968
979
  }
969
980
  }).catch((res)=>{
@@ -982,7 +993,7 @@ const CustomerService = (props)=>{
982
993
  params: {
983
994
  roomId: rid,
984
995
  page: 1,
985
- maxPageSize: totalNumber < 30 ? 30 : totalNumber + 10,
996
+ maxPageSize: totalNumber,
986
997
  direction: "desc"
987
998
  },
988
999
  headers: {
@@ -993,15 +1004,22 @@ const CustomerService = (props)=>{
993
1004
  let newHistoryMessageList = [];
994
1005
  if (res.data.messages.length > 0) {
995
1006
  let dataList = res.data.messages.reverse();
1007
+ let originList = 0;
1008
+ let newList = 0;
996
1009
  setHistoryMessageList((historyMessageList)=>{
997
- newHistoryMessageList = dataList;
1010
+ originList = historyMessageList.length;
1011
+ newHistoryMessageList = historyMessageList.concat(dataList);
998
1012
  //去重
999
1013
  let res = new Map();
1000
1014
  newHistoryMessageList = newHistoryMessageList.filter((a)=>!res.has(a.id) && res.set(a.id, 1));
1015
+ newList = newHistoryMessageList.length;
1001
1016
  return newHistoryMessageList;
1002
1017
  });
1003
- if (dataList.length > totalNumber) {
1004
- scrollToBottom();
1018
+ console.log(dataList.length, originList, lastId, 'dfkvdnfkvdfj44444');
1019
+ if (!lastId && originList != newList) {
1020
+ setTimeout(()=>{
1021
+ scrollToBottom();
1022
+ }, 100);
1005
1023
  }
1006
1024
  }
1007
1025
  try {
@@ -1059,7 +1077,7 @@ const CustomerService = (props)=>{
1059
1077
  });
1060
1078
  console.log(result, '存储的消息');
1061
1079
  result.map((item)=>{
1062
- testLabQuestion(item.question, item.answer, item.id);
1080
+ testLabQuestion(item.question, item.answer, String(item.id));
1063
1081
  });
1064
1082
  }
1065
1083
  }
@@ -1212,7 +1230,7 @@ const CustomerService = (props)=>{
1212
1230
  //渲染头部
1213
1231
  const renderHeader = ()=>{
1214
1232
  let list = roomList.filter((e)=>e.roomId == roomId);
1215
- let title = '智能回答';
1233
+ let title = '智能问答';
1216
1234
  if (list.length > 0 && list[0].name) {
1217
1235
  title = list[0].name;
1218
1236
  }
@@ -1263,6 +1281,7 @@ const CustomerService = (props)=>{
1263
1281
  ]
1264
1282
  });
1265
1283
  } else {
1284
+ // console.log(roomList,'777668888900')
1266
1285
  return /*#__PURE__*/ _jsxs("div", {
1267
1286
  className: styles.top,
1268
1287
  children: [
@@ -1273,7 +1292,7 @@ const CustomerService = (props)=>{
1273
1292
  showType == 1 && /*#__PURE__*/ _jsxs("i", {
1274
1293
  className: "lianxiren21",
1275
1294
  onClick: ()=>{
1276
- setShowContacts(true);
1295
+ setShowContacts(!showContacts);
1277
1296
  },
1278
1297
  children: [
1279
1298
  /*#__PURE__*/ _jsx(CustomContacts, {}),
@@ -1294,6 +1313,7 @@ const CustomerService = (props)=>{
1294
1313
  className: "_lishixiao22",
1295
1314
  onClick: ()=>{
1296
1315
  setShowHistory(true);
1316
+ onEvent(serverName + serverUrl(), "click_智能问答_历史记录", "提交");
1297
1317
  },
1298
1318
  children: /*#__PURE__*/ _jsx(CustomRecord, {})
1299
1319
  }),
@@ -1473,9 +1493,10 @@ const CustomerService = (props)=>{
1473
1493
  title: item.quotedMessage,
1474
1494
  placement: "leftTop",
1475
1495
  children: /*#__PURE__*/ _jsxs("p", {
1496
+ className: styles.text_exceed,
1476
1497
  children: [
1477
1498
  item.quotedMessage,
1478
- ">"
1499
+ /*#__PURE__*/ _jsx(RightOutlined, {})
1479
1500
  ]
1480
1501
  })
1481
1502
  }) : /*#__PURE__*/ _jsx("p", {
@@ -1575,11 +1596,12 @@ const CustomerService = (props)=>{
1575
1596
  children: getByteLen(item.quotedMessage) > 120 ? /*#__PURE__*/ _jsx(Tooltip, {
1576
1597
  overlayClassName: styles.popover_main_content,
1577
1598
  title: item.quotedMessage,
1578
- placement: "leftTop",
1599
+ placement: "rightTop",
1579
1600
  children: /*#__PURE__*/ _jsxs("p", {
1601
+ className: styles.text_exceed,
1580
1602
  children: [
1581
1603
  item.quotedMessage,
1582
- ">"
1604
+ /*#__PURE__*/ _jsx(RightOutlined, {})
1583
1605
  ]
1584
1606
  })
1585
1607
  }) : /*#__PURE__*/ _jsx("p", {
@@ -1620,7 +1642,7 @@ const CustomerService = (props)=>{
1620
1642
  return "";
1621
1643
  }
1622
1644
  };
1623
- //渲染相关操作按钮
1645
+ //渲染相关操作按钮 header == 1 ai ,== 2 知识库
1624
1646
  const renderOperateBtn = (item, isAiChatWindow, i)=>{
1625
1647
  //问候语及点赞下面不需要展示相关按钮
1626
1648
  let extraInfo = item.extraInfo;
@@ -1648,7 +1670,13 @@ const CustomerService = (props)=>{
1648
1670
  recevier: mid,
1649
1671
  message: "请告诉我您要召唤的老师名字",
1650
1672
  createdAt: getDataTime(-1),
1651
- findTeacher: true
1673
+ findTeacher: true,
1674
+ extraInfo: item.extraInfo == null ? null : JSON.stringify([
1675
+ {
1676
+ key: "questionId",
1677
+ value: "questionId"
1678
+ }
1679
+ ])
1652
1680
  });
1653
1681
  return newHistoryMessageList;
1654
1682
  });
@@ -1704,7 +1732,7 @@ const CustomerService = (props)=>{
1704
1732
  if (!isAiChatWindow) return;
1705
1733
  //只有最后一条回答,支持发送点赞或踩
1706
1734
  if (!item.upvoted && (historyMessageList.length == i + 1 || historyMessageList.length - 2 == i)) {
1707
- console.log("判断是AI还是智能回答", item);
1735
+ console.log("判断是AI还是智能问答", item);
1708
1736
  if (!item.extraInfo && item.sender == "AI") {
1709
1737
  aiSendQuestions(1, {
1710
1738
  roomId: roomId,
@@ -1815,7 +1843,7 @@ const CustomerService = (props)=>{
1815
1843
  ]
1816
1844
  }),
1817
1845
  //在ai窗口并ai已经生成完答案
1818
- findTeacherBtn && /*#__PURE__*/ _jsx("span", {
1846
+ findTeacherBtn && userData.modules.some((item)=>item.short == "TeacherAnswer") && /*#__PURE__*/ _jsx("span", {
1819
1847
  className: styles.find_teacher,
1820
1848
  onClick: ()=>{
1821
1849
  setAnswerMode(1);
@@ -1823,6 +1851,8 @@ const CustomerService = (props)=>{
1823
1851
  question: historyMessageList[i - 1].message,
1824
1852
  user: problem.user
1825
1853
  });
1854
+ console.log(item, '88888999999');
1855
+ // if(item.extraInfo == null){
1826
1856
  setHistoryMessageList((historyMessageList)=>{
1827
1857
  let newHistoryMessageList = historyMessageList.concat({
1828
1858
  id: -1,
@@ -1831,10 +1861,40 @@ const CustomerService = (props)=>{
1831
1861
  recevier: mid,
1832
1862
  message: "请告诉我您要召唤的老师名字",
1833
1863
  createdAt: getDataTime(-1),
1834
- findTeacher: true
1864
+ findTeacher: true,
1865
+ extraInfo: item.extraInfo == null ? null : JSON.stringify([
1866
+ {
1867
+ key: "questionId",
1868
+ value: "questionId"
1869
+ }
1870
+ ])
1835
1871
  });
1836
1872
  return newHistoryMessageList;
1837
1873
  });
1874
+ // }else{
1875
+ // setHistoryMessageList(
1876
+ // (historyMessageList) => {
1877
+ // let newHistoryMessageList =
1878
+ // historyMessageList.concat({
1879
+ // id: -1,
1880
+ // roomId: roomId,
1881
+ // sender: "AI",
1882
+ // recevier: mid,
1883
+ // message:
1884
+ // "请告诉我您要召唤的老师名字",
1885
+ // createdAt: getDataTime(-1),
1886
+ // findTeacher:true,
1887
+ // extraInfo: JSON.stringify([
1888
+ // {
1889
+ // key: "questionId",
1890
+ // value: "questionId",
1891
+ // },
1892
+ // ])
1893
+ // });
1894
+ // return newHistoryMessageList;
1895
+ // }
1896
+ // );
1897
+ // }
1838
1898
  setTimeout(()=>{
1839
1899
  scrollToBottom();
1840
1900
  }, 200);
@@ -1905,7 +1965,7 @@ const CustomerService = (props)=>{
1905
1965
  if (!isAiChatWindow) return;
1906
1966
  //只有最后一条回答,支持发送点赞或踩
1907
1967
  if (!item.upvoted && (historyMessageList.length == i + 1 || historyMessageList.length - 2 == i)) {
1908
- console.log("判断是AI还是智能回答", item);
1968
+ console.log("判断是AI还是智能问答", item);
1909
1969
  if (!item.extraInfo && item.sender == "AI") {
1910
1970
  aiSendQuestions(1, {
1911
1971
  roomId: roomId,
@@ -1958,7 +2018,7 @@ const CustomerService = (props)=>{
1958
2018
  let placeholder = "";
1959
2019
  let disabled = false;
1960
2020
  if (voiceRecordingStatus == 2) {
1961
- placeholder = "录制中...";
2021
+ placeholder = "语音录制中,请说话...";
1962
2022
  } else if (voiceRecordingStatus == 1) {
1963
2023
  placeholder = "正在语音识别文字,请稍后...";
1964
2024
  } else if (!finished) {
@@ -2016,7 +2076,7 @@ const CustomerService = (props)=>{
2016
2076
  if (roomList.length > 0 && roomList[0].roomId != roomId) {
2017
2077
  sendToTeacher(2);
2018
2078
  } else {
2019
- sendMessage();
2079
+ sendMessage('', 0);
2020
2080
  }
2021
2081
  setButtomHei(45);
2022
2082
  } else {
@@ -2101,7 +2161,7 @@ const CustomerService = (props)=>{
2101
2161
  if (roomList.length > 0 && roomList[0].roomId != roomId) {
2102
2162
  sendToTeacher(2);
2103
2163
  } else {
2104
- sendMessage();
2164
+ sendMessage('', 0);
2105
2165
  }
2106
2166
  onEvent(serverName + serverUrl(), "click_智能问答_ Enter", "提交");
2107
2167
  }
@@ -2118,7 +2178,7 @@ const CustomerService = (props)=>{
2118
2178
  return /*#__PURE__*/ _jsx("div", {
2119
2179
  className: `${styles.issues_list} ${styles.issues_list_teacherList}`,
2120
2180
  style: {
2121
- bottom: `${buttomHei + 6}px`
2181
+ bottom: `${buttomHei + 14}px`
2122
2182
  },
2123
2183
  children: teacherList.map((item)=>{
2124
2184
  let span = item.name.replaceAll(keyWord, ()=>{
@@ -2188,10 +2248,6 @@ const CustomerService = (props)=>{
2188
2248
  if (page != 1) {
2189
2249
  setPageNumHistory(page);
2190
2250
  }
2191
- createRooms(receiver);
2192
- if (childRef.current) {
2193
- childRef.current.roomsListTimer();
2194
- }
2195
2251
  setPageNum(page);
2196
2252
  setLastId(id); //用于定位
2197
2253
  //如果是当前聊天室
@@ -2199,12 +2255,20 @@ const CustomerService = (props)=>{
2199
2255
  getHistoryMessage(page, 1);
2200
2256
  } else {
2201
2257
  setRoomId(renewRoomId);
2258
+ if (childRef.current) {
2259
+ if (receiver != mid) {
2260
+ createRooms(receiver);
2261
+ }
2262
+ setTimeout(()=>{
2263
+ childRef.current.roomsListTimer();
2264
+ }, 500);
2265
+ }
2202
2266
  }
2203
2267
  };
2204
2268
  return /*#__PURE__*/ _jsxs(_Fragment, {
2205
2269
  children: [
2206
2270
  /*#__PURE__*/ _jsxs(Drawer, {
2207
- title: "智能回答",
2271
+ title: "智能问答",
2208
2272
  width: 560,
2209
2273
  onClose: ()=>{
2210
2274
  onCancel();
@@ -2283,13 +2347,12 @@ const CustomerService = (props)=>{
2283
2347
  onClose: ()=>{
2284
2348
  setShowHistory(false);
2285
2349
  },
2286
- loadSpecifiedData: loadSpecifiedData,
2287
- roomList: roomList
2350
+ loadSpecifiedData: loadSpecifiedData
2288
2351
  })
2289
2352
  ]
2290
2353
  }),
2291
2354
  /*#__PURE__*/ _jsxs(Modal, {
2292
- title: "智能回答",
2355
+ title: "智能问答",
2293
2356
  open: showType == 2 ? true : false,
2294
2357
  onCancel: ()=>{
2295
2358
  onCancel();
@@ -2297,6 +2360,7 @@ const CustomerService = (props)=>{
2297
2360
  },
2298
2361
  centered: true,
2299
2362
  width: window.innerWidth - 252 > 1214 ? window.innerWidth - 252 : 1214,
2363
+ // @ts-ignore
2300
2364
  height: window.innerHeight - 160,
2301
2365
  wrapClassName: styles.ChatWindow_Modal,
2302
2366
  footer: false,
@@ -2365,8 +2429,7 @@ const CustomerService = (props)=>{
2365
2429
  onClose: ()=>{
2366
2430
  setShowHistory(false);
2367
2431
  },
2368
- loadSpecifiedData: loadSpecifiedData,
2369
- roomList: roomList
2432
+ loadSpecifiedData: loadSpecifiedData
2370
2433
  })
2371
2434
  ]
2372
2435
  })
@@ -2384,7 +2447,7 @@ const CustomerService = (props)=>{
2384
2447
  /*#__PURE__*/ _jsx("div", {
2385
2448
  className: styles.user,
2386
2449
  children: /*#__PURE__*/ _jsx("p", {
2387
- children: roomList.filter((e)=>e.roomId == roomId).length > 0 && roomList.filter((e)=>e.roomId == roomId)[0].name != undefined ? roomList.filter((e)=>e.roomId == roomId)[0].name : '智能回答'
2450
+ children: roomList.filter((e)=>e.roomId == roomId).length > 0 && roomList.filter((e)=>e.roomId == roomId)[0].name != undefined ? roomList.filter((e)=>e.roomId == roomId)[0].name : '智能问答'
2388
2451
  })
2389
2452
  }),
2390
2453
  /*#__PURE__*/ _jsxs("div", {
@@ -2393,6 +2456,7 @@ const CustomerService = (props)=>{
2393
2456
  /*#__PURE__*/ _jsx("i", {
2394
2457
  onClick: ()=>{
2395
2458
  setShowHistory(true);
2459
+ onEvent(serverName + serverUrl(), "click_智能问答_历史记录", "提交");
2396
2460
  },
2397
2461
  children: /*#__PURE__*/ _jsx(CustomRecord, {})
2398
2462
  }),
@@ -2411,7 +2475,7 @@ const CustomerService = (props)=>{
2411
2475
  /*#__PURE__*/ _jsx("i", {
2412
2476
  className: "lianxiren21",
2413
2477
  onClick: ()=>{
2414
- setShowContacts(true);
2478
+ setShowContacts(!showContacts);
2415
2479
  },
2416
2480
  children: /*#__PURE__*/ _jsx(CustomContacts, {})
2417
2481
  })
@@ -2457,8 +2521,7 @@ const CustomerService = (props)=>{
2457
2521
  onClose: ()=>{
2458
2522
  setShowHistory(false);
2459
2523
  },
2460
- loadSpecifiedData: loadSpecifiedData,
2461
- roomList: roomList
2524
+ loadSpecifiedData: loadSpecifiedData
2462
2525
  }),
2463
2526
  showType == 3 && /*#__PURE__*/ _jsx("div", {
2464
2527
  style: {
@@ -2483,7 +2546,7 @@ const CustomerService = (props)=>{
2483
2546
  showType == 4 && /*#__PURE__*/ _jsxs(_Fragment, {
2484
2547
  children: [
2485
2548
  /*#__PURE__*/ _jsxs(Modal, {
2486
- title: "智能回答",
2549
+ title: "智能问答",
2487
2550
  open: true,
2488
2551
  onCancel: ()=>{
2489
2552
  onCancel();
@@ -2491,6 +2554,7 @@ const CustomerService = (props)=>{
2491
2554
  },
2492
2555
  centered: true,
2493
2556
  width: window.innerWidth - 252 > 1214 ? window.innerWidth - 252 : 1214,
2557
+ // @ts-ignore
2494
2558
  height: window.innerHeight - 160,
2495
2559
  wrapClassName: `${styles.ChatWindow_Modal}`,
2496
2560
  footer: false,
@@ -2559,8 +2623,7 @@ const CustomerService = (props)=>{
2559
2623
  onClose: ()=>{
2560
2624
  setShowHistory(false);
2561
2625
  },
2562
- loadSpecifiedData: loadSpecifiedData,
2563
- roomList: roomList
2626
+ loadSpecifiedData: loadSpecifiedData
2564
2627
  })
2565
2628
  ]
2566
2629
  })
@@ -2578,7 +2641,7 @@ const CustomerService = (props)=>{
2578
2641
  /*#__PURE__*/ _jsx("div", {
2579
2642
  className: styles.user,
2580
2643
  children: /*#__PURE__*/ _jsx("p", {
2581
- children: roomList.filter((e)=>e.roomId == roomId).length > 0 && !roomList.filter((e)=>e.roomId == roomId)[0].name ? roomList.filter((e)=>e.roomId == roomId)[0].name : '智能回答'
2644
+ children: roomList.filter((e)=>e.roomId == roomId).length > 0 && !roomList.filter((e)=>e.roomId == roomId)[0].name ? roomList.filter((e)=>e.roomId == roomId)[0].name : '智能问答'
2582
2645
  })
2583
2646
  }),
2584
2647
  /*#__PURE__*/ _jsxs("div", {