bhd-components 0.7.26 → 0.7.28
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/dist/{7b969b44.esm.es5.production.js → 27cf2e80.esm.es5.production.js} +1 -1
- package/dist/{05f7c0f3.esm.es5.development.js → 4461b1a8.esm.es5.development.js} +415 -374
- package/dist/index.esm.es5.development.css +508 -497
- package/dist/index.esm.es5.development.js +29 -30
- package/dist/index.esm.es5.production.css +1 -1
- package/dist/index.esm.es5.production.js +1 -1
- package/es2017/customerService/index.js +15 -11
- package/es2017/customerService/index.module.less +12 -0
- package/es2017/customerService/teacherList.js +7 -16
- package/esm/customerService/index.js +19 -11
- package/esm/customerService/index.module.less +12 -0
- package/esm/customerService/teacherList.js +7 -16
- package/package.json +1 -1
|
@@ -1379,11 +1379,12 @@ const CustomerService = (props)=>{
|
|
|
1379
1379
|
maxPageSize: 5
|
|
1380
1380
|
};
|
|
1381
1381
|
} else if (flag == 3) {
|
|
1382
|
+
let { params: { VideoBriefSummaryId } } = config;
|
|
1382
1383
|
data = {
|
|
1383
1384
|
page: 1,
|
|
1384
|
-
maxPageSize:
|
|
1385
|
+
maxPageSize: 4,
|
|
1385
1386
|
question: value,
|
|
1386
|
-
sectionId:
|
|
1387
|
+
sectionId: VideoBriefSummaryId
|
|
1387
1388
|
};
|
|
1388
1389
|
} else if (flag == 4) {
|
|
1389
1390
|
data = {
|
|
@@ -1414,21 +1415,25 @@ const CustomerService = (props)=>{
|
|
|
1414
1415
|
} else {
|
|
1415
1416
|
setQuestionsList(questionList);
|
|
1416
1417
|
}
|
|
1417
|
-
if (questionList.length <
|
|
1418
|
+
if (questionList.length < 4 && flag == 3) {
|
|
1418
1419
|
console.log('视频页面,联想问题小于4个');
|
|
1419
1420
|
//视频页面,联想问题小于4个
|
|
1420
1421
|
http.get(`${urllocation}/chat-service/public/v1.0/knowledge-base/questions`, {
|
|
1421
1422
|
params: {
|
|
1422
1423
|
page: 1,
|
|
1423
|
-
maxPageSize:
|
|
1424
|
+
maxPageSize: 4 - questionList.length,
|
|
1425
|
+
question: value
|
|
1424
1426
|
}
|
|
1425
1427
|
}).then((res)=>{
|
|
1426
1428
|
if (res.data.questions) {
|
|
1427
1429
|
setQuestionsList((questionList)=>{
|
|
1428
|
-
|
|
1430
|
+
let newList = [
|
|
1429
1431
|
...questionList,
|
|
1430
1432
|
...res.data.questions
|
|
1431
1433
|
];
|
|
1434
|
+
// 数组去重
|
|
1435
|
+
newList = newList.filter((item, index, self)=>index === self.findIndex((t)=>t.id === item.id));
|
|
1436
|
+
return newList;
|
|
1432
1437
|
});
|
|
1433
1438
|
}
|
|
1434
1439
|
});
|
|
@@ -2167,8 +2172,7 @@ const CustomerService = (props)=>{
|
|
|
2167
2172
|
},
|
|
2168
2173
|
children: item.message == '抱歉,我暂时无法回答这样的问题。' ? list.question : /*#__PURE__*/ _jsxs(_Fragment, {
|
|
2169
2174
|
children: [
|
|
2170
|
-
index + 1,
|
|
2171
|
-
".",
|
|
2175
|
+
JSON.parse(item.extraInfo).length > 1 ? index + 1 + '.' : '',
|
|
2172
2176
|
list.question
|
|
2173
2177
|
]
|
|
2174
2178
|
})
|
|
@@ -2655,21 +2659,21 @@ const CustomerService = (props)=>{
|
|
|
2655
2659
|
children: [
|
|
2656
2660
|
/*#__PURE__*/ _jsxs("p", {
|
|
2657
2661
|
onClick: ()=>{
|
|
2658
|
-
sendScreenshotData('
|
|
2662
|
+
sendScreenshotData('讲解图片里的知识点;');
|
|
2659
2663
|
},
|
|
2660
2664
|
children: [
|
|
2661
2665
|
/*#__PURE__*/ _jsx(CustomKnowledgeContent, {}),
|
|
2662
|
-
"
|
|
2666
|
+
"讲解图片里的知识点;"
|
|
2663
2667
|
]
|
|
2664
2668
|
}),
|
|
2665
2669
|
/*#__PURE__*/ _jsx("br", {}),
|
|
2666
2670
|
/*#__PURE__*/ _jsxs("p", {
|
|
2667
2671
|
onClick: ()=>{
|
|
2668
|
-
sendScreenshotData('
|
|
2672
|
+
sendScreenshotData('总结图片内容 ');
|
|
2669
2673
|
},
|
|
2670
2674
|
children: [
|
|
2671
2675
|
/*#__PURE__*/ _jsx(CustomWenhaoRound, {}),
|
|
2672
|
-
"
|
|
2676
|
+
"总结图片内容 "
|
|
2673
2677
|
]
|
|
2674
2678
|
})
|
|
2675
2679
|
]
|
|
@@ -1729,9 +1729,13 @@
|
|
|
1729
1729
|
.open{
|
|
1730
1730
|
font-size: 24px;
|
|
1731
1731
|
color: @color-icon-fill-Tr;
|
|
1732
|
+
position: relative;
|
|
1733
|
+
left: -15px;
|
|
1732
1734
|
}
|
|
1735
|
+
|
|
1733
1736
|
//展开
|
|
1734
1737
|
.active{
|
|
1738
|
+
left: -11px;
|
|
1735
1739
|
svg{
|
|
1736
1740
|
transform: rotate(90deg);
|
|
1737
1741
|
}
|
|
@@ -1875,8 +1879,16 @@
|
|
|
1875
1879
|
// .list{
|
|
1876
1880
|
// margin: 8px 16px 17px;
|
|
1877
1881
|
// }
|
|
1882
|
+
|
|
1883
|
+
|
|
1878
1884
|
}
|
|
1879
1885
|
}
|
|
1886
|
+
.open{
|
|
1887
|
+
left: -7px !important;
|
|
1888
|
+
}
|
|
1889
|
+
.active{
|
|
1890
|
+
left: -4px !important;
|
|
1891
|
+
}
|
|
1880
1892
|
}
|
|
1881
1893
|
//老师列表
|
|
1882
1894
|
.teacher_list{
|
|
@@ -8,7 +8,7 @@ import { SearchOutlined } from "@ant-design/icons";
|
|
|
8
8
|
const TeacherList = (props)=>{
|
|
9
9
|
let { type , userData , http , urllocation , onClose , enterTeacherChat } = props;
|
|
10
10
|
const [keyWordProblem, setKeyWordProblem] = useState(""); //搜索内容
|
|
11
|
-
const [showLoadingState, setShowLoadingState] = useState(
|
|
11
|
+
const [showLoadingState, setShowLoadingState] = useState(2); //2、无数据 ,3、不显示图片
|
|
12
12
|
// const [totalData, setTotalData] = useState([]); //总数据
|
|
13
13
|
const [showTotalData, setShowTotalData] = useState([]); //总数据
|
|
14
14
|
// const [teacher_list, setTeacher_list] = useState([]); //老师列表,有头像
|
|
@@ -37,7 +37,9 @@ const TeacherList = (props)=>{
|
|
|
37
37
|
sliderRef.current.addEventListener('wheel', handleScroll);
|
|
38
38
|
// 清除滚轮事件监听器
|
|
39
39
|
return ()=>{
|
|
40
|
-
|
|
40
|
+
try {
|
|
41
|
+
sliderRef.current.removeEventListener('wheel', handleScroll);
|
|
42
|
+
} catch (error) {}
|
|
41
43
|
};
|
|
42
44
|
}, [
|
|
43
45
|
keyWordProblem
|
|
@@ -193,7 +195,7 @@ const TeacherList = (props)=>{
|
|
|
193
195
|
/*#__PURE__*/ _jsx("i", {
|
|
194
196
|
className: "guanbi_Close",
|
|
195
197
|
onClick: ()=>{
|
|
196
|
-
setShowLoadingState(
|
|
198
|
+
setShowLoadingState(2);
|
|
197
199
|
setKeyWordProblem("");
|
|
198
200
|
// setTotalData([]);
|
|
199
201
|
totalData.current = [];
|
|
@@ -208,25 +210,14 @@ const TeacherList = (props)=>{
|
|
|
208
210
|
className: styles.main_list,
|
|
209
211
|
id: "teacher_list",
|
|
210
212
|
children: [
|
|
211
|
-
showLoadingState == 1 && /*#__PURE__*/ _jsxs("div", {
|
|
212
|
-
className: styles.no_data,
|
|
213
|
-
children: [
|
|
214
|
-
/*#__PURE__*/ _jsx("img", {
|
|
215
|
-
src: "/new_yun/images/aiService/search_for_icon.png"
|
|
216
|
-
}),
|
|
217
|
-
/*#__PURE__*/ _jsx("p", {
|
|
218
|
-
children: "输入关键词,搜索老师姓名"
|
|
219
|
-
})
|
|
220
|
-
]
|
|
221
|
-
}),
|
|
222
213
|
showLoadingState == 2 && /*#__PURE__*/ _jsxs("div", {
|
|
223
214
|
className: styles.no_data,
|
|
224
215
|
children: [
|
|
225
216
|
/*#__PURE__*/ _jsx("img", {
|
|
226
|
-
src: "/new_yun/images/aiService/
|
|
217
|
+
src: "/new_yun/images/aiService/no_data_02.png"
|
|
227
218
|
}),
|
|
228
219
|
/*#__PURE__*/ _jsx("p", {
|
|
229
|
-
children: "
|
|
220
|
+
children: "没有找到相关的联系人"
|
|
230
221
|
})
|
|
231
222
|
]
|
|
232
223
|
}),
|
|
@@ -1422,11 +1422,12 @@ var CustomerService = function(props) {
|
|
|
1422
1422
|
maxPageSize: 5
|
|
1423
1423
|
};
|
|
1424
1424
|
} else if (flag == 3) {
|
|
1425
|
+
var VideoBriefSummaryId = config.params.VideoBriefSummaryId;
|
|
1425
1426
|
data = {
|
|
1426
1427
|
page: 1,
|
|
1427
|
-
maxPageSize:
|
|
1428
|
+
maxPageSize: 4,
|
|
1428
1429
|
question: value,
|
|
1429
|
-
sectionId:
|
|
1430
|
+
sectionId: VideoBriefSummaryId
|
|
1430
1431
|
};
|
|
1431
1432
|
} else if (flag == 4) {
|
|
1432
1433
|
data = {
|
|
@@ -1454,18 +1455,26 @@ var CustomerService = function(props) {
|
|
|
1454
1455
|
} else {
|
|
1455
1456
|
setQuestionsList(questionList);
|
|
1456
1457
|
}
|
|
1457
|
-
if (questionList.length <
|
|
1458
|
+
if (questionList.length < 4 && flag == 3) {
|
|
1458
1459
|
console.log("视频页面,联想问题小于4个");
|
|
1459
1460
|
//视频页面,联想问题小于4个
|
|
1460
1461
|
http.get("".concat(urllocation, "/chat-service/public/v1.0/knowledge-base/questions"), {
|
|
1461
1462
|
params: {
|
|
1462
1463
|
page: 1,
|
|
1463
|
-
maxPageSize:
|
|
1464
|
+
maxPageSize: 4 - questionList.length,
|
|
1465
|
+
question: value
|
|
1464
1466
|
}
|
|
1465
1467
|
}).then(function(res) {
|
|
1466
1468
|
if (res.data.questions) {
|
|
1467
1469
|
setQuestionsList(function(questionList) {
|
|
1468
|
-
|
|
1470
|
+
var newList = _to_consumable_array(questionList).concat(_to_consumable_array(res.data.questions));
|
|
1471
|
+
// 数组去重
|
|
1472
|
+
newList = newList.filter(function(item, index, self) {
|
|
1473
|
+
return index === self.findIndex(function(t) {
|
|
1474
|
+
return t.id === item.id;
|
|
1475
|
+
});
|
|
1476
|
+
});
|
|
1477
|
+
return newList;
|
|
1469
1478
|
});
|
|
1470
1479
|
}
|
|
1471
1480
|
});
|
|
@@ -2196,8 +2205,7 @@ var CustomerService = function(props) {
|
|
|
2196
2205
|
},
|
|
2197
2206
|
children: item.message == "抱歉,我暂时无法回答这样的问题。" ? list.question : /*#__PURE__*/ _jsxs(_Fragment, {
|
|
2198
2207
|
children: [
|
|
2199
|
-
index + 1,
|
|
2200
|
-
".",
|
|
2208
|
+
JSON.parse(item.extraInfo).length > 1 ? index + 1 + "." : "",
|
|
2201
2209
|
list.question
|
|
2202
2210
|
]
|
|
2203
2211
|
})
|
|
@@ -2706,21 +2714,21 @@ var CustomerService = function(props) {
|
|
|
2706
2714
|
children: [
|
|
2707
2715
|
/*#__PURE__*/ _jsxs("p", {
|
|
2708
2716
|
onClick: function() {
|
|
2709
|
-
sendScreenshotData("
|
|
2717
|
+
sendScreenshotData("讲解图片里的知识点;");
|
|
2710
2718
|
},
|
|
2711
2719
|
children: [
|
|
2712
2720
|
/*#__PURE__*/ _jsx(CustomKnowledgeContent, {}),
|
|
2713
|
-
"
|
|
2721
|
+
"讲解图片里的知识点;"
|
|
2714
2722
|
]
|
|
2715
2723
|
}),
|
|
2716
2724
|
/*#__PURE__*/ _jsx("br", {}),
|
|
2717
2725
|
/*#__PURE__*/ _jsxs("p", {
|
|
2718
2726
|
onClick: function() {
|
|
2719
|
-
sendScreenshotData("
|
|
2727
|
+
sendScreenshotData("总结图片内容 ");
|
|
2720
2728
|
},
|
|
2721
2729
|
children: [
|
|
2722
2730
|
/*#__PURE__*/ _jsx(CustomWenhaoRound, {}),
|
|
2723
|
-
"
|
|
2731
|
+
"总结图片内容 "
|
|
2724
2732
|
]
|
|
2725
2733
|
})
|
|
2726
2734
|
]
|
|
@@ -1729,9 +1729,13 @@
|
|
|
1729
1729
|
.open{
|
|
1730
1730
|
font-size: 24px;
|
|
1731
1731
|
color: @color-icon-fill-Tr;
|
|
1732
|
+
position: relative;
|
|
1733
|
+
left: -15px;
|
|
1732
1734
|
}
|
|
1735
|
+
|
|
1733
1736
|
//展开
|
|
1734
1737
|
.active{
|
|
1738
|
+
left: -11px;
|
|
1735
1739
|
svg{
|
|
1736
1740
|
transform: rotate(90deg);
|
|
1737
1741
|
}
|
|
@@ -1875,8 +1879,16 @@
|
|
|
1875
1879
|
// .list{
|
|
1876
1880
|
// margin: 8px 16px 17px;
|
|
1877
1881
|
// }
|
|
1882
|
+
|
|
1883
|
+
|
|
1878
1884
|
}
|
|
1879
1885
|
}
|
|
1886
|
+
.open{
|
|
1887
|
+
left: -7px !important;
|
|
1888
|
+
}
|
|
1889
|
+
.active{
|
|
1890
|
+
left: -4px !important;
|
|
1891
|
+
}
|
|
1880
1892
|
}
|
|
1881
1893
|
//老师列表
|
|
1882
1894
|
.teacher_list{
|
|
@@ -9,7 +9,7 @@ import { SearchOutlined } from "@ant-design/icons";
|
|
|
9
9
|
var TeacherList = function(props) {
|
|
10
10
|
var type = props.type, userData = props.userData, http = props.http, urllocation = props.urllocation, onClose = props.onClose, enterTeacherChat = props.enterTeacherChat;
|
|
11
11
|
var _useState = _sliced_to_array(useState(""), 2), keyWordProblem = _useState[0], setKeyWordProblem = _useState[1]; //搜索内容
|
|
12
|
-
var _useState1 = _sliced_to_array(useState(
|
|
12
|
+
var _useState1 = _sliced_to_array(useState(2), 2), showLoadingState = _useState1[0], setShowLoadingState = _useState1[1]; //2、无数据 ,3、不显示图片
|
|
13
13
|
// const [totalData, setTotalData] = useState([]); //总数据
|
|
14
14
|
var _useState2 = _sliced_to_array(useState([]), 2), showTotalData = _useState2[0], setShowTotalData = _useState2[1]; //总数据
|
|
15
15
|
// const [teacher_list, setTeacher_list] = useState([]); //老师列表,有头像
|
|
@@ -38,7 +38,9 @@ var TeacherList = function(props) {
|
|
|
38
38
|
sliderRef.current.addEventListener("wheel", handleScroll);
|
|
39
39
|
// 清除滚轮事件监听器
|
|
40
40
|
return function() {
|
|
41
|
-
|
|
41
|
+
try {
|
|
42
|
+
sliderRef.current.removeEventListener("wheel", handleScroll);
|
|
43
|
+
} catch (error) {}
|
|
42
44
|
};
|
|
43
45
|
}, [
|
|
44
46
|
keyWordProblem
|
|
@@ -206,7 +208,7 @@ var TeacherList = function(props) {
|
|
|
206
208
|
/*#__PURE__*/ _jsx("i", {
|
|
207
209
|
className: "guanbi_Close",
|
|
208
210
|
onClick: function() {
|
|
209
|
-
setShowLoadingState(
|
|
211
|
+
setShowLoadingState(2);
|
|
210
212
|
setKeyWordProblem("");
|
|
211
213
|
// setTotalData([]);
|
|
212
214
|
totalData.current = [];
|
|
@@ -221,25 +223,14 @@ var TeacherList = function(props) {
|
|
|
221
223
|
className: styles.main_list,
|
|
222
224
|
id: "teacher_list",
|
|
223
225
|
children: [
|
|
224
|
-
showLoadingState == 1 && /*#__PURE__*/ _jsxs("div", {
|
|
225
|
-
className: styles.no_data,
|
|
226
|
-
children: [
|
|
227
|
-
/*#__PURE__*/ _jsx("img", {
|
|
228
|
-
src: "/new_yun/images/aiService/search_for_icon.png"
|
|
229
|
-
}),
|
|
230
|
-
/*#__PURE__*/ _jsx("p", {
|
|
231
|
-
children: "输入关键词,搜索老师姓名"
|
|
232
|
-
})
|
|
233
|
-
]
|
|
234
|
-
}),
|
|
235
226
|
showLoadingState == 2 && /*#__PURE__*/ _jsxs("div", {
|
|
236
227
|
className: styles.no_data,
|
|
237
228
|
children: [
|
|
238
229
|
/*#__PURE__*/ _jsx("img", {
|
|
239
|
-
src: "/new_yun/images/aiService/
|
|
230
|
+
src: "/new_yun/images/aiService/no_data_02.png"
|
|
240
231
|
}),
|
|
241
232
|
/*#__PURE__*/ _jsx("p", {
|
|
242
|
-
children: "
|
|
233
|
+
children: "没有找到相关的联系人"
|
|
243
234
|
})
|
|
244
235
|
]
|
|
245
236
|
}),
|