bhd-components 0.7.5 → 0.7.7

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.
@@ -62,6 +62,7 @@ const CustomerService = (props)=>{
62
62
  const [viewBase64, setViewBase64] = useState(""); //图片预览
63
63
  const [visible, setVisible] = useState(false); //是否显示图片预览
64
64
  const [bottomRecommendationQuestions, setBottomRecommendationQuestions] = useState([]); //底部推荐问题
65
+ const [saveShowType, setSaveShowType] = useState(-1); //保存截图时的状态
65
66
  const timer = useRef(null); //文本框输入时
66
67
  let receiveMessageTimer = useRef(null); //接收ai发回的消息
67
68
  // let voiceCountdownTimer = useRef(null); //语音录制倒计时
@@ -88,23 +89,29 @@ const CustomerService = (props)=>{
88
89
  }
89
90
  });
90
91
  useEffect(()=>{
91
- console.log(showType, 'showTypeshowTypeshowType');
92
92
  if (showType == 5) {
93
- //document.querySelector("#__docusaurus")
94
- setTimeout(()=>{
95
- html2canvas(document.getElementsByTagName('body')[0], {
96
- allowTaint: true,
97
- useCORS: true,
98
- scale: 1 // 图片比例
99
- }).then(function(canvas) {
100
- document.body.appendChild(canvas);
101
- var base64URL = canvas.toDataURL('image/jpeg');
102
- var image = new Image();
103
- image.src = base64URL; // 将'your_image_url'替换为你自己的图片URL
104
- console.log(base64URL);
105
- setImgBese64(base64URL);
106
- });
107
- }, 1000);
93
+ setImgBese64('');
94
+ html2canvas(document.getElementsByTagName('html')[0]).then((canvas)=>{
95
+ console.log(canvas, 22222);
96
+ setTimeout(()=>{
97
+ let dom = document.getElementById("container_html5_api");
98
+ // let dom = document.getElementById("__docusaurus");
99
+ html2canvas(dom, {
100
+ backgroundColor: null,
101
+ useCORS: true,
102
+ allowTaint: true,
103
+ scale: 1,
104
+ logging: false
105
+ }).then(function(canvas) {
106
+ // document.body.appendChild(canvas);
107
+ console.log(canvas, 4444444);
108
+ // var base64URL = canvas.toDataURL('image/jpeg')
109
+ // let base64URL=canvas.toDataURL("image/jpg", 1.0)
110
+ let base64URL = canvas.toDataURL("image/png");
111
+ setImgBese64(base64URL);
112
+ });
113
+ }, 100);
114
+ });
108
115
  }
109
116
  if (showType != 1 && !firstLoad && pageCount > 0) {
110
117
  setFirstLoad(true);
@@ -511,7 +518,7 @@ const CustomerService = (props)=>{
511
518
  };
512
519
  //发送知识库问题 item,flag == 1 是获取问候信息的答案,flag == 2 是普通消息,flag == 3 是针对视频页面点击底部推荐问题
513
520
  const sendMessage = (item, flag)=>{
514
- console.log(item, flag, 888888888);
521
+ // console.log(item,flag,888888888);
515
522
  let questions = [];
516
523
  if (item && flag) {
517
524
  questions = [
@@ -683,7 +690,6 @@ const CustomerService = (props)=>{
683
690
  setTimeout(()=>{
684
691
  setQuestionsList([]);
685
692
  }, 2000);
686
- // console.log(pageNumHistory,44444444444444);
687
693
  //占位信息
688
694
  if (pageNumHistory <= 1) {
689
695
  setHistoryMessageList((historyMessageList)=>{
@@ -723,8 +729,8 @@ const CustomerService = (props)=>{
723
729
  headers: {
724
730
  "Content-Type": "application/json",
725
731
  Accept: "text/event-stream,application/json",
726
- // "X-Auth-Jwt": window.localStorage.getItem("usertoken") || "",
727
- "X-Auth-Jwt": sessionStorage.getItem('jwt') || "",
732
+ "X-Auth-Jwt": window.localStorage.getItem("usertoken") || "",
733
+ // "X-Auth-Jwt": sessionStorage.getItem('jwt') || "",
728
734
  "Auth-Token": userData.token,
729
735
  "X-Module-Id": userData.modules.find((ele)=>ele.short == "IntelligentCustomerService").id
730
736
  },
@@ -924,7 +930,7 @@ const CustomerService = (props)=>{
924
930
  //获取历史消息 flag:1,历史记录点击定位,2,代表是上拉加载,3,存在新的消息-->老师回答等,4,下拉加载,滚动到底部时,主要用于查看历史记录
925
931
  const getHistoryMessage = (pageNum, flag, id = "1", raw_data = [])=>{
926
932
  clearTimeout(roomMessage.current);
927
- console.log(pageNum, flag, 'dkfjvndfjvndfkvdf');
933
+ // console.log(pageNum,flag,'dkfjvndfjvndfkvdf')
928
934
  // flag == 1 时已经设置好了位置标记
929
935
  let last_id = "";
930
936
  if (flag == 2 && historyMessageList.length > 0) {
@@ -1201,7 +1207,7 @@ const CustomerService = (props)=>{
1201
1207
  page: 1,
1202
1208
  maxPageSize: 4,
1203
1209
  question: value,
1204
- sectionId: getQuery('s_id') || 325569
1210
+ sectionId: getQuery('s_id')
1205
1211
  };
1206
1212
  } else if (flag == 4) {
1207
1213
  data = {
@@ -1246,14 +1252,13 @@ const CustomerService = (props)=>{
1246
1252
  console.log(props, 3333333);
1247
1253
  let config = props.config;
1248
1254
  if (config && config.type == 'video' && config.params) {
1249
- console.log('请求接口2222', config);
1250
1255
  let params = config.params;
1251
- let videoId = params.videoPageData.videoId;
1252
- let watchTime = params.videoPageData.videoProgress;
1253
- let courseId = getQuery('yc_id') || 10;
1254
- let sectionId = getQuery('s_id') || 20;
1256
+ let videoId = params.videoId;
1257
+ let watchTime = params.videoProgress;
1258
+ let courseId = getQuery('yc_id');
1259
+ let sectionId = getQuery('s_id');
1255
1260
  if (videoId && watchTime && courseId && sectionId) {
1256
- console.log('请求接口2222');
1261
+ console.log('请求接口2222', config);
1257
1262
  http.post(`${urllocation}/chat-service/public/v1.0/knowledge-base/questions:recommend`, {
1258
1263
  "recommendedQuestions": flag == 2 ? recommendeQuestionID.current : [
1259
1264
  ''
@@ -1480,21 +1485,35 @@ const CustomerService = (props)=>{
1480
1485
  /*#__PURE__*/ _jsx("span", {
1481
1486
  className: styles.line
1482
1487
  }),
1483
- /*#__PURE__*/ _jsx("i", {
1488
+ /*#__PURE__*/ _jsxs("i", {
1489
+ className: styles.popover_main,
1484
1490
  onClick: ()=>{
1485
1491
  onEvent(serverName + serverUrl(), "click_智能问答_退出全屏", "提交");
1486
1492
  setFirstLoad(false); //重启滚动条在最上方
1487
1493
  setShowType(3);
1488
1494
  },
1489
- children: /*#__PURE__*/ _jsx(CustomExitFullScreen, {})
1495
+ children: [
1496
+ /*#__PURE__*/ _jsx(CustomExitFullScreen, {}),
1497
+ /*#__PURE__*/ _jsx("span", {
1498
+ className: styles.popover,
1499
+ children: "退出全屏"
1500
+ })
1501
+ ]
1490
1502
  }),
1491
- /*#__PURE__*/ _jsx("i", {
1503
+ /*#__PURE__*/ _jsxs("i", {
1504
+ className: styles.popover_main,
1492
1505
  onClick: ()=>{
1493
1506
  onEvent(serverName + serverUrl(), "click_智能问答_退出全屏", "提交");
1494
1507
  setShowType(3);
1495
1508
  setFirstLoad(false); //重启滚动条在最上方
1496
1509
  },
1497
- children: /*#__PURE__*/ _jsx(CloseOutlined, {})
1510
+ children: [
1511
+ /*#__PURE__*/ _jsx(CloseOutlined, {}),
1512
+ /*#__PURE__*/ _jsx("span", {
1513
+ className: styles.popover,
1514
+ children: "退出全屏"
1515
+ })
1516
+ ]
1498
1517
  })
1499
1518
  ]
1500
1519
  })
@@ -1543,7 +1562,8 @@ const CustomerService = (props)=>{
1543
1562
  /*#__PURE__*/ _jsx("span", {
1544
1563
  className: styles.line
1545
1564
  }),
1546
- showType == 1 ? /*#__PURE__*/ _jsx("i", {
1565
+ showType == 1 ? /*#__PURE__*/ _jsxs("i", {
1566
+ className: styles.popover_main,
1547
1567
  onClick: ()=>{
1548
1568
  onEvent(serverName + serverUrl(), "click_智能问答_全屏", "提交");
1549
1569
  // switchDialogBox(3, true);
@@ -1556,14 +1576,27 @@ const CustomerService = (props)=>{
1556
1576
  }, 300);
1557
1577
  // childRef.current.roomsListTimer();
1558
1578
  },
1559
- children: /*#__PURE__*/ _jsx(CustomFullScreen, {})
1560
- }) : /*#__PURE__*/ _jsx("i", {
1579
+ children: [
1580
+ /*#__PURE__*/ _jsx(CustomFullScreen, {}),
1581
+ /*#__PURE__*/ _jsx("span", {
1582
+ className: styles.popover,
1583
+ children: "\xa0\xa0全屏\xa0\xa0"
1584
+ })
1585
+ ]
1586
+ }) : /*#__PURE__*/ _jsxs("i", {
1587
+ className: styles.popover_main,
1561
1588
  onClick: ()=>{
1562
1589
  onEvent(serverName + serverUrl(), "click_智能问答_退出全屏", "提交");
1563
1590
  // switchDialogBox(1, true);
1564
1591
  setShowType(1);
1565
1592
  },
1566
- children: /*#__PURE__*/ _jsx(CustomExitFullScreen, {})
1593
+ children: [
1594
+ /*#__PURE__*/ _jsx(CustomExitFullScreen, {}),
1595
+ /*#__PURE__*/ _jsx("span", {
1596
+ className: styles.popover,
1597
+ children: "退出全屏"
1598
+ })
1599
+ ]
1567
1600
  }),
1568
1601
  /*#__PURE__*/ _jsx("i", {
1569
1602
  onClick: ()=>{
@@ -1988,7 +2021,7 @@ const CustomerService = (props)=>{
1988
2021
  className: styles.operate,
1989
2022
  children: [
1990
2023
  // 不在智能客服窗口,并已经点击了召唤老师,并有召唤老师权限
1991
- isAiChatWindow && answerMode != 1 && userData.modules.some((item)=>item.short == "TeacherAnswer") && historyMessageList[i - 1].extraInfo && JSON.parse(historyMessageList[i - 1].extraInfo).length > 0 && JSON.parse(historyMessageList[i - 1].extraInfo)[0].key != "imageUrl" && /*#__PURE__*/ _jsx("span", {
2024
+ isAiChatWindow && answerMode != 1 && userData.modules.some((item)=>item.short == "TeacherAnswer") && historyMessageList[i - 1] && historyMessageList[i - 1].extraInfo && JSON.parse(historyMessageList[i - 1].extraInfo).length > 0 && JSON.parse(historyMessageList[i - 1].extraInfo)[0].key != "imageUrl" && /*#__PURE__*/ _jsx("span", {
1992
2025
  className: styles.ask_question,
1993
2026
  onClick: ()=>{
1994
2027
  setAnswerMode(1);
@@ -2131,7 +2164,7 @@ const CustomerService = (props)=>{
2131
2164
  }
2132
2165
  //3、是否显示召唤老师回答按钮
2133
2166
  let findTeacherBtn = false;
2134
- if (!showStopBtn && isAiChatWindow && (extraInfo != undefined && JSON.parse(extraInfo).length > 0 && JSON.parse(extraInfo)[0].key == "questionId" || extraInfo == null) && historyMessageList[i - 1].extraInfo && JSON.parse(historyMessageList[i - 1].extraInfo).length > 0 && JSON.parse(historyMessageList[i - 1].extraInfo)[0].key != "imageUrl") {
2167
+ if (!showStopBtn && isAiChatWindow && (extraInfo != undefined && JSON.parse(extraInfo).length > 0 && JSON.parse(extraInfo)[0].key == "questionId" || extraInfo == null) && historyMessageList[i - 1] && historyMessageList[i - 1].extraInfo && JSON.parse(historyMessageList[i - 1].extraInfo).length > 0 && JSON.parse(historyMessageList[i - 1].extraInfo)[0].key != "imageUrl") {
2135
2168
  findTeacherBtn = true;
2136
2169
  }
2137
2170
  return /*#__PURE__*/ _jsxs("div", {
@@ -2542,6 +2575,7 @@ const CustomerService = (props)=>{
2542
2575
  if (roomList.length > 0 && roomList[0].roomId != roomId) {
2543
2576
  sendToTeacher(2);
2544
2577
  } else {
2578
+ setFinished(false);
2545
2579
  clearTimeout(timer.current);
2546
2580
  setQuestionsList([]);
2547
2581
  setAnswerMode(-1);
@@ -2565,7 +2599,7 @@ const CustomerService = (props)=>{
2565
2599
  onFocus: ()=>{
2566
2600
  onEvent(serverName + serverUrl(), "click_智能问答_输入框", "提交");
2567
2601
  },
2568
- disabled: !disabled,
2602
+ disabled: !disabled || !finished,
2569
2603
  maxLength: 1000,
2570
2604
  id: "con_textarea"
2571
2605
  }),
@@ -2595,8 +2629,10 @@ const CustomerService = (props)=>{
2595
2629
  userData.modules.some((item)=>item.short == "AIservice") && contactsList.length > 0 && contactsList[0].roomId == roomId && /*#__PURE__*/ _jsx("p", {
2596
2630
  className: styles.screenshot,
2597
2631
  children: /*#__PURE__*/ _jsx("i", {
2598
- className: `${!disabled ? styles.disabled : ""}`,
2632
+ className: `${!finished ? styles.disabled : ""}`,
2599
2633
  onClick: ()=>{
2634
+ if (!finished) return;
2635
+ setSaveShowType(showType);
2600
2636
  setShowType(5);
2601
2637
  },
2602
2638
  children: /*#__PURE__*/ _jsx(CustomScreenshot, {})
@@ -2609,7 +2645,7 @@ const CustomerService = (props)=>{
2609
2645
  children: /*#__PURE__*/ _jsx("i", {
2610
2646
  className: `${!disabled || keyWord.trim() == "" ? styles.disabled : ""}`,
2611
2647
  onClick: ()=>{
2612
- if (!disabled) return;
2648
+ if (disabled && keyWord.trim() == "") return;
2613
2649
  setCitationContent({});
2614
2650
  setButtomHei(45);
2615
2651
  if (keyWord.trim() != "") {
@@ -3277,7 +3313,11 @@ const CustomerService = (props)=>{
3277
3313
  imgBese64: imgBese64,
3278
3314
  saveScreenshotBese64: (base64)=>{
3279
3315
  setScreenshotBese64(base64);
3280
- setShowType(1);
3316
+ if (saveShowType != -1) {
3317
+ setShowType(saveShowType);
3318
+ } else {
3319
+ setShowType(1);
3320
+ }
3281
3321
  },
3282
3322
  cancelScreenshot: ()=>{
3283
3323
  setShowType(1);
@@ -116,7 +116,10 @@
116
116
  position: relative;
117
117
  z-index: 99;
118
118
  .popover{
119
- padding: 8px;
119
+ padding: 8px 0;
120
+ width: 74px;
121
+ text-align: center;
122
+
120
123
  border-radius: 4px;
121
124
  line-height: 1.5;
122
125
  color: rgba(0, 0, 0, 0.65);
@@ -632,7 +635,10 @@
632
635
  border-radius: 4px;
633
636
  overflow: hidden;
634
637
  display: inline-flex;
635
- margin-top: 24px;
638
+ margin-top: 12px;
639
+ img{
640
+ width: 100%;
641
+ }
636
642
  .mask_zoom{
637
643
  position: absolute;
638
644
  top: 0;
@@ -717,8 +723,13 @@
717
723
  padding: 0 2px;
718
724
  }
719
725
  li{
726
+ :global{
727
+ ::marker {
728
+ font-weight: 600 !important;
729
+ }
730
+ }
720
731
  ::marker {
721
- font-weight: 600;
732
+ font-weight: 600 !important;
722
733
  }
723
734
  p{
724
735
  font-weight: 400 !important;
@@ -726,6 +737,7 @@
726
737
  border-bottom: 6px solid @color-background-primary-weak-hover;
727
738
  height: 20px;
728
739
  display: inline-block;
740
+ font-weight: 600;
729
741
  }
730
742
  }
731
743
 
@@ -1122,6 +1134,7 @@
1122
1134
  svg {
1123
1135
  font-size: 20px;
1124
1136
  color: @color-icon-fill-Tr;
1137
+ cursor: pointer;
1125
1138
  }
1126
1139
  }
1127
1140
  .disabled {
@@ -64,6 +64,7 @@ var CustomerService = function(props) {
64
64
  var _useState29 = _sliced_to_array(useState(""), 2), viewBase64 = _useState29[0], setViewBase64 = _useState29[1]; //图片预览
65
65
  var _useState30 = _sliced_to_array(useState(false), 2), visible = _useState30[0], setVisible = _useState30[1]; //是否显示图片预览
66
66
  var _useState31 = _sliced_to_array(useState([]), 2), bottomRecommendationQuestions = _useState31[0], setBottomRecommendationQuestions = _useState31[1]; //底部推荐问题
67
+ var _useState32 = _sliced_to_array(useState(-1), 2), saveShowType = _useState32[0], setSaveShowType = _useState32[1]; //保存截图时的状态
67
68
  var timer = useRef(null); //文本框输入时
68
69
  var receiveMessageTimer = useRef(null); //接收ai发回的消息
69
70
  // let voiceCountdownTimer = useRef(null); //语音录制倒计时
@@ -136,23 +137,29 @@ var CustomerService = function(props) {
136
137
  }
137
138
  scrollTopHei.current = scrollTop;
138
139
  };
139
- console.log(showType, "showTypeshowTypeshowType");
140
140
  if (showType == 5) {
141
- //document.querySelector("#__docusaurus")
142
- setTimeout(function() {
143
- html2canvas(document.getElementsByTagName("body")[0], {
144
- allowTaint: true,
145
- useCORS: true,
146
- scale: 1 // 图片比例
147
- }).then(function(canvas) {
148
- document.body.appendChild(canvas);
149
- var base64URL = canvas.toDataURL("image/jpeg");
150
- var image = new Image();
151
- image.src = base64URL; // 将'your_image_url'替换为你自己的图片URL
152
- console.log(base64URL);
153
- setImgBese64(base64URL);
154
- });
155
- }, 1000);
141
+ setImgBese64("");
142
+ html2canvas(document.getElementsByTagName("html")[0]).then(function(canvas) {
143
+ console.log(canvas, 22222);
144
+ setTimeout(function() {
145
+ var dom = document.getElementById("container_html5_api");
146
+ // let dom = document.getElementById("__docusaurus");
147
+ html2canvas(dom, {
148
+ backgroundColor: null,
149
+ useCORS: true,
150
+ allowTaint: true,
151
+ scale: 1,
152
+ logging: false
153
+ }).then(function(canvas) {
154
+ // document.body.appendChild(canvas);
155
+ console.log(canvas, 4444444);
156
+ // var base64URL = canvas.toDataURL('image/jpeg')
157
+ // let base64URL=canvas.toDataURL("image/jpg", 1.0)
158
+ var base64URL = canvas.toDataURL("image/png");
159
+ setImgBese64(base64URL);
160
+ });
161
+ }, 100);
162
+ });
156
163
  }
157
164
  if (showType != 1 && !firstLoad && pageCount > 0) {
158
165
  setFirstLoad(true);
@@ -521,7 +528,7 @@ var CustomerService = function(props) {
521
528
  };
522
529
  //发送知识库问题 item,flag == 1 是获取问候信息的答案,flag == 2 是普通消息,flag == 3 是针对视频页面点击底部推荐问题
523
530
  var sendMessage = function(item, flag) {
524
- console.log(item, flag, 888888888);
531
+ // console.log(item,flag,888888888);
525
532
  var questions = [];
526
533
  if (item && flag) {
527
534
  questions = [
@@ -697,7 +704,6 @@ var CustomerService = function(props) {
697
704
  setTimeout(function() {
698
705
  setQuestionsList([]);
699
706
  }, 2000);
700
- // console.log(pageNumHistory,44444444444444);
701
707
  //占位信息
702
708
  if (pageNumHistory <= 1) {
703
709
  setHistoryMessageList(function(historyMessageList) {
@@ -737,8 +743,8 @@ var CustomerService = function(props) {
737
743
  headers: {
738
744
  "Content-Type": "application/json",
739
745
  Accept: "text/event-stream,application/json",
740
- // "X-Auth-Jwt": window.localStorage.getItem("usertoken") || "",
741
- "X-Auth-Jwt": sessionStorage.getItem("jwt") || "",
746
+ "X-Auth-Jwt": window.localStorage.getItem("usertoken") || "",
747
+ // "X-Auth-Jwt": sessionStorage.getItem('jwt') || "",
742
748
  "Auth-Token": userData.token,
743
749
  "X-Module-Id": userData.modules.find(function(ele) {
744
750
  return ele.short == "IntelligentCustomerService";
@@ -949,7 +955,7 @@ var CustomerService = function(props) {
949
955
  var getHistoryMessage = function(pageNum, flag) {
950
956
  var id = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "1", raw_data = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : [];
951
957
  clearTimeout(roomMessage.current);
952
- console.log(pageNum, flag, "dkfjvndfjvndfkvdf");
958
+ // console.log(pageNum,flag,'dkfjvndfjvndfkvdf')
953
959
  // flag == 1 时已经设置好了位置标记
954
960
  var last_id = "";
955
961
  if (flag == 2 && historyMessageList.length > 0) {
@@ -1234,7 +1240,7 @@ var CustomerService = function(props) {
1234
1240
  page: 1,
1235
1241
  maxPageSize: 4,
1236
1242
  question: value,
1237
- sectionId: getQuery("s_id") || 325569
1243
+ sectionId: getQuery("s_id")
1238
1244
  };
1239
1245
  } else if (flag == 4) {
1240
1246
  data = {
@@ -1277,14 +1283,13 @@ var CustomerService = function(props) {
1277
1283
  console.log(props, 3333333);
1278
1284
  var config = props.config;
1279
1285
  if (config && config.type == "video" && config.params) {
1280
- console.log("请求接口2222", config);
1281
1286
  var params = config.params;
1282
- var videoId = params.videoPageData.videoId;
1283
- var watchTime = params.videoPageData.videoProgress;
1284
- var courseId = getQuery("yc_id") || 10;
1285
- var sectionId = getQuery("s_id") || 20;
1287
+ var videoId = params.videoId;
1288
+ var watchTime = params.videoProgress;
1289
+ var courseId = getQuery("yc_id");
1290
+ var sectionId = getQuery("s_id");
1286
1291
  if (videoId && watchTime && courseId && sectionId) {
1287
- console.log("请求接口2222");
1292
+ console.log("请求接口2222", config);
1288
1293
  http.post("".concat(urllocation, "/chat-service/public/v1.0/knowledge-base/questions:recommend"), {
1289
1294
  "recommendedQuestions": flag == 2 ? recommendeQuestionID.current : [
1290
1295
  ""
@@ -1523,21 +1528,35 @@ var CustomerService = function(props) {
1523
1528
  /*#__PURE__*/ _jsx("span", {
1524
1529
  className: styles.line
1525
1530
  }),
1526
- /*#__PURE__*/ _jsx("i", {
1531
+ /*#__PURE__*/ _jsxs("i", {
1532
+ className: styles.popover_main,
1527
1533
  onClick: function() {
1528
1534
  onEvent(serverName + serverUrl(), "click_智能问答_退出全屏", "提交");
1529
1535
  setFirstLoad(false); //重启滚动条在最上方
1530
1536
  setShowType(3);
1531
1537
  },
1532
- children: /*#__PURE__*/ _jsx(CustomExitFullScreen, {})
1538
+ children: [
1539
+ /*#__PURE__*/ _jsx(CustomExitFullScreen, {}),
1540
+ /*#__PURE__*/ _jsx("span", {
1541
+ className: styles.popover,
1542
+ children: "退出全屏"
1543
+ })
1544
+ ]
1533
1545
  }),
1534
- /*#__PURE__*/ _jsx("i", {
1546
+ /*#__PURE__*/ _jsxs("i", {
1547
+ className: styles.popover_main,
1535
1548
  onClick: function() {
1536
1549
  onEvent(serverName + serverUrl(), "click_智能问答_退出全屏", "提交");
1537
1550
  setShowType(3);
1538
1551
  setFirstLoad(false); //重启滚动条在最上方
1539
1552
  },
1540
- children: /*#__PURE__*/ _jsx(CloseOutlined, {})
1553
+ children: [
1554
+ /*#__PURE__*/ _jsx(CloseOutlined, {}),
1555
+ /*#__PURE__*/ _jsx("span", {
1556
+ className: styles.popover,
1557
+ children: "退出全屏"
1558
+ })
1559
+ ]
1541
1560
  })
1542
1561
  ]
1543
1562
  })
@@ -1586,7 +1605,8 @@ var CustomerService = function(props) {
1586
1605
  /*#__PURE__*/ _jsx("span", {
1587
1606
  className: styles.line
1588
1607
  }),
1589
- showType == 1 ? /*#__PURE__*/ _jsx("i", {
1608
+ showType == 1 ? /*#__PURE__*/ _jsxs("i", {
1609
+ className: styles.popover_main,
1590
1610
  onClick: function() {
1591
1611
  onEvent(serverName + serverUrl(), "click_智能问答_全屏", "提交");
1592
1612
  // switchDialogBox(3, true);
@@ -1599,14 +1619,27 @@ var CustomerService = function(props) {
1599
1619
  }, 300);
1600
1620
  // childRef.current.roomsListTimer();
1601
1621
  },
1602
- children: /*#__PURE__*/ _jsx(CustomFullScreen, {})
1603
- }) : /*#__PURE__*/ _jsx("i", {
1622
+ children: [
1623
+ /*#__PURE__*/ _jsx(CustomFullScreen, {}),
1624
+ /*#__PURE__*/ _jsx("span", {
1625
+ className: styles.popover,
1626
+ children: "\xa0\xa0全屏\xa0\xa0"
1627
+ })
1628
+ ]
1629
+ }) : /*#__PURE__*/ _jsxs("i", {
1630
+ className: styles.popover_main,
1604
1631
  onClick: function() {
1605
1632
  onEvent(serverName + serverUrl(), "click_智能问答_退出全屏", "提交");
1606
1633
  // switchDialogBox(1, true);
1607
1634
  setShowType(1);
1608
1635
  },
1609
- children: /*#__PURE__*/ _jsx(CustomExitFullScreen, {})
1636
+ children: [
1637
+ /*#__PURE__*/ _jsx(CustomExitFullScreen, {}),
1638
+ /*#__PURE__*/ _jsx("span", {
1639
+ className: styles.popover,
1640
+ children: "退出全屏"
1641
+ })
1642
+ ]
1610
1643
  }),
1611
1644
  /*#__PURE__*/ _jsx("i", {
1612
1645
  onClick: function() {
@@ -2016,7 +2049,7 @@ var CustomerService = function(props) {
2016
2049
  // 不在智能客服窗口,并已经点击了召唤老师,并有召唤老师权限
2017
2050
  isAiChatWindow && answerMode != 1 && userData.modules.some(function(item) {
2018
2051
  return item.short == "TeacherAnswer";
2019
- }) && historyMessageList[i - 1].extraInfo && JSON.parse(historyMessageList[i - 1].extraInfo).length > 0 && JSON.parse(historyMessageList[i - 1].extraInfo)[0].key != "imageUrl" && /*#__PURE__*/ _jsx("span", {
2052
+ }) && historyMessageList[i - 1] && historyMessageList[i - 1].extraInfo && JSON.parse(historyMessageList[i - 1].extraInfo).length > 0 && JSON.parse(historyMessageList[i - 1].extraInfo)[0].key != "imageUrl" && /*#__PURE__*/ _jsx("span", {
2020
2053
  className: styles.ask_question,
2021
2054
  onClick: function() {
2022
2055
  setAnswerMode(1);
@@ -2165,7 +2198,7 @@ var CustomerService = function(props) {
2165
2198
  }
2166
2199
  //3、是否显示召唤老师回答按钮
2167
2200
  var findTeacherBtn = false;
2168
- if (!showStopBtn && isAiChatWindow && (extraInfo != undefined && JSON.parse(extraInfo).length > 0 && JSON.parse(extraInfo)[0].key == "questionId" || extraInfo == null) && historyMessageList[i - 1].extraInfo && JSON.parse(historyMessageList[i - 1].extraInfo).length > 0 && JSON.parse(historyMessageList[i - 1].extraInfo)[0].key != "imageUrl") {
2201
+ if (!showStopBtn && isAiChatWindow && (extraInfo != undefined && JSON.parse(extraInfo).length > 0 && JSON.parse(extraInfo)[0].key == "questionId" || extraInfo == null) && historyMessageList[i - 1] && historyMessageList[i - 1].extraInfo && JSON.parse(historyMessageList[i - 1].extraInfo).length > 0 && JSON.parse(historyMessageList[i - 1].extraInfo)[0].key != "imageUrl") {
2169
2202
  findTeacherBtn = true;
2170
2203
  }
2171
2204
  return /*#__PURE__*/ _jsxs("div", {
@@ -2592,6 +2625,7 @@ var CustomerService = function(props) {
2592
2625
  if (roomList.length > 0 && roomList[0].roomId != roomId) {
2593
2626
  sendToTeacher(2);
2594
2627
  } else {
2628
+ setFinished(false);
2595
2629
  clearTimeout(timer.current);
2596
2630
  setQuestionsList([]);
2597
2631
  setAnswerMode(-1);
@@ -2617,7 +2651,7 @@ var CustomerService = function(props) {
2617
2651
  onFocus: function() {
2618
2652
  onEvent(serverName + serverUrl(), "click_智能问答_输入框", "提交");
2619
2653
  },
2620
- disabled: !disabled,
2654
+ disabled: !disabled || !finished,
2621
2655
  maxLength: 1000,
2622
2656
  id: "con_textarea"
2623
2657
  }),
@@ -2649,8 +2683,10 @@ var CustomerService = function(props) {
2649
2683
  }) && contactsList.length > 0 && contactsList[0].roomId == roomId && /*#__PURE__*/ _jsx("p", {
2650
2684
  className: styles.screenshot,
2651
2685
  children: /*#__PURE__*/ _jsx("i", {
2652
- className: "".concat(!disabled ? styles.disabled : ""),
2686
+ className: "".concat(!finished ? styles.disabled : ""),
2653
2687
  onClick: function() {
2688
+ if (!finished) return;
2689
+ setSaveShowType(showType);
2654
2690
  setShowType(5);
2655
2691
  },
2656
2692
  children: /*#__PURE__*/ _jsx(CustomScreenshot, {})
@@ -2663,7 +2699,7 @@ var CustomerService = function(props) {
2663
2699
  children: /*#__PURE__*/ _jsx("i", {
2664
2700
  className: "".concat(!disabled || keyWord.trim() == "" ? styles.disabled : ""),
2665
2701
  onClick: function() {
2666
- if (!disabled) return;
2702
+ if (disabled && keyWord.trim() == "") return;
2667
2703
  setCitationContent({});
2668
2704
  setButtomHei(45);
2669
2705
  if (keyWord.trim() != "") {
@@ -3337,7 +3373,11 @@ var CustomerService = function(props) {
3337
3373
  imgBese64: imgBese64,
3338
3374
  saveScreenshotBese64: function(base64) {
3339
3375
  setScreenshotBese64(base64);
3340
- setShowType(1);
3376
+ if (saveShowType != -1) {
3377
+ setShowType(saveShowType);
3378
+ } else {
3379
+ setShowType(1);
3380
+ }
3341
3381
  },
3342
3382
  cancelScreenshot: function() {
3343
3383
  setShowType(1);
@@ -116,7 +116,10 @@
116
116
  position: relative;
117
117
  z-index: 99;
118
118
  .popover{
119
- padding: 8px;
119
+ padding: 8px 0;
120
+ width: 74px;
121
+ text-align: center;
122
+
120
123
  border-radius: 4px;
121
124
  line-height: 1.5;
122
125
  color: rgba(0, 0, 0, 0.65);
@@ -632,7 +635,10 @@
632
635
  border-radius: 4px;
633
636
  overflow: hidden;
634
637
  display: inline-flex;
635
- margin-top: 24px;
638
+ margin-top: 12px;
639
+ img{
640
+ width: 100%;
641
+ }
636
642
  .mask_zoom{
637
643
  position: absolute;
638
644
  top: 0;
@@ -717,8 +723,13 @@
717
723
  padding: 0 2px;
718
724
  }
719
725
  li{
726
+ :global{
727
+ ::marker {
728
+ font-weight: 600 !important;
729
+ }
730
+ }
720
731
  ::marker {
721
- font-weight: 600;
732
+ font-weight: 600 !important;
722
733
  }
723
734
  p{
724
735
  font-weight: 400 !important;
@@ -726,6 +737,7 @@
726
737
  border-bottom: 6px solid @color-background-primary-weak-hover;
727
738
  height: 20px;
728
739
  display: inline-block;
740
+ font-weight: 600;
729
741
  }
730
742
  }
731
743
 
@@ -1122,6 +1134,7 @@
1122
1134
  svg {
1123
1135
  font-size: 20px;
1124
1136
  color: @color-icon-fill-Tr;
1137
+ cursor: pointer;
1125
1138
  }
1126
1139
  }
1127
1140
  .disabled {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bhd-components",
3
- "version": "0.7.5",
3
+ "version": "0.7.7",
4
4
  "description": "组件功能描述",
5
5
  "files": [
6
6
  "esm",