bhd-components 0.7.6 → 0.7.8
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/{0dcae483.esm.es5.production.js → 989240e2.esm.es5.production.js} +1 -1
- package/dist/{e316787c.esm.es5.development.js → bd8fe330.esm.es5.development.js} +1 -1
- package/dist/index.esm.es5.development.css +980 -956
- package/dist/index.esm.es5.development.js +79 -39
- package/dist/index.esm.es5.production.css +1 -1
- package/dist/index.esm.es5.production.js +1 -1
- package/es2017/customerService/index.js +76 -36
- package/es2017/customerService/index.module.less +16 -3
- package/esm/customerService/index.js +76 -36
- package/esm/customerService/index.module.less +16 -3
- package/package.json +1 -1
|
@@ -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,24 +89,29 @@ const CustomerService = (props)=>{
|
|
|
88
89
|
}
|
|
89
90
|
});
|
|
90
91
|
useEffect(()=>{
|
|
91
|
-
console.log(showType, 'showTypeshowTypeshowType');
|
|
92
92
|
if (showType == 5) {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
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("rootWrapper");
|
|
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);
|
|
107
114
|
});
|
|
108
|
-
// },1000)
|
|
109
115
|
}
|
|
110
116
|
if (showType != 1 && !firstLoad && pageCount > 0) {
|
|
111
117
|
setFirstLoad(true);
|
|
@@ -512,7 +518,7 @@ const CustomerService = (props)=>{
|
|
|
512
518
|
};
|
|
513
519
|
//发送知识库问题 item,flag == 1 是获取问候信息的答案,flag == 2 是普通消息,flag == 3 是针对视频页面点击底部推荐问题
|
|
514
520
|
const sendMessage = (item, flag)=>{
|
|
515
|
-
console.log(item,
|
|
521
|
+
// console.log(item,flag,888888888);
|
|
516
522
|
let questions = [];
|
|
517
523
|
if (item && flag) {
|
|
518
524
|
questions = [
|
|
@@ -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,
|
|
933
|
+
// console.log(pageNum,flag,'dkfjvndfjvndfkvdf')
|
|
928
934
|
// flag == 1 时已经设置好了位置标记
|
|
929
935
|
let last_id = "";
|
|
930
936
|
if (flag == 2 && historyMessageList.length > 0) {
|
|
@@ -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.
|
|
1252
|
-
let watchTime = params.
|
|
1256
|
+
let videoId = params.videoId;
|
|
1257
|
+
let watchTime = params.videoProgress;
|
|
1253
1258
|
let courseId = getQuery('yc_id');
|
|
1254
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__*/
|
|
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:
|
|
1495
|
+
children: [
|
|
1496
|
+
/*#__PURE__*/ _jsx(CustomExitFullScreen, {}),
|
|
1497
|
+
/*#__PURE__*/ _jsx("span", {
|
|
1498
|
+
className: styles.popover,
|
|
1499
|
+
children: "退出全屏"
|
|
1500
|
+
})
|
|
1501
|
+
]
|
|
1490
1502
|
}),
|
|
1491
|
-
/*#__PURE__*/
|
|
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:
|
|
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__*/
|
|
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:
|
|
1560
|
-
|
|
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:
|
|
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: `${!
|
|
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 (
|
|
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
|
-
|
|
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:
|
|
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,24 +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
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
141
|
+
setImgBese64("");
|
|
142
|
+
html2canvas(document.getElementsByTagName("html")[0]).then(function(canvas) {
|
|
143
|
+
console.log(canvas, 22222);
|
|
144
|
+
setTimeout(function() {
|
|
145
|
+
//let dom = document.getElementById("container_html5_api")
|
|
146
|
+
var dom = document.getElementById("rootWrapper");
|
|
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);
|
|
155
162
|
});
|
|
156
|
-
// },1000)
|
|
157
163
|
}
|
|
158
164
|
if (showType != 1 && !firstLoad && pageCount > 0) {
|
|
159
165
|
setFirstLoad(true);
|
|
@@ -522,7 +528,7 @@ var CustomerService = function(props) {
|
|
|
522
528
|
};
|
|
523
529
|
//发送知识库问题 item,flag == 1 是获取问候信息的答案,flag == 2 是普通消息,flag == 3 是针对视频页面点击底部推荐问题
|
|
524
530
|
var sendMessage = function(item, flag) {
|
|
525
|
-
console.log(item,
|
|
531
|
+
// console.log(item,flag,888888888);
|
|
526
532
|
var questions = [];
|
|
527
533
|
if (item && flag) {
|
|
528
534
|
questions = [
|
|
@@ -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,
|
|
958
|
+
// console.log(pageNum,flag,'dkfjvndfjvndfkvdf')
|
|
953
959
|
// flag == 1 时已经设置好了位置标记
|
|
954
960
|
var last_id = "";
|
|
955
961
|
if (flag == 2 && historyMessageList.length > 0) {
|
|
@@ -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.
|
|
1283
|
-
var watchTime = params.
|
|
1287
|
+
var videoId = params.videoId;
|
|
1288
|
+
var watchTime = params.videoProgress;
|
|
1284
1289
|
var courseId = getQuery("yc_id");
|
|
1285
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__*/
|
|
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:
|
|
1538
|
+
children: [
|
|
1539
|
+
/*#__PURE__*/ _jsx(CustomExitFullScreen, {}),
|
|
1540
|
+
/*#__PURE__*/ _jsx("span", {
|
|
1541
|
+
className: styles.popover,
|
|
1542
|
+
children: "退出全屏"
|
|
1543
|
+
})
|
|
1544
|
+
]
|
|
1533
1545
|
}),
|
|
1534
|
-
/*#__PURE__*/
|
|
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:
|
|
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__*/
|
|
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:
|
|
1603
|
-
|
|
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:
|
|
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(!
|
|
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 (
|
|
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
|
-
|
|
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:
|
|
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 {
|