bhd-components 0.9.14 → 0.9.16
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/index.esm.es5.development.css +1099 -1087
- package/dist/index.esm.es5.development.js +147 -142
- package/dist/index.esm.es5.production.css +1 -1
- package/dist/index.esm.es5.production.js +1 -1
- package/dist/vendor.esm.es5.development.js +1 -1
- package/dist/vendor.esm.es5.production.js +1 -1
- package/es2017/customerService/historyFun.js +9 -9
- package/es2017/customerService/index.js +137 -132
- package/es2017/customerService/index.module.less +6 -0
- package/es2017/customerService/index2.module.less +6 -0
- package/esm/customerService/historyFun.js +9 -9
- package/esm/customerService/index.js +137 -132
- package/esm/customerService/index.module.less +6 -0
- package/esm/customerService/index2.module.less +6 -0
- package/package.json +1 -1
|
@@ -322,14 +322,14 @@ const HistoryFun = (props)=>{
|
|
|
322
322
|
})
|
|
323
323
|
]
|
|
324
324
|
}),
|
|
325
|
-
/*#__PURE__*/ _jsx(
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
children: /*#__PURE__*/ _jsxs(
|
|
329
|
-
|
|
330
|
-
|
|
325
|
+
/*#__PURE__*/ _jsx(Spin, {
|
|
326
|
+
spinning: loading,
|
|
327
|
+
tip: "加载中...",
|
|
328
|
+
children: /*#__PURE__*/ _jsxs("div", {
|
|
329
|
+
className: styles.main_list,
|
|
330
|
+
id: "history_list",
|
|
331
331
|
children: [
|
|
332
|
-
showLoadingState == 1 && /*#__PURE__*/ _jsxs("div", {
|
|
332
|
+
!loading && showLoadingState == 1 && /*#__PURE__*/ _jsxs("div", {
|
|
333
333
|
className: styles.no_data,
|
|
334
334
|
children: [
|
|
335
335
|
/*#__PURE__*/ _jsx("img", {
|
|
@@ -340,7 +340,7 @@ const HistoryFun = (props)=>{
|
|
|
340
340
|
})
|
|
341
341
|
]
|
|
342
342
|
}),
|
|
343
|
-
showLoadingState == 2 && /*#__PURE__*/ _jsxs("div", {
|
|
343
|
+
!loading && showLoadingState == 2 && /*#__PURE__*/ _jsxs("div", {
|
|
344
344
|
className: styles.no_data,
|
|
345
345
|
children: [
|
|
346
346
|
/*#__PURE__*/ _jsx("img", {
|
|
@@ -351,7 +351,7 @@ const HistoryFun = (props)=>{
|
|
|
351
351
|
})
|
|
352
352
|
]
|
|
353
353
|
}),
|
|
354
|
-
/*#__PURE__*/ _jsx("div", {
|
|
354
|
+
!loading && /*#__PURE__*/ _jsx("div", {
|
|
355
355
|
className: styles.list_item,
|
|
356
356
|
children: totalData.map((item)=>{
|
|
357
357
|
let span = "";
|
|
@@ -2320,171 +2320,176 @@ const CustomerService = (props)=>{
|
|
|
2320
2320
|
}),
|
|
2321
2321
|
/*#__PURE__*/ _jsx("div", {
|
|
2322
2322
|
className: styles.main,
|
|
2323
|
-
children: /*#__PURE__*/
|
|
2323
|
+
children: /*#__PURE__*/ _jsx("div", {
|
|
2324
2324
|
className: styles.main_content,
|
|
2325
|
-
children:
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2325
|
+
children: /*#__PURE__*/ _jsxs("div", {
|
|
2326
|
+
className: styles.main_content_flag,
|
|
2327
|
+
onMouseEnter: ()=>{
|
|
2328
|
+
const isSmall = showType == 1 || showType == 3;
|
|
2329
|
+
const container = document.getElementById(isSmall ? "chat_content" : "chat_content_modal");
|
|
2330
|
+
if (container) {
|
|
2331
|
+
const dom = container.querySelector(`[id="${item.id}"]`);
|
|
2330
2332
|
if (dom) {
|
|
2331
|
-
const con_h
|
|
2333
|
+
// const con_h=document.getElementById('chat_content').clientHeight-24;//滚动区域的高度
|
|
2334
|
+
const con_h = container.clientHeight - (isSmall ? 24 : 0); //滚动区域的高度;
|
|
2332
2335
|
const rectY = dom.getBoundingClientRect().y - 48;
|
|
2333
|
-
const h = dom.clientHeight + 24; //当前元素高度
|
|
2336
|
+
const h = dom.clientHeight + (isSmall ? 24 : 0); //当前元素高度
|
|
2334
2337
|
const topDom = dom.getElementsByClassName('operate_modal_showtop')[0];
|
|
2335
2338
|
const bottomDom = dom.getElementsByClassName('operate_modal_showbottom')[0];
|
|
2339
|
+
// console.log({h,con_h,rectY,topDom,bottomDom})
|
|
2336
2340
|
if (topDom && bottomDom) {
|
|
2337
|
-
console.log(h, con_h, rectY);
|
|
2338
2341
|
if (rectY > 0) {
|
|
2339
2342
|
topDom.style.cssText = "";
|
|
2340
2343
|
bottomDom.style.cssText = "visibility: hidden;";
|
|
2341
2344
|
// 上下都能显示时,显示到下边
|
|
2342
2345
|
if (h < con_h - rectY) {
|
|
2346
|
+
console.log('上下都能显示时,显示到下边');
|
|
2343
2347
|
topDom.style.cssText = "visibility: hidden;";
|
|
2344
2348
|
bottomDom.style.cssText = "";
|
|
2345
2349
|
}
|
|
2346
2350
|
} else {
|
|
2347
2351
|
// 上下都不显示
|
|
2348
2352
|
if (h > con_h && h - con_h > Math.abs(rectY)) {
|
|
2349
|
-
console.log('
|
|
2353
|
+
console.log('上下都不显示');
|
|
2350
2354
|
topDom.style.cssText = "visibility: hidden;";
|
|
2351
|
-
bottomDom.style.cssText = `top:${-(h + rectY - 51)}px
|
|
2355
|
+
bottomDom.style.cssText = `top:${-(h + rectY - 51 - (isSmall ? 0 : 58))}px;`;
|
|
2352
2356
|
} else {
|
|
2357
|
+
console.log('12312312');
|
|
2353
2358
|
topDom.style.cssText = "visibility: hidden;";
|
|
2354
2359
|
bottomDom.style.cssText = "";
|
|
2355
2360
|
}
|
|
2356
2361
|
}
|
|
2357
2362
|
}
|
|
2358
2363
|
}
|
|
2359
|
-
}
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2364
|
+
}
|
|
2365
|
+
},
|
|
2366
|
+
children: [
|
|
2367
|
+
/*#__PURE__*/ _jsx("div", {
|
|
2368
|
+
className: `${styles.operate_modal} operate_modal_showtop`,
|
|
2369
|
+
children: // 不是最后一行,
|
|
2370
|
+
historyMessageList.length - 1 != i && renderOperateBtn(item, isAiChatWindow, i)
|
|
2371
|
+
}),
|
|
2372
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
2373
|
+
className: styles.content,
|
|
2374
|
+
children: [
|
|
2375
|
+
item.message != 'AI助手繁忙,请稍后再提问或' && /*#__PURE__*/ _jsx("p", {
|
|
2376
|
+
dangerouslySetInnerHTML: {
|
|
2377
|
+
__html: message
|
|
2378
|
+
},
|
|
2379
|
+
className: styles.content_child
|
|
2380
|
+
}),
|
|
2381
|
+
item.message == 'AI助手繁忙,请稍后再提问或' && /*#__PURE__*/ _jsxs("p", {
|
|
2382
|
+
children: [
|
|
2383
|
+
"AI助手繁忙,请稍后再提问或",
|
|
2384
|
+
/*#__PURE__*/ _jsx("span", {
|
|
2385
|
+
className: styles.find_teacher_con,
|
|
2386
|
+
onClick: ()=>{
|
|
2387
|
+
let extraInfo = historyMessageList[i - 1].extraInfo;
|
|
2388
|
+
let url = '';
|
|
2389
|
+
if (extraInfo && JSON.parse(extraInfo).length > 0 && JSON.parse(extraInfo)[0].key == "imageUrl" && JSON.parse(extraInfo)[0].value) {
|
|
2390
|
+
url = JSON.parse(extraInfo)[0].value;
|
|
2391
|
+
}
|
|
2392
|
+
setProblem({
|
|
2393
|
+
question: historyMessageList[i - 1].message,
|
|
2394
|
+
url
|
|
2395
|
+
});
|
|
2396
|
+
setShowTeacherList(true);
|
|
2397
|
+
},
|
|
2398
|
+
children: "召唤老师回答"
|
|
2399
|
+
})
|
|
2400
|
+
]
|
|
2401
|
+
}),
|
|
2402
|
+
!item.quotedMessage && item.extraInfo && JSON.parse(item.extraInfo).length > 0 && JSON.parse(item.extraInfo)[0].key == "imageUrl" && /*#__PURE__*/ _jsxs("p", {
|
|
2403
|
+
className: `${styles.img_con} ${showType == 2 || showType == 4 ? styles.img_con2 : ''}`,
|
|
2404
|
+
children: [
|
|
2405
|
+
/*#__PURE__*/ _jsx("img", {
|
|
2406
|
+
src: JSON.parse(item.extraInfo)[0].value
|
|
2407
|
+
}),
|
|
2408
|
+
/*#__PURE__*/ _jsx("div", {
|
|
2409
|
+
className: styles.mask_zoom,
|
|
2410
|
+
children: /*#__PURE__*/ _jsx(ZoomInOutlined, {
|
|
2380
2411
|
onClick: ()=>{
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
url = JSON.parse(extraInfo)[0].value;
|
|
2385
|
-
}
|
|
2386
|
-
setProblem({
|
|
2387
|
-
question: historyMessageList[i - 1].message,
|
|
2388
|
-
url
|
|
2389
|
-
});
|
|
2390
|
-
setShowTeacherList(true);
|
|
2391
|
-
},
|
|
2392
|
-
children: "召唤老师回答"
|
|
2412
|
+
setViewBase64(JSON.parse(item.extraInfo)[0].value);
|
|
2413
|
+
setVisible(true);
|
|
2414
|
+
}
|
|
2393
2415
|
})
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
/*#__PURE__*/ _jsx("
|
|
2403
|
-
|
|
2404
|
-
children: /*#__PURE__*/ _jsx(ZoomInOutlined, {
|
|
2405
|
-
onClick: ()=>{
|
|
2406
|
-
setViewBase64(JSON.parse(item.extraInfo)[0].value);
|
|
2407
|
-
setVisible(true);
|
|
2408
|
-
}
|
|
2409
|
-
})
|
|
2416
|
+
})
|
|
2417
|
+
]
|
|
2418
|
+
}),
|
|
2419
|
+
item.extraInfo && JSON.parse(item.extraInfo).length > 0 && JSON.parse(item.extraInfo)[0].key == "messageSource" && JSON.parse(item.extraInfo)[0].value != "knowledgebase" && /*#__PURE__*/ _jsxs("ul", {
|
|
2420
|
+
className: `${styles.association_problem} ${item.message == '抱歉,我暂时无法回答这样的问题。' ? styles.association_problem_flag : ''}`,
|
|
2421
|
+
children: [
|
|
2422
|
+
item.message == '抱歉,我暂时无法回答这样的问题。' && /*#__PURE__*/ _jsx("li", {
|
|
2423
|
+
className: styles.related_issues_flag,
|
|
2424
|
+
children: /*#__PURE__*/ _jsx("span", {
|
|
2425
|
+
children: "相关问题"
|
|
2410
2426
|
})
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2427
|
+
}),
|
|
2428
|
+
JSON.parse(item.extraInfo).map((list, index)=>{
|
|
2429
|
+
return /*#__PURE__*/ _jsx("li", {
|
|
2430
|
+
onClick: ()=>{
|
|
2431
|
+
sendMessage(list, 1);
|
|
2432
|
+
setBottomRecommendationQuestions([]);
|
|
2433
|
+
resettingBottomHei();
|
|
2434
|
+
},
|
|
2435
|
+
children: item.message == '抱歉,我暂时无法回答这样的问题。' ? list.question : /*#__PURE__*/ _jsxs(_Fragment, {
|
|
2436
|
+
children: [
|
|
2437
|
+
JSON.parse(item.extraInfo).length > 1 ? index + 1 + '.' : '',
|
|
2438
|
+
list.question
|
|
2439
|
+
]
|
|
2420
2440
|
})
|
|
2421
|
-
})
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2441
|
+
}, i + "_" + index + "_" + list.value);
|
|
2442
|
+
})
|
|
2443
|
+
]
|
|
2444
|
+
}),
|
|
2445
|
+
//findTeacher//是否在召唤老师过程中,是否是最后一条消息
|
|
2446
|
+
!item.findTeacher && historyMessageList.length - 1 == i && item.id != "123456" && item.id != '123456_date' && renderLastOperateBtn(item, isAiChatWindow, i)
|
|
2447
|
+
]
|
|
2448
|
+
}),
|
|
2449
|
+
//引用消息
|
|
2450
|
+
item.quotedMessage && /*#__PURE__*/ _jsxs("div", {
|
|
2451
|
+
className: styles.citation_content,
|
|
2452
|
+
children: [
|
|
2453
|
+
getByteLen(item.quotedMessage) > 120 ? /*#__PURE__*/ _jsx(Tooltip, {
|
|
2454
|
+
overlayClassName: styles.popover_main_content,
|
|
2455
|
+
title: item.quotedMessage,
|
|
2456
|
+
placement: "rightTop",
|
|
2457
|
+
children: /*#__PURE__*/ _jsxs("p", {
|
|
2458
|
+
className: styles.text_exceed,
|
|
2459
|
+
children: [
|
|
2460
|
+
item.quotedMessage,
|
|
2461
|
+
/*#__PURE__*/ _jsx(RightOutlined, {})
|
|
2437
2462
|
]
|
|
2438
|
-
})
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
className: `${styles.operate_modal} ${styles.bottom} operate_modal_showbottom`,
|
|
2445
|
-
children: // 不是最后一行,
|
|
2446
|
-
renderOperateBtn(item, isAiChatWindow, i)
|
|
2447
|
-
})
|
|
2448
|
-
]
|
|
2449
|
-
}),
|
|
2450
|
-
//引用消息
|
|
2451
|
-
item.quotedMessage && /*#__PURE__*/ _jsxs("div", {
|
|
2452
|
-
className: styles.citation_content,
|
|
2453
|
-
children: [
|
|
2454
|
-
getByteLen(item.quotedMessage) > 120 ? /*#__PURE__*/ _jsx(Tooltip, {
|
|
2455
|
-
overlayClassName: styles.popover_main_content,
|
|
2456
|
-
title: item.quotedMessage,
|
|
2457
|
-
placement: "rightTop",
|
|
2458
|
-
children: /*#__PURE__*/ _jsxs("p", {
|
|
2459
|
-
className: styles.text_exceed,
|
|
2463
|
+
})
|
|
2464
|
+
}) : /*#__PURE__*/ _jsx("p", {
|
|
2465
|
+
children: item.quotedMessage
|
|
2466
|
+
}),
|
|
2467
|
+
item.quotedMessage && item.extraInfo && JSON.parse(item.extraInfo).length > 0 && JSON.parse(item.extraInfo)[0].key == "imageUrl" && /*#__PURE__*/ _jsxs("p", {
|
|
2468
|
+
className: `${styles.img_con} ${showType == 2 || showType == 4 ? styles.img_con2 : ''}`,
|
|
2460
2469
|
children: [
|
|
2461
|
-
|
|
2462
|
-
|
|
2470
|
+
/*#__PURE__*/ _jsx("img", {
|
|
2471
|
+
src: JSON.parse(item.extraInfo)[0].value
|
|
2472
|
+
}),
|
|
2473
|
+
/*#__PURE__*/ _jsx("div", {
|
|
2474
|
+
className: styles.mask_zoom,
|
|
2475
|
+
children: /*#__PURE__*/ _jsx(ZoomInOutlined, {
|
|
2476
|
+
onClick: ()=>{
|
|
2477
|
+
setViewBase64(JSON.parse(item.extraInfo)[0].value);
|
|
2478
|
+
setVisible(true);
|
|
2479
|
+
}
|
|
2480
|
+
})
|
|
2481
|
+
})
|
|
2463
2482
|
]
|
|
2464
2483
|
})
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
/*#__PURE__*/ _jsx("div", {
|
|
2475
|
-
className: styles.mask_zoom,
|
|
2476
|
-
children: /*#__PURE__*/ _jsx(ZoomInOutlined, {
|
|
2477
|
-
onClick: ()=>{
|
|
2478
|
-
setViewBase64(JSON.parse(item.extraInfo)[0].value);
|
|
2479
|
-
setVisible(true);
|
|
2480
|
-
}
|
|
2481
|
-
})
|
|
2482
|
-
})
|
|
2483
|
-
]
|
|
2484
|
-
})
|
|
2485
|
-
]
|
|
2486
|
-
})
|
|
2487
|
-
]
|
|
2484
|
+
]
|
|
2485
|
+
}),
|
|
2486
|
+
historyMessageList.length - 1 !== i && /*#__PURE__*/ _jsx("div", {
|
|
2487
|
+
className: `${styles.operate_modal} ${styles.bottom} operate_modal_showbottom`,
|
|
2488
|
+
children: // 不是最后一行,
|
|
2489
|
+
renderOperateBtn(item, isAiChatWindow, i)
|
|
2490
|
+
})
|
|
2491
|
+
]
|
|
2492
|
+
})
|
|
2488
2493
|
})
|
|
2489
2494
|
})
|
|
2490
2495
|
]
|
|
@@ -327,14 +327,14 @@ var HistoryFun = function(props) {
|
|
|
327
327
|
})
|
|
328
328
|
]
|
|
329
329
|
}),
|
|
330
|
-
/*#__PURE__*/ _jsx(
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
children: /*#__PURE__*/ _jsxs(
|
|
334
|
-
|
|
335
|
-
|
|
330
|
+
/*#__PURE__*/ _jsx(Spin, {
|
|
331
|
+
spinning: loading,
|
|
332
|
+
tip: "加载中...",
|
|
333
|
+
children: /*#__PURE__*/ _jsxs("div", {
|
|
334
|
+
className: styles.main_list,
|
|
335
|
+
id: "history_list",
|
|
336
336
|
children: [
|
|
337
|
-
showLoadingState == 1 && /*#__PURE__*/ _jsxs("div", {
|
|
337
|
+
!loading && showLoadingState == 1 && /*#__PURE__*/ _jsxs("div", {
|
|
338
338
|
className: styles.no_data,
|
|
339
339
|
children: [
|
|
340
340
|
/*#__PURE__*/ _jsx("img", {
|
|
@@ -345,7 +345,7 @@ var HistoryFun = function(props) {
|
|
|
345
345
|
})
|
|
346
346
|
]
|
|
347
347
|
}),
|
|
348
|
-
showLoadingState == 2 && /*#__PURE__*/ _jsxs("div", {
|
|
348
|
+
!loading && showLoadingState == 2 && /*#__PURE__*/ _jsxs("div", {
|
|
349
349
|
className: styles.no_data,
|
|
350
350
|
children: [
|
|
351
351
|
/*#__PURE__*/ _jsx("img", {
|
|
@@ -356,7 +356,7 @@ var HistoryFun = function(props) {
|
|
|
356
356
|
})
|
|
357
357
|
]
|
|
358
358
|
}),
|
|
359
|
-
/*#__PURE__*/ _jsx("div", {
|
|
359
|
+
!loading && /*#__PURE__*/ _jsx("div", {
|
|
360
360
|
className: styles.list_item,
|
|
361
361
|
children: totalData.map(function(item) {
|
|
362
362
|
var span = "";
|