bhd-components 0.7.21 → 0.7.22
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/{13653d98.esm.es5.production.js → cf6d2143.esm.es5.production.js} +1 -1
- package/dist/{49e31ffd.esm.es5.development.js → fcb57c77.esm.es5.development.js} +1 -1
- package/dist/index.esm.es5.development.css +500 -495
- package/dist/index.esm.es5.development.js +122 -41
- package/dist/index.esm.es5.production.css +1 -1
- package/dist/index.esm.es5.production.js +1 -1
- package/es2017/customerService/historyFun.js +14 -5
- package/es2017/customerService/index.js +36 -14
- package/es2017/customerService/index.module.less +4 -0
- package/es2017/customerService/teacherList.js +62 -19
- package/esm/customerService/historyFun.js +14 -5
- package/esm/customerService/index.js +38 -14
- package/esm/customerService/index.module.less +4 -0
- package/esm/customerService/teacherList.js +68 -19
- 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, X, y as I, H, A as Remarkable, D as Drawer, B as HighlightJS, Z as ZoomInOutlined, F as _to_consumable_array } from './
|
|
2
|
-
export { G as Affix, J as Alert, K as Anchor, aF as App, N as AutoComplete, O as Avatar, U as BackTop, V as Badge, W as Breadcrumb, Y as Button, $ as Calendar, a0 as Card, a1 as Carousel, a2 as Cascader, a3 as Checkbox, a4 as Col, a5 as Collapse, a6 as DatePicker, a7 as Descriptions, a8 as Divider, D as Drawer, a9 as Dropdown, aa as Empty, Q as FloatButton, ab as Form, ac as Grid, ad as Image, v as Input, ae as InputNumber, af as Layout, ag as List, ah as Mentions, ai as Menu, M as Modal, ak as Popconfirm, al as Popover, am as Progress, aM as QRCode, an as Radio, ao as Rate, ap as Result, aq as Row, ar as Segmented, g as Select, as as Skeleton, at as Slider, au as Space, av as Spin, aw as Statistic, ax as Steps, ay as Switch, az as Tabs, aA as Tag, aC as TimePicker, aD as Timeline, T as Tooltip, aE as Tour, aG as Transfer, aH as Tree, aI as TreeSelect, aJ as Typography, aK as Upload, aL as Watermark, aO as en_US, aj as notification, aB as theme, aN 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, X, y as I, H, A as Remarkable, D as Drawer, B as HighlightJS, Z as ZoomInOutlined, F as _to_consumable_array } from './fcb57c77.esm.es5.development.js';
|
|
2
|
+
export { G as Affix, J as Alert, K as Anchor, aF as App, N as AutoComplete, O as Avatar, U as BackTop, V as Badge, W as Breadcrumb, Y as Button, $ as Calendar, a0 as Card, a1 as Carousel, a2 as Cascader, a3 as Checkbox, a4 as Col, a5 as Collapse, a6 as DatePicker, a7 as Descriptions, a8 as Divider, D as Drawer, a9 as Dropdown, aa as Empty, Q as FloatButton, ab as Form, ac as Grid, ad as Image, v as Input, ae as InputNumber, af as Layout, ag as List, ah as Mentions, ai as Menu, M as Modal, ak as Popconfirm, al as Popover, am as Progress, aM as QRCode, an as Radio, ao as Rate, ap as Result, aq as Row, ar as Segmented, g as Select, as as Skeleton, at as Slider, au as Space, av as Spin, aw as Statistic, ax as Steps, ay as Switch, az as Tabs, aA as Tag, aC as TimePicker, aD as Timeline, T as Tooltip, aE as Tour, aG as Transfer, aH as Tree, aI as TreeSelect, aJ as Typography, aK as Upload, aL as Watermark, aO as en_US, aj as notification, aB as theme, aN as version, z as zh_CN } from './fcb57c77.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';
|
|
@@ -2377,7 +2377,7 @@ function BhdAppLayout(props) {
|
|
|
2377
2377
|
});
|
|
2378
2378
|
}
|
|
2379
2379
|
|
|
2380
|
-
var modules_63b47c51 = {"service_ChatWindow_Drawer":"
|
|
2380
|
+
var modules_63b47c51 = {"service_ChatWindow_Drawer":"index_module_service_ChatWindow_Drawer__db13568b","ChatWindow_Modal":"index_module_ChatWindow_Modal__db13568b","ChatWindow_Drawer":"index_module_ChatWindow_Drawer__db13568b","header_wrap":"index_module_header_wrap__db13568b","top":"index_module_top__db13568b","user":"index_module_user__db13568b","count":"index_module_count__db13568b","operate":"index_module_operate__db13568b","line":"index_module_line__db13568b","popover_main":"index_module_popover_main__db13568b","popover":"index_module_popover__db13568b","header_wrap_newlabo":"index_module_header_wrap_newlabo__db13568b","Drawer_main":"index_module_Drawer_main__db13568b","loading":"index_module_loading__db13568b","message_con":"index_module_message_con__db13568b","left":"index_module_left__db13568b","head_sculpture":"index_module_head_sculpture__db13568b","main_content":"index_module_main_content__db13568b","right":"index_module_right__db13568b","main":"index_module_main__db13568b","main_content_flag":"index_module_main_content_flag__db13568b","operate_modal":"index_module_operate_modal__db13568b","operate_modal_bottom":"index_module_operate_modal_bottom__db13568b","active":"index_module_active__db13568b","stop_generate":"index_module_stop_generate__db13568b","icon":"index_module_icon__db13568b","find_teacher":"index_module_find_teacher__db13568b","stop_findTeacher":"index_module_stop_findTeacher__db13568b","content":"index_module_content__db13568b","content_child":"index_module_content_child__db13568b","find_teacher_con":"index_module_find_teacher_con__db13568b","sign":"index_module_sign__db13568b","ask_question":"index_module_ask_question__db13568b","association_problem":"index_module_association_problem__db13568b","association_problem_flag":"index_module_association_problem_flag__db13568b","related_issues_flag":"index_module_related_issues_flag__db13568b","img_con":"index_module_img_con__db13568b","mask_zoom":"index_module_mask_zoom__db13568b","img_con2":"index_module_img_con2__db13568b","copyCode":"index_module_copyCode__db13568b","time":"index_module_time__db13568b","citation_content":"index_module_citation_content__db13568b","text_exceed":"index_module_text_exceed__db13568b","popover_content":"index_module_popover_content__db13568b","Drawer_main_newlabo":"index_module_Drawer_main_newlabo__db13568b","Drawer_main_newlabo_no_pic":"index_module_Drawer_main_newlabo_no_pic__db13568b","Drawer_buttom_Issues_List":"index_module_Drawer_buttom_Issues_List__db13568b","issues_list_teacherList":"index_module_issues_list_teacherList__db13568b","item":"index_module_item__db13568b","issues_list":"index_module_issues_list__db13568b","issues_list_flag":"index_module_issues_list_flag__db13568b","Drawer_buttom":"index_module_Drawer_buttom__db13568b","input_wrap":"index_module_input_wrap__db13568b","input":"index_module_input__db13568b","picture_layout":"index_module_picture_layout__db13568b","icon_close":"index_module_icon_close__db13568b","icon_zoom":"index_module_icon_zoom__db13568b","anticon":"index_module_anticon__db13568b","no_AI":"index_module_no_AI__db13568b","screenshot":"index_module_screenshot__db13568b","disabled":"index_module_disabled__db13568b","content_main":"index_module_content_main__db13568b","content_con":"index_module_content_con__db13568b","delete_quote":"index_module_delete_quote__db13568b","sending":"index_module_sending__db13568b","Drawer_buttom_Issues_List_newlabo":"index_module_Drawer_buttom_Issues_List_newlabo__db13568b","main_list":"index_module_main_list__db13568b","chat_content":"index_module_chat_content__db13568b","popover_main_content":"index_module_popover_main_content__db13568b","popover_main_content_name":"index_module_popover_main_content_name__db13568b","teacher_layout":"index_module_teacher_layout__db13568b","bottom":"index_module_bottom__db13568b","delete":"index_module_delete__db13568b","num":"index_module_num__db13568b","shrink":"index_module_shrink__db13568b","teacher_layout_newlabo":"index_module_teacher_layout_newlabo__db13568b","teacher_layout_modal":"index_module_teacher_layout_modal__db13568b","ai":"index_module_ai__db13568b","user_info":"index_module_user_info__db13568b","message":"index_module_message__db13568b","con":"index_module_con__db13568b","teacher_layout_modal_newlabo":"index_module_teacher_layout_modal_newlabo__db13568b","history_list":"index_module_history_list__db13568b","search_layout":"index_module_search_layout__db13568b","mymove":"index_module_mymove__db13568b","title":"index_module_title__db13568b","search_top":"index_module_search_top__db13568b","list_item":"index_module_list_item__db13568b","list_summary":"index_module_list_summary__db13568b","head_img":"index_module_head_img__db13568b","list_desc":"index_module_list_desc__db13568b","name":"index_module_name__db13568b","decs":"index_module_decs__db13568b","open":"index_module_open__db13568b","list_summary_active":"index_module_list_summary_active__db13568b","list_detail":"index_module_list_detail__db13568b","list":"index_module_list__db13568b","list_more":"index_module_list_more__db13568b","no_data":"index_module_no_data__db13568b","history_list_broadside":"index_module_history_list_broadside__db13568b","teacher_list":"index_module_teacher_list__db13568b","screenshot_Modal":"index_module_screenshot_Modal__db13568b","screenshot_Modal_btn":"index_module_screenshot_Modal_btn__db13568b"};
|
|
2381
2381
|
|
|
2382
2382
|
//消息已读
|
|
2383
2383
|
var readMessage = function(roomId, urllocation, userData, http) {
|
|
@@ -2865,15 +2865,19 @@ var HistoryFun = function(props) {
|
|
|
2865
2865
|
var span = "";
|
|
2866
2866
|
var time = "";
|
|
2867
2867
|
if (item.count == 1) {
|
|
2868
|
+
var message = item.message;
|
|
2869
|
+
var position_i = message.indexOf(keyWordProblem);
|
|
2870
|
+
if (position_i > 30) {
|
|
2871
|
+
message = message.substring(position_i - 15);
|
|
2872
|
+
}
|
|
2868
2873
|
var reg = /[`~!@#$%^&*()_\-+=<>?:"{}|,.\/;'\\[\]·~!@#¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、]/im;
|
|
2869
2874
|
//搜索内容是否有特殊字符
|
|
2870
2875
|
if (reg.test(keyWordProblem)) {
|
|
2871
|
-
span =
|
|
2876
|
+
span = message.replaceAll(keyWordProblem, function(e) {
|
|
2872
2877
|
return "<span class=".concat(modules_63b47c51.sign, ">").concat(e, "</span>");
|
|
2873
2878
|
});
|
|
2874
2879
|
} else {
|
|
2875
|
-
span =
|
|
2876
|
-
// console.log(i,'skdcnsdjk')
|
|
2880
|
+
span = message.replaceAll(new RegExp(keyWordProblem, "ig"), function(i) {
|
|
2877
2881
|
return "<span class=".concat(modules_63b47c51.sign, ">").concat(i, "</span>");
|
|
2878
2882
|
});
|
|
2879
2883
|
}
|
|
@@ -2947,13 +2951,18 @@ var HistoryFun = function(props) {
|
|
|
2947
2951
|
var time = formatDate(list.updatedAt);
|
|
2948
2952
|
var reg = /[`~!@#$%^&*()_\-+=<>?:"{}|,.\/;'\\[\]·~!@#¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、]/im;
|
|
2949
2953
|
var span = "";
|
|
2954
|
+
var message = list.message;
|
|
2955
|
+
var position_i = message.indexOf(keyWordProblem);
|
|
2956
|
+
if (position_i > 30) {
|
|
2957
|
+
message = message.substring(position_i - 15);
|
|
2958
|
+
}
|
|
2950
2959
|
//搜索内容是否有特殊字符
|
|
2951
2960
|
if (reg.test(keyWordProblem)) {
|
|
2952
|
-
span =
|
|
2961
|
+
span = message.replaceAll(keyWordProblem, function(e) {
|
|
2953
2962
|
return "<span class=".concat(modules_63b47c51.sign, ">").concat(e, "</span>");
|
|
2954
2963
|
});
|
|
2955
2964
|
} else {
|
|
2956
|
-
span =
|
|
2965
|
+
span = message.replaceAll(new RegExp(keyWordProblem, "ig"), function(i) {
|
|
2957
2966
|
// console.log(i,'skdcnsdjk')
|
|
2958
2967
|
return "<span class=".concat(modules_63b47c51.sign, ">").concat(i, "</span>");
|
|
2959
2968
|
});
|
|
@@ -3324,8 +3333,35 @@ var TeacherList = function(props) {
|
|
|
3324
3333
|
var _useState = _sliced_to_array(useState(""), 2), keyWordProblem = _useState[0], setKeyWordProblem = _useState[1]; //搜索内容
|
|
3325
3334
|
var _useState1 = _sliced_to_array(useState(1), 2), showLoadingState = _useState1[0], setShowLoadingState = _useState1[1]; //1,初始状态,2、无数据 ,3、不显示图片
|
|
3326
3335
|
var _useState2 = _sliced_to_array(useState([]), 2), totalData = _useState2[0], setTotalData = _useState2[1]; //总数据
|
|
3327
|
-
|
|
3336
|
+
// const [teacher_list, setTeacher_list] = useState([]); //老师列表,有头像
|
|
3337
|
+
var teacher_list = useRef([]); //老师列表,有头像
|
|
3328
3338
|
var timer = useRef(null); //文本框输入时
|
|
3339
|
+
var page = useRef(1);
|
|
3340
|
+
var loading = useRef(true);
|
|
3341
|
+
var sliderRef = useRef(null);
|
|
3342
|
+
useEffect(function() {
|
|
3343
|
+
var handleScroll = function(e) {
|
|
3344
|
+
// 处理滚轮事件的逻辑
|
|
3345
|
+
var container = document.getElementById("teacher_list");
|
|
3346
|
+
var scrollTop = container.scrollTop;
|
|
3347
|
+
var clientHeight = container.clientHeight;
|
|
3348
|
+
var scrollHeight = container.scrollHeight;
|
|
3349
|
+
if (scrollTop + clientHeight + 60 >= scrollHeight && loading.current) {
|
|
3350
|
+
loading.current = false;
|
|
3351
|
+
// console.log('加载下一页');
|
|
3352
|
+
page.current = page.current + 1;
|
|
3353
|
+
getList(keyWordProblem);
|
|
3354
|
+
}
|
|
3355
|
+
};
|
|
3356
|
+
// 添加滚轮事件监听器
|
|
3357
|
+
sliderRef.current.addEventListener("wheel", handleScroll);
|
|
3358
|
+
// 清除滚轮事件监听器
|
|
3359
|
+
return function() {
|
|
3360
|
+
sliderRef.current.removeEventListener("wheel", handleScroll);
|
|
3361
|
+
};
|
|
3362
|
+
}, [
|
|
3363
|
+
keyWordProblem
|
|
3364
|
+
]);
|
|
3329
3365
|
useEffect(function() {
|
|
3330
3366
|
getList("");
|
|
3331
3367
|
return function() {
|
|
@@ -3333,17 +3369,32 @@ var TeacherList = function(props) {
|
|
|
3333
3369
|
};
|
|
3334
3370
|
}, []);
|
|
3335
3371
|
var getList = function(val) {
|
|
3372
|
+
if (page.current == 1) {
|
|
3373
|
+
setTotalData([]);
|
|
3374
|
+
}
|
|
3336
3375
|
http.get("".concat(urllocation, "/chat-service/public/v1.0/teachers"), {
|
|
3337
3376
|
params: {
|
|
3338
|
-
name: val
|
|
3377
|
+
name: val,
|
|
3378
|
+
page: page.current,
|
|
3379
|
+
maxPageSize: 20
|
|
3339
3380
|
}
|
|
3340
3381
|
}).then(function(res) {
|
|
3341
3382
|
console.log(res);
|
|
3342
|
-
|
|
3343
|
-
|
|
3383
|
+
if (res.data.total > 0) {
|
|
3384
|
+
loading.current = true;
|
|
3344
3385
|
setShowLoadingState(3);
|
|
3345
|
-
|
|
3386
|
+
var data = new Map();
|
|
3387
|
+
setTotalData(function(totalData) {
|
|
3388
|
+
return totalData.concat(res.data.teachers).filter(function(a) {
|
|
3389
|
+
return !data.has(a.uid) && data.set(a.uid, 1);
|
|
3390
|
+
});
|
|
3391
|
+
});
|
|
3346
3392
|
getUserName(res.data.teachers);
|
|
3393
|
+
} else {
|
|
3394
|
+
loading.current = false;
|
|
3395
|
+
if (page.current == 1) {
|
|
3396
|
+
setShowLoadingState(2);
|
|
3397
|
+
}
|
|
3347
3398
|
}
|
|
3348
3399
|
});
|
|
3349
3400
|
};
|
|
@@ -3352,7 +3403,7 @@ var TeacherList = function(props) {
|
|
|
3352
3403
|
var list = dataList;
|
|
3353
3404
|
var ids = [];
|
|
3354
3405
|
list = list.map(function(item) {
|
|
3355
|
-
if (!item.headImg && teacher_list.filter(function(v) {
|
|
3406
|
+
if (!item.headImg && teacher_list.current.filter(function(v) {
|
|
3356
3407
|
return v.uid == item.uid;
|
|
3357
3408
|
}).length <= 0) {
|
|
3358
3409
|
ids.push(item.uid);
|
|
@@ -3371,16 +3422,27 @@ var TeacherList = function(props) {
|
|
|
3371
3422
|
if (name.length > 0) {
|
|
3372
3423
|
return _object_spread({}, item, name[0]);
|
|
3373
3424
|
} else {
|
|
3374
|
-
|
|
3425
|
+
var nameList1 = teacher_list.current;
|
|
3426
|
+
var name1 = nameList1.filter(function(v) {
|
|
3427
|
+
return v.uid == item.uid;
|
|
3428
|
+
});
|
|
3429
|
+
if (name1.length > 0) {
|
|
3430
|
+
return _object_spread({}, item, name1[0]);
|
|
3431
|
+
} else {
|
|
3432
|
+
return item;
|
|
3433
|
+
}
|
|
3375
3434
|
}
|
|
3376
3435
|
});
|
|
3377
|
-
|
|
3436
|
+
var data = new Map();
|
|
3437
|
+
teacher_list.current = teacher_list.current.concat(list).filter(function(a) {
|
|
3438
|
+
return !data.has(a.uid) && data.set(a.uid, 1);
|
|
3439
|
+
});
|
|
3378
3440
|
return list;
|
|
3379
3441
|
});
|
|
3380
3442
|
}
|
|
3381
3443
|
});
|
|
3382
3444
|
} else {
|
|
3383
|
-
var nameList = teacher_list;
|
|
3445
|
+
var nameList = teacher_list.current;
|
|
3384
3446
|
setTotalData(function(list1) {
|
|
3385
3447
|
var list = list1;
|
|
3386
3448
|
list = list.map(function(item) {
|
|
@@ -3393,7 +3455,6 @@ var TeacherList = function(props) {
|
|
|
3393
3455
|
return item;
|
|
3394
3456
|
}
|
|
3395
3457
|
});
|
|
3396
|
-
setTeacher_list(list);
|
|
3397
3458
|
return list;
|
|
3398
3459
|
});
|
|
3399
3460
|
}
|
|
@@ -3444,13 +3505,9 @@ var TeacherList = function(props) {
|
|
|
3444
3505
|
setKeyWordProblem(val);
|
|
3445
3506
|
clearTimeout(timer.current);
|
|
3446
3507
|
timer.current = setTimeout(function() {
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
} else {
|
|
3451
|
-
setShowLoadingState(1);
|
|
3452
|
-
setTotalData([]);
|
|
3453
|
-
}
|
|
3508
|
+
page.current = 1;
|
|
3509
|
+
setTotalData([]);
|
|
3510
|
+
getList(val);
|
|
3454
3511
|
}, 1000);
|
|
3455
3512
|
}
|
|
3456
3513
|
}),
|
|
@@ -3467,7 +3524,7 @@ var TeacherList = function(props) {
|
|
|
3467
3524
|
}),
|
|
3468
3525
|
/*#__PURE__*/ jsxs("div", {
|
|
3469
3526
|
className: modules_63b47c51.main_list,
|
|
3470
|
-
id: "
|
|
3527
|
+
id: "teacher_list",
|
|
3471
3528
|
children: [
|
|
3472
3529
|
showLoadingState == 1 && /*#__PURE__*/ jsxs("div", {
|
|
3473
3530
|
className: modules_63b47c51.no_data,
|
|
@@ -3487,12 +3544,13 @@ var TeacherList = function(props) {
|
|
|
3487
3544
|
src: "/new_yun/images/aiService/no_data.png"
|
|
3488
3545
|
}),
|
|
3489
3546
|
/*#__PURE__*/ jsx("p", {
|
|
3490
|
-
children: "
|
|
3547
|
+
children: "未搜索到老师"
|
|
3491
3548
|
})
|
|
3492
3549
|
]
|
|
3493
3550
|
}),
|
|
3494
3551
|
/*#__PURE__*/ jsx("div", {
|
|
3495
3552
|
className: modules_63b47c51.list_item,
|
|
3553
|
+
ref: sliderRef,
|
|
3496
3554
|
children: totalData.map(function(item) {
|
|
3497
3555
|
var span = item.name.replaceAll(new RegExp(keyWordProblem, "ig"), function(i) {
|
|
3498
3556
|
return "<span class=".concat(modules_63b47c51.sign, ">").concat(i, "</span>");
|
|
@@ -3657,6 +3715,7 @@ var CustomerService = function(props) {
|
|
|
3657
3715
|
console.log(canvas, 99999);
|
|
3658
3716
|
// var base64URL = canvas.toDataURL('image/jpeg')
|
|
3659
3717
|
var base64URL = canvas.toDataURL("image/jpg", 1.0);
|
|
3718
|
+
console.log(base64URL);
|
|
3660
3719
|
setImgBese64(base64URL);
|
|
3661
3720
|
});
|
|
3662
3721
|
} catch (error) {
|
|
@@ -4348,11 +4407,11 @@ var CustomerService = function(props) {
|
|
|
4348
4407
|
ctrl.current = new AbortController();
|
|
4349
4408
|
clearTimeout(receiveMessageTimer.current);
|
|
4350
4409
|
receiveMessageTimer.current = setTimeout(function() {
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
4355
|
-
|
|
4410
|
+
setHistoryMessageList(function(historyMessageList) {
|
|
4411
|
+
return historyMessageList.filter(function(item) {
|
|
4412
|
+
return item.id != "123456";
|
|
4413
|
+
});
|
|
4414
|
+
});
|
|
4356
4415
|
setFinished(true);
|
|
4357
4416
|
ctrl.current.abort();
|
|
4358
4417
|
setHistoryMessageList(function(historyMessageList) {
|
|
@@ -4360,7 +4419,7 @@ var CustomerService = function(props) {
|
|
|
4360
4419
|
roomId: roomId,
|
|
4361
4420
|
sender: "AI",
|
|
4362
4421
|
recevier: mid,
|
|
4363
|
-
message: "
|
|
4422
|
+
message: "AI助手繁忙,请稍后再提问或",
|
|
4364
4423
|
id: "123456",
|
|
4365
4424
|
createdAt: getDataTime(-1),
|
|
4366
4425
|
extraInfo: null
|
|
@@ -4756,11 +4815,9 @@ var CustomerService = function(props) {
|
|
|
4756
4815
|
if (problem != undefined && problem.user != undefined && problem.question != undefined) {
|
|
4757
4816
|
sendToTeacher(1);
|
|
4758
4817
|
}
|
|
4759
|
-
// if(flag == 1){
|
|
4760
4818
|
setTimeout(function() {
|
|
4761
4819
|
setKeyWordProblem("");
|
|
4762
4820
|
}, 3100);
|
|
4763
|
-
// }
|
|
4764
4821
|
} else {
|
|
4765
4822
|
setPageCount(0);
|
|
4766
4823
|
setBottomLoading(false);
|
|
@@ -5449,18 +5506,21 @@ var CustomerService = function(props) {
|
|
|
5449
5506
|
// code = code[1];
|
|
5450
5507
|
// console.log(code,888888888);
|
|
5451
5508
|
if (lastId == item.id && keyWordProblem != "") {
|
|
5452
|
-
|
|
5509
|
+
//点击历史记录时,找到关键字,防止关键字和标签名重复
|
|
5510
|
+
var key_sign = "sign_" + new Date().getTime();
|
|
5453
5511
|
message = message.replaceAll(keyWordProblem, function(e) {
|
|
5454
|
-
return
|
|
5512
|
+
return key_sign;
|
|
5513
|
+
});
|
|
5514
|
+
message = remarkable.render(message);
|
|
5515
|
+
message = message.replaceAll(key_sign, function(e) {
|
|
5516
|
+
return "<span class=".concat(styles.sign, ">").concat(keyWordProblem, "</span>");
|
|
5455
5517
|
});
|
|
5456
5518
|
} else {
|
|
5457
5519
|
message = remarkable.render(message);
|
|
5458
5520
|
}
|
|
5459
5521
|
var position = 0;
|
|
5460
5522
|
message = message.replaceAll(new RegExp("<pre", "ig"), function(i, index) {
|
|
5461
|
-
//copyText(${item.message,2,position})
|
|
5462
5523
|
position++;
|
|
5463
|
-
// console.log(i,index,onClick={copyText} ,'skdcnsdjk')
|
|
5464
5524
|
var text = "<p class='".concat(styles.copyCode, " copyCodeFun' data-id=").concat(item.id, " data-position=").concat(position, ">\n <span class='").concat(styles.icon, ' copy\' >\n <svg\n width="1em"\n height="1em"\n viewBox="0 0 14 14"\n shape-rendering="geometricPrecision"\n fill="currentColor"\n xmlns="http://www.w3.org/2000/svg"\n >\n <g clip-path="url(#clip0_518_8403)">\n <path\n d="M6.16666 1.66666H13.1667C13.4761 1.66666 13.7728 1.78957 13.9916 2.00837C14.2104 2.22716 14.3333 2.5239 14.3333 2.83332V9.83332C14.3333 10.1427 14.2104 10.4395 13.9916 10.6583C13.7728 10.8771 13.4761 11 13.1667 11H6.16666C5.85724 11 5.5605 10.8771 5.34171 10.6583C5.12291 10.4395 5 10.1427 5 9.83332V2.83332C5 2.5239 5.12291 2.22716 5.34171 2.00837C5.5605 1.78957 5.85724 1.66666 6.16666 1.66666ZM6.16666 2.66666C6.12246 2.66666 6.08007 2.68422 6.04881 2.71547C6.01756 2.74673 6 2.78912 6 2.83332V9.83332C6 9.85521 6.00431 9.87688 6.01268 9.8971C6.02106 9.91732 6.03334 9.9357 6.04881 9.95117C6.06429 9.96665 6.08266 9.97893 6.10288 9.9873C6.1231 9.99568 6.14478 9.99999 6.16666 9.99999H13.1667C13.2109 9.99999 13.2533 9.98243 13.2845 9.95117C13.3158 9.91992 13.3333 9.87753 13.3333 9.83332V2.83332C13.3333 2.78912 13.3158 2.74673 13.2845 2.71547C13.2533 2.68422 13.2109 2.66666 13.1667 2.66666H6.16666ZM10 12C10 11.8674 10.0527 11.7402 10.1464 11.6464C10.2402 11.5527 10.3674 11.5 10.5 11.5C10.6326 11.5 10.7598 11.5527 10.8536 11.6464C10.9473 11.7402 11 11.8674 11 12V13.1667C11 13.4761 10.8771 13.7728 10.6583 13.9916C10.4395 14.2104 10.1427 14.3333 9.83333 14.3333H2.83333C2.52391 14.3333 2.22717 14.2104 2.00837 13.9916C1.78958 13.7728 1.66666 13.4761 1.66666 13.1667V6.16666C1.66666 5.85724 1.78958 5.56049 2.00837 5.3417C2.22717 5.12291 2.52391 4.99999 2.83333 4.99999H4C4.13261 4.99999 4.25978 5.05267 4.35355 5.14644C4.44732 5.2402 4.5 5.36738 4.5 5.49999C4.5 5.6326 4.44732 5.75978 4.35355 5.85354C4.25978 5.94731 4.13261 5.99999 4 5.99999H2.83333C2.78913 5.99999 2.74674 6.01755 2.71548 6.04881C2.68422 6.08006 2.66666 6.12245 2.66666 6.16666V13.1667C2.66666 13.2109 2.68422 13.2533 2.71548 13.2845C2.74674 13.3158 2.78913 13.3333 2.83333 13.3333H9.83333C9.87753 13.3333 9.91993 13.3158 9.95118 13.2845C9.98244 13.2533 10 13.2109 10 13.1667V12Z"\n />\n </g>\n <defs>\n <clipPath id="clip0_518_8403">\n <rect width="16" height="16" />\n </clipPath>\n </defs>\n </svg>\n </span>\n <span class=\'').concat(styles.icon, ' copy_success_flag\'>\n <svg\n width="1em"\n height="1em"\n shape-rendering="geometricPrecision"\n fill="currentColor"\n viewBox="0 0 12 7"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path d="M11.2242 0.375687C11.4586 0.610002 11.4586 0.989901 11.2242 1.22422L4.82424 7.62422C4.58992 7.85853 4.21003 7.85853 3.97571 7.62422L0.775712 4.42422C0.541397 4.1899 0.541397 3.81 0.775712 3.57569C1.01003 3.34137 1.38993 3.34137 1.62424 3.57569L4.39998 6.35142L10.3757 0.375687C10.61 0.141373 10.9899 0.141373 11.2242 0.375687Z" />\n </svg>\n </span><span class="copyCode">复制代码</span></p><pre');
|
|
5465
5525
|
return text;
|
|
5466
5526
|
});
|
|
@@ -5653,12 +5713,33 @@ var CustomerService = function(props) {
|
|
|
5653
5713
|
/*#__PURE__*/ jsxs("div", {
|
|
5654
5714
|
className: styles.content,
|
|
5655
5715
|
children: [
|
|
5656
|
-
/*#__PURE__*/ jsx("p", {
|
|
5716
|
+
item.message != "AI助手繁忙,请稍后再提问或" && /*#__PURE__*/ jsx("p", {
|
|
5657
5717
|
dangerouslySetInnerHTML: {
|
|
5658
5718
|
__html: message
|
|
5659
5719
|
},
|
|
5660
5720
|
className: styles.content_child
|
|
5661
5721
|
}),
|
|
5722
|
+
item.message == "AI助手繁忙,请稍后再提问或" && /*#__PURE__*/ jsxs("p", {
|
|
5723
|
+
children: [
|
|
5724
|
+
"AI助手繁忙,请稍后再提问或",
|
|
5725
|
+
/*#__PURE__*/ jsx("span", {
|
|
5726
|
+
className: styles.find_teacher_con,
|
|
5727
|
+
onClick: function() {
|
|
5728
|
+
var extraInfo = historyMessageList[i - 1].extraInfo;
|
|
5729
|
+
var url = "";
|
|
5730
|
+
if (extraInfo && JSON.parse(extraInfo).length > 0 && JSON.parse(extraInfo)[0].key == "imageUrl" && JSON.parse(extraInfo)[0].value) {
|
|
5731
|
+
url = JSON.parse(extraInfo)[0].value;
|
|
5732
|
+
}
|
|
5733
|
+
setProblem({
|
|
5734
|
+
question: historyMessageList[i - 1].message,
|
|
5735
|
+
url: url
|
|
5736
|
+
});
|
|
5737
|
+
setShowTeacherList(true);
|
|
5738
|
+
},
|
|
5739
|
+
children: "召唤老师回答"
|
|
5740
|
+
})
|
|
5741
|
+
]
|
|
5742
|
+
}),
|
|
5662
5743
|
item.extraInfo && JSON.parse(item.extraInfo).length > 0 && JSON.parse(item.extraInfo)[0].key == "imageUrl" && /*#__PURE__*/ jsxs("p", {
|
|
5663
5744
|
className: "".concat(styles.img_con, " ").concat(showType == 2 || showType == 4 ? styles.img_con2 : ""),
|
|
5664
5745
|
children: [
|
|
@@ -6525,7 +6606,7 @@ var CustomerService = function(props) {
|
|
|
6525
6606
|
mask: false,
|
|
6526
6607
|
rootClassName: styles.service_ChatWindow_Drawer,
|
|
6527
6608
|
children: [
|
|
6528
|
-
showType == 1 && /*#__PURE__*/ jsx("div", {
|
|
6609
|
+
showType == 1 && !showScreenshot && /*#__PURE__*/ jsx("div", {
|
|
6529
6610
|
style: {
|
|
6530
6611
|
display: "".concat(showContacts && roomId != "" ? "block" : "none")
|
|
6531
6612
|
},
|