bhd-components 0.6.7 → 0.6.9
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/{4fa3313f.esm.es5.development.js → 769f0c13.esm.es5.development.js} +1 -1
- package/dist/{0acf50ef.esm.es5.production.js → a1012a79.esm.es5.production.js} +1 -1
- package/dist/index.esm.es5.development.css +754 -722
- package/dist/index.esm.es5.development.js +55 -21
- package/dist/index.esm.es5.production.css +1 -1
- package/dist/index.esm.es5.production.js +1 -1
- package/es2017/customerService/historyFun.js +4 -1
- package/es2017/customerService/index.js +49 -18
- package/es2017/customerService/index.module.less +17 -20
- package/es2017/customerService/index2.module.less +17 -20
- package/esm/customerService/historyFun.js +3 -0
- package/esm/customerService/index.js +49 -18
- package/esm/customerService/index.module.less +17 -20
- package/esm/customerService/index2.module.less +17 -20
- 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 './769f0c13.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 './769f0c13.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';
|
|
@@ -2332,7 +2332,7 @@ function BhdAppLayout(props) {
|
|
|
2332
2332
|
});
|
|
2333
2333
|
}
|
|
2334
2334
|
|
|
2335
|
-
var modules_63b47c51 = {"service_ChatWindow_Drawer":"
|
|
2335
|
+
var modules_63b47c51 = {"service_ChatWindow_Drawer":"index_module_service_ChatWindow_Drawer__c8b380c0","ChatWindow_Modal":"index_module_ChatWindow_Modal__c8b380c0","ChatWindow_Drawer":"index_module_ChatWindow_Drawer__c8b380c0","header_wrap":"index_module_header_wrap__c8b380c0","top":"index_module_top__c8b380c0","user":"index_module_user__c8b380c0","count":"index_module_count__c8b380c0","operate":"index_module_operate__c8b380c0","line":"index_module_line__c8b380c0","header_wrap_newlabo":"index_module_header_wrap_newlabo__c8b380c0","Drawer_main":"index_module_Drawer_main__c8b380c0","loading":"index_module_loading__c8b380c0","message_con":"index_module_message_con__c8b380c0","left":"index_module_left__c8b380c0","head_sculpture":"index_module_head_sculpture__c8b380c0","main_content":"index_module_main_content__c8b380c0","right":"index_module_right__c8b380c0","main":"index_module_main__c8b380c0","main_content_flag":"index_module_main_content_flag__c8b380c0","operate_modal":"index_module_operate_modal__c8b380c0","content":"index_module_content__c8b380c0","content_child":"index_module_content_child__c8b380c0","active":"index_module_active__c8b380c0","ask_question":"index_module_ask_question__c8b380c0","operate_modal_bottom":"index_module_operate_modal_bottom__c8b380c0","stop_generate":"index_module_stop_generate__c8b380c0","icon":"index_module_icon__c8b380c0","find_teacher":"index_module_find_teacher__c8b380c0","stop_findTeacher":"index_module_stop_findTeacher__c8b380c0","association_problem":"index_module_association_problem__c8b380c0","time":"index_module_time__c8b380c0","citation_content":"index_module_citation_content__c8b380c0","text_exceed":"index_module_text_exceed__c8b380c0","popover_content":"index_module_popover_content__c8b380c0","Drawer_main_newlabo":"index_module_Drawer_main_newlabo__c8b380c0","Drawer_main_newlabo_no_pic":"index_module_Drawer_main_newlabo_no_pic__c8b380c0","Drawer_buttom_Issues_List":"index_module_Drawer_buttom_Issues_List__c8b380c0","issues_list_teacherList":"index_module_issues_list_teacherList__c8b380c0","item":"index_module_item__c8b380c0","issues_list":"index_module_issues_list__c8b380c0","sign":"index_module_sign__c8b380c0","Drawer_buttom":"index_module_Drawer_buttom__c8b380c0","input_wrap":"index_module_input_wrap__c8b380c0","input":"index_module_input__c8b380c0","no_AI":"index_module_no_AI__c8b380c0","voice":"index_module_voice__c8b380c0","voice_btn":"index_module_voice_btn__c8b380c0","disabled":"index_module_disabled__c8b380c0","content_main":"index_module_content_main__c8b380c0","content_con":"index_module_content_con__c8b380c0","delete_quote":"index_module_delete_quote__c8b380c0","sending":"index_module_sending__c8b380c0","Drawer_buttom_Issues_List_newlabo":"index_module_Drawer_buttom_Issues_List_newlabo__c8b380c0","main_list":"index_module_main_list__c8b380c0","chat_content":"index_module_chat_content__c8b380c0","popover_main_content":"index_module_popover_main_content__c8b380c0","popover_main_content_name":"index_module_popover_main_content_name__c8b380c0","teacher_layout":"index_module_teacher_layout__c8b380c0","bottom":"index_module_bottom__c8b380c0","delete":"index_module_delete__c8b380c0","num":"index_module_num__c8b380c0","shrink":"index_module_shrink__c8b380c0","teacher_layout_newlabo":"index_module_teacher_layout_newlabo__c8b380c0","teacher_layout_modal":"index_module_teacher_layout_modal__c8b380c0","ai":"index_module_ai__c8b380c0","user_info":"index_module_user_info__c8b380c0","message":"index_module_message__c8b380c0","con":"index_module_con__c8b380c0","teacher_layout_modal_newlabo":"index_module_teacher_layout_modal_newlabo__c8b380c0","history_list":"index_module_history_list__c8b380c0","search_layout":"index_module_search_layout__c8b380c0","mymove":"index_module_mymove__c8b380c0","title":"index_module_title__c8b380c0","search_top":"index_module_search_top__c8b380c0","list_item":"index_module_list_item__c8b380c0","list_summary":"index_module_list_summary__c8b380c0","head_img":"index_module_head_img__c8b380c0","list_desc":"index_module_list_desc__c8b380c0","name":"index_module_name__c8b380c0","decs":"index_module_decs__c8b380c0","open":"index_module_open__c8b380c0","list_detail":"index_module_list_detail__c8b380c0","list":"index_module_list__c8b380c0","list_more":"index_module_list_more__c8b380c0","no_data":"index_module_no_data__c8b380c0","history_list_broadside":"index_module_history_list_broadside__c8b380c0"};
|
|
2336
2336
|
|
|
2337
2337
|
//消息已读
|
|
2338
2338
|
var readMessage = function(roomId, urllocation, userData, http) {
|
|
@@ -2522,6 +2522,9 @@ var HistoryFun = function(props) {
|
|
|
2522
2522
|
}
|
|
2523
2523
|
});
|
|
2524
2524
|
var pageNumber = findPageNumber(30, Math.ceil(total / 30), number);
|
|
2525
|
+
if (number == 0) {
|
|
2526
|
+
pageNumber = 1;
|
|
2527
|
+
}
|
|
2525
2528
|
console.log(roomId, pageNumber, id, receiver, "第几页第几页第几页第几页第几页第几页");
|
|
2526
2529
|
loadSpecifiedData(roomId, pageNumber, id, receiver);
|
|
2527
2530
|
onClose();
|
|
@@ -3296,6 +3299,8 @@ var CustomerService = function(props) {
|
|
|
3296
3299
|
var chatRoomList = useRef(null); //获取聊天室列表
|
|
3297
3300
|
var ctrl = useRef(); //停止生成ai回答时使用
|
|
3298
3301
|
var childRef = useRef(null); //获取子组件方法
|
|
3302
|
+
var scrollTopHei = useRef(0);
|
|
3303
|
+
var isPosition = useRef(true);
|
|
3299
3304
|
var mid = props.userData.mid;
|
|
3300
3305
|
var remarkable = new Remarkable({
|
|
3301
3306
|
highlight: function highlight(str, lang) {
|
|
@@ -3334,7 +3339,6 @@ var CustomerService = function(props) {
|
|
|
3334
3339
|
var scrollHeight = container.scrollHeight;
|
|
3335
3340
|
// console.log(scrollTop,clientHeight,scrollHeight,'333dfkvmdfv')
|
|
3336
3341
|
if (clientHeight + scrollTop + 0.5 >= scrollHeight && pageNumHistory > 1) {
|
|
3337
|
-
console.log("到底部了22222");
|
|
3338
3342
|
// if (pageNumHistory > 1) {
|
|
3339
3343
|
// console.log(pageNumHistory,'pageNumpageNumpageNum')
|
|
3340
3344
|
var number = pageNumHistory - 1;
|
|
@@ -3344,29 +3348,35 @@ var CustomerService = function(props) {
|
|
|
3344
3348
|
if (number > 0) {
|
|
3345
3349
|
setBottomLoading(true);
|
|
3346
3350
|
getHistoryMessage(number, 4);
|
|
3351
|
+
setLastId("");
|
|
3347
3352
|
} else {
|
|
3348
3353
|
setPageNumHistory(0);
|
|
3349
3354
|
}
|
|
3350
|
-
},
|
|
3355
|
+
}, 1000);
|
|
3351
3356
|
// } else {
|
|
3352
|
-
// setLastId("");
|
|
3353
3357
|
// }
|
|
3354
3358
|
}
|
|
3355
3359
|
if (scrollTop == 0 && pageCount > pageNum && pageCount > 0) {
|
|
3356
3360
|
console.log("到顶了", pageNum);
|
|
3357
|
-
// if(pageNum == 1){
|
|
3358
|
-
// setFirstpage(true);//代表是否存在第一页
|
|
3359
|
-
// }
|
|
3360
3361
|
setLoading(true);
|
|
3361
3362
|
var number1 = pageNum + 1;
|
|
3362
3363
|
setPageNum(function(pageNum) {
|
|
3363
3364
|
return pageNum + 1;
|
|
3364
3365
|
});
|
|
3365
3366
|
listTimer.current = setTimeout(function() {
|
|
3366
|
-
console.log("下拉加载下一页", number1);
|
|
3367
3367
|
getHistoryMessage(number1, 2);
|
|
3368
3368
|
}, 1000);
|
|
3369
3369
|
}
|
|
3370
|
+
//生成答案过程中
|
|
3371
|
+
if (!finished && scrollTopHei.current > scrollTop) {
|
|
3372
|
+
// setIsPosition(false);
|
|
3373
|
+
isPosition.current = false;
|
|
3374
|
+
}
|
|
3375
|
+
if (!finished && clientHeight + scrollTop >= scrollHeight) {
|
|
3376
|
+
// console.log('到顶了111');
|
|
3377
|
+
isPosition.current = true;
|
|
3378
|
+
}
|
|
3379
|
+
scrollTopHei.current = scrollTop;
|
|
3370
3380
|
}
|
|
3371
3381
|
var content = document.getElementById(showType == 1 || showType == 3 ? "chat_content" : "chat_content_modal");
|
|
3372
3382
|
if (content) {
|
|
@@ -3645,11 +3655,13 @@ var CustomerService = function(props) {
|
|
|
3645
3655
|
}));
|
|
3646
3656
|
return newHistoryMessageList;
|
|
3647
3657
|
});
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3658
|
+
// console.log(lastId,'消息发送给老师111');
|
|
3659
|
+
// if (!lastId) {
|
|
3660
|
+
setTimeout(function() {
|
|
3661
|
+
console.log("滚动到底部");
|
|
3662
|
+
scrollToBottom();
|
|
3663
|
+
}, 100);
|
|
3664
|
+
// }
|
|
3653
3665
|
}
|
|
3654
3666
|
//判断当前窗口是否是
|
|
3655
3667
|
if (type == 1) {
|
|
@@ -3974,11 +3986,19 @@ var CustomerService = function(props) {
|
|
|
3974
3986
|
}
|
|
3975
3987
|
if (msg.finished) {
|
|
3976
3988
|
setFinished(true); //发送结束
|
|
3989
|
+
// isPosition.current = true;
|
|
3990
|
+
setTimeout(function() {
|
|
3991
|
+
isPosition.current = true;
|
|
3992
|
+
}, 100);
|
|
3977
3993
|
testLabQuestion(JSON.parse(data).message, content, "");
|
|
3978
3994
|
}
|
|
3979
3995
|
},
|
|
3980
3996
|
onclose: function() {
|
|
3981
3997
|
setFinished(true); //发送结束
|
|
3998
|
+
// isPosition.current = true;
|
|
3999
|
+
setTimeout(function() {
|
|
4000
|
+
isPosition.current = true;
|
|
4001
|
+
}, 100);
|
|
3982
4002
|
setHistoryMessageList(function(historyMessageList) {
|
|
3983
4003
|
return historyMessageList.filter(function(item) {
|
|
3984
4004
|
return item.id != "123456";
|
|
@@ -4043,9 +4063,11 @@ var CustomerService = function(props) {
|
|
|
4043
4063
|
return newHistoryMessageList2;
|
|
4044
4064
|
}
|
|
4045
4065
|
});
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
|
|
4066
|
+
setTimeout(function() {
|
|
4067
|
+
if (isPosition.current) {
|
|
4068
|
+
scrollToBottom();
|
|
4069
|
+
}
|
|
4070
|
+
}, 10);
|
|
4049
4071
|
};
|
|
4050
4072
|
//问题记录到实验报告中
|
|
4051
4073
|
var testLabQuestion = function(title, content, teachId) {
|
|
@@ -4093,13 +4115,14 @@ var CustomerService = function(props) {
|
|
|
4093
4115
|
var getHistoryMessage = function(pageNum, flag) {
|
|
4094
4116
|
var id = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "1", raw_data = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : [];
|
|
4095
4117
|
clearTimeout(roomMessage.current);
|
|
4096
|
-
|
|
4118
|
+
console.log(pageNum, flag, "dkfjvndfjvndfkvdf");
|
|
4097
4119
|
// flag == 1 时已经设置好了位置标记
|
|
4098
4120
|
var last_id = "";
|
|
4099
4121
|
if (flag == 2 && historyMessageList.length > 0) {
|
|
4100
4122
|
last_id = historyMessageList[0].id;
|
|
4101
4123
|
}
|
|
4102
4124
|
if (flag != 1 && last_id != "") {
|
|
4125
|
+
console.log(last_id, "dkfjvndfjvndfkvdflast_idlast_idlast_id");
|
|
4103
4126
|
setLastId(last_id);
|
|
4104
4127
|
}
|
|
4105
4128
|
//取消搜索页码标记
|
|
@@ -4245,6 +4268,7 @@ var CustomerService = function(props) {
|
|
|
4245
4268
|
if (!lastId && originList != newList) {
|
|
4246
4269
|
setTimeout(function() {
|
|
4247
4270
|
scrollToBottom();
|
|
4271
|
+
readMessage(roomId, urllocation, userData, http);
|
|
4248
4272
|
}, 100);
|
|
4249
4273
|
}
|
|
4250
4274
|
}
|
|
@@ -5177,7 +5201,7 @@ var CustomerService = function(props) {
|
|
|
5177
5201
|
return /*#__PURE__*/ jsxs("div", {
|
|
5178
5202
|
className: "".concat(styles.operate_modal_bottom),
|
|
5179
5203
|
style: {
|
|
5180
|
-
position: showStopBtn ? "sticky" : "relative"
|
|
5204
|
+
position: showStopBtn && isPosition.current ? "sticky" : "relative"
|
|
5181
5205
|
},
|
|
5182
5206
|
children: [
|
|
5183
5207
|
/*#__PURE__*/ jsxs("p", {
|
|
@@ -5382,7 +5406,7 @@ var CustomerService = function(props) {
|
|
|
5382
5406
|
var placeholder = "";
|
|
5383
5407
|
var disabled = false;
|
|
5384
5408
|
if (voiceRecordingStatus == 2) {
|
|
5385
|
-
placeholder = "
|
|
5409
|
+
placeholder = "正在录制语音,再次点击麦克风结束录制。";
|
|
5386
5410
|
} else if (voiceRecordingStatus == 1) {
|
|
5387
5411
|
placeholder = "正在语音识别文字,请稍后...";
|
|
5388
5412
|
} else if (!finished) {
|
|
@@ -5460,6 +5484,11 @@ var CustomerService = function(props) {
|
|
|
5460
5484
|
setQuestionsList([]);
|
|
5461
5485
|
setAnswerMode(-1);
|
|
5462
5486
|
setTeacherList([]);
|
|
5487
|
+
setTimeout(function() {
|
|
5488
|
+
setQuestionsList([]);
|
|
5489
|
+
setTeacherList([]);
|
|
5490
|
+
clearTimeout(timer.current);
|
|
5491
|
+
}, 200);
|
|
5463
5492
|
setHistoryMessageList(function(historyMessageList) {
|
|
5464
5493
|
return historyMessageList.filter(function(item) {
|
|
5465
5494
|
return item.id != "-1";
|
|
@@ -5569,6 +5598,11 @@ var CustomerService = function(props) {
|
|
|
5569
5598
|
setQuestionsList([]);
|
|
5570
5599
|
setAnswerMode(-1);
|
|
5571
5600
|
setTeacherList([]);
|
|
5601
|
+
setTimeout(function() {
|
|
5602
|
+
setQuestionsList([]);
|
|
5603
|
+
setTeacherList([]);
|
|
5604
|
+
clearTimeout(timer.current);
|
|
5605
|
+
}, 200);
|
|
5572
5606
|
setHistoryMessageList(function(historyMessageList) {
|
|
5573
5607
|
return historyMessageList.filter(function(item) {
|
|
5574
5608
|
return item.id != "-1";
|