bhd-components 0.7.10 → 0.7.12
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 +2 -3
- package/dist/{a23d0ed7.esm.es5.production.js → 367716ff.esm.es5.production.js} +1 -1
- package/dist/{e7af2e4a.esm.es5.development.js → 4507d48e.esm.es5.development.js} +72 -96
- package/dist/index.esm.es5.development.css +2016 -1960
- package/dist/index.esm.es5.development.js +99 -53
- package/dist/index.esm.es5.production.css +1 -1
- package/dist/index.esm.es5.production.js +1 -1
- package/es2017/customerService/contactsList.js +1 -1
- package/es2017/customerService/index.js +81 -41
- package/es2017/customerService/index.module.less +15 -3
- package/es2017/customerService/index2.module.less +15 -3
- package/es2017/customerService/screenshotTool.js +13 -7
- package/esm/customerService/contactsList.js +1 -1
- package/esm/customerService/index.js +82 -42
- package/esm/customerService/index.module.less +15 -3
- package/esm/customerService/index2.module.less +15 -3
- package/esm/customerService/screenshotTool.js +13 -7
- package/package.json +1 -1
|
@@ -114,7 +114,7 @@ const ContactsList = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
114
114
|
}) : /*#__PURE__*/ _jsxs("div", {
|
|
115
115
|
className: `${styles.teacher_layout} ${type == 3 ? styles.teacher_layout_newlabo : ""}`,
|
|
116
116
|
style: {
|
|
117
|
-
left: type == 3 ? document.getElementById("box").offsetWidth + 10 + "px" : "auto"
|
|
117
|
+
left: type == 3 ? document.getElementById("box") && document.getElementById("box").offsetWidth + 10 + "px" : "auto"
|
|
118
118
|
},
|
|
119
119
|
children: [
|
|
120
120
|
/*#__PURE__*/ _jsxs("div", {
|
|
@@ -64,6 +64,7 @@ const CustomerService = (props)=>{
|
|
|
64
64
|
const [viewBase64, setViewBase64] = useState(""); //图片预览
|
|
65
65
|
const [visible, setVisible] = useState(false); //是否显示图片预览
|
|
66
66
|
const [bottomRecommendationQuestions, setBottomRecommendationQuestions] = useState([]); //底部推荐问题
|
|
67
|
+
const [showScreenshot, setShowScreenshot] = useState(false); //是否显示截图 主要用于newlabo页面
|
|
67
68
|
const [saveShowType, setSaveShowType] = useState(-1); //保存截图时的状态
|
|
68
69
|
const timer = useRef(null); //文本框输入时
|
|
69
70
|
let receiveMessageTimer = useRef(null); //接收ai发回的消息
|
|
@@ -92,22 +93,17 @@ const CustomerService = (props)=>{
|
|
|
92
93
|
}
|
|
93
94
|
});
|
|
94
95
|
useEffect(()=>{
|
|
95
|
-
|
|
96
|
-
// getQuestiionsList("", 1);
|
|
97
|
-
if (props.config && props.config.type == 'video') {
|
|
96
|
+
if (config && config.type == 'video') {
|
|
98
97
|
//获取热门推荐
|
|
99
98
|
videoPageQuestiionsList(1);
|
|
100
|
-
// getQuestiionsList("", 3)
|
|
101
99
|
}
|
|
102
100
|
setShowType(initShowType);
|
|
103
|
-
//获取视频页面推荐问题
|
|
104
|
-
// videoPageQuestiionsList();
|
|
105
|
-
// scrollToBottom();
|
|
106
101
|
}, [
|
|
107
102
|
initShowType
|
|
108
103
|
]);
|
|
109
104
|
useEffect(()=>{
|
|
110
|
-
|
|
105
|
+
//|| showScreenshot
|
|
106
|
+
if (showType == 5 || showScreenshot) {
|
|
111
107
|
try {
|
|
112
108
|
setImgBese64('');
|
|
113
109
|
// html2canvas(document.getElementsByTagName('html')[0],{
|
|
@@ -200,7 +196,8 @@ const CustomerService = (props)=>{
|
|
|
200
196
|
}, [
|
|
201
197
|
historyMessageList,
|
|
202
198
|
showType,
|
|
203
|
-
pageCount
|
|
199
|
+
pageCount,
|
|
200
|
+
showScreenshot
|
|
204
201
|
]);
|
|
205
202
|
useEffect(()=>{
|
|
206
203
|
resettingBottomHei();
|
|
@@ -694,6 +691,10 @@ const CustomerService = (props)=>{
|
|
|
694
691
|
sendingExistingIssues(2, dataObj, "");
|
|
695
692
|
testLabQuestion(obj.message, questions.answer, "");
|
|
696
693
|
}
|
|
694
|
+
if (type == 2 && config && config.type == 'video') {
|
|
695
|
+
//先请求问题列表
|
|
696
|
+
videoPageQuestiionsList(2);
|
|
697
|
+
}
|
|
697
698
|
});
|
|
698
699
|
};
|
|
699
700
|
//向AI发送问题 type == 1 发送点赞或踩消息,type == 2 发送重新生成消息,type == 3 正常发送消息
|
|
@@ -720,8 +721,8 @@ const CustomerService = (props)=>{
|
|
|
720
721
|
});
|
|
721
722
|
});
|
|
722
723
|
}, 60 * 1000);
|
|
723
|
-
if (
|
|
724
|
-
let params =
|
|
724
|
+
if (config && config.type == 'video' && config.params) {
|
|
725
|
+
let params = config.params;
|
|
725
726
|
let videoId = params.videoId;
|
|
726
727
|
let watchTime = params.videoProgress;
|
|
727
728
|
let courseId = getQuery('yc_id');
|
|
@@ -776,7 +777,7 @@ const CustomerService = (props)=>{
|
|
|
776
777
|
});
|
|
777
778
|
scrollToBottom();
|
|
778
779
|
}
|
|
779
|
-
if (
|
|
780
|
+
if (config && config.type == 'video') {
|
|
780
781
|
//先请求问题列表
|
|
781
782
|
videoPageQuestiionsList(3);
|
|
782
783
|
}
|
|
@@ -880,6 +881,7 @@ const CustomerService = (props)=>{
|
|
|
880
881
|
}
|
|
881
882
|
if (msg.finished) {
|
|
882
883
|
setFinished(true); //发送结束
|
|
884
|
+
videoPageQuestiionsList(2);
|
|
883
885
|
// isPosition.current = true;
|
|
884
886
|
setTimeout(()=>{
|
|
885
887
|
isPosition.current = true;
|
|
@@ -1267,6 +1269,7 @@ const CustomerService = (props)=>{
|
|
|
1267
1269
|
};
|
|
1268
1270
|
//获取问题列表flag ==1 是问候消息 2,搜索列表 展示相关问题 ,3.视频页面,4.视频联想问题不够时,增加知识库联想问题
|
|
1269
1271
|
const getQuestiionsList = (value, flag)=>{
|
|
1272
|
+
// console.log(flag,'dlfkvdmflkvmdfklv');
|
|
1270
1273
|
let data = {};
|
|
1271
1274
|
if (flag == 1) {
|
|
1272
1275
|
data = {
|
|
@@ -1319,7 +1322,7 @@ const CustomerService = (props)=>{
|
|
|
1319
1322
|
}
|
|
1320
1323
|
}).then((res)=>{
|
|
1321
1324
|
if (res.data.questions) {
|
|
1322
|
-
|
|
1325
|
+
setQuestionsList((questionList)=>{
|
|
1323
1326
|
return [
|
|
1324
1327
|
...questionList,
|
|
1325
1328
|
...res.data.questions
|
|
@@ -1334,16 +1337,20 @@ const CustomerService = (props)=>{
|
|
|
1334
1337
|
//获取视频页面热门问题 flag == 1,默认推荐问题 == 2,底部渲染问题,flag == 3,ai回答后请求相关问题
|
|
1335
1338
|
const videoPageQuestiionsList = (flag = 1)=>{
|
|
1336
1339
|
console.log(flag, props, 3333333);
|
|
1337
|
-
let config = props.config;
|
|
1338
1340
|
if (config && config.type == 'video' && config.params) {
|
|
1339
1341
|
let params = config.params;
|
|
1340
1342
|
let videoId = params.videoId;
|
|
1341
1343
|
let watchTime = params.videoProgress;
|
|
1342
1344
|
let courseId = getQuery('yc_id');
|
|
1343
1345
|
let sectionId = params.VideoBriefSummaryId;
|
|
1346
|
+
// let courseId="20899",
|
|
1347
|
+
// sectionId= "462347",
|
|
1348
|
+
// videoId= "29707",
|
|
1349
|
+
// watchTime= 262
|
|
1344
1350
|
if (videoId && courseId && sectionId) {
|
|
1351
|
+
console.log(recommendeQuestionID.current, 'recommendeQuestionID.current');
|
|
1345
1352
|
http.post(`${urllocation}/chat-service/public/v1.0/knowledge-base/questions:recommend`, {
|
|
1346
|
-
"recommendedQuestions":
|
|
1353
|
+
"recommendedQuestions": recommendeQuestionID.current,
|
|
1347
1354
|
"contexts": [
|
|
1348
1355
|
{
|
|
1349
1356
|
"type": "VIDEO",
|
|
@@ -1368,11 +1375,11 @@ const CustomerService = (props)=>{
|
|
|
1368
1375
|
} else {
|
|
1369
1376
|
setHotQuestionsList(data);
|
|
1370
1377
|
}
|
|
1371
|
-
let ids = [];
|
|
1372
|
-
data.map((str)=>{
|
|
1373
|
-
|
|
1374
|
-
})
|
|
1375
|
-
recommendeQuestionID.current = Array.from(new Set(recommendeQuestionID.current.concat(ids)));
|
|
1378
|
+
// let ids:any[] = [];
|
|
1379
|
+
// data.map((str: { id: string; })=>{
|
|
1380
|
+
// ids.push(str.id);
|
|
1381
|
+
// })
|
|
1382
|
+
// recommendeQuestionID.current = Array.from(new Set(recommendeQuestionID.current.concat(ids)));
|
|
1376
1383
|
resettingBottomHei();
|
|
1377
1384
|
scrollToBottom();
|
|
1378
1385
|
// console.log(data,99999);
|
|
@@ -1900,7 +1907,7 @@ const CustomerService = (props)=>{
|
|
|
1900
1907
|
className: styles.content_child
|
|
1901
1908
|
}),
|
|
1902
1909
|
item.extraInfo && JSON.parse(item.extraInfo).length > 0 && JSON.parse(item.extraInfo)[0].key == "imageUrl" && /*#__PURE__*/ _jsxs("p", {
|
|
1903
|
-
className: styles.img_con
|
|
1910
|
+
className: `${styles.img_con} ${showType == 2 || showType == 4 ? styles.img_con2 : ''}`,
|
|
1904
1911
|
children: [
|
|
1905
1912
|
/*#__PURE__*/ _jsx("img", {
|
|
1906
1913
|
src: JSON.parse(item.extraInfo)[0].value
|
|
@@ -2015,7 +2022,7 @@ const CustomerService = (props)=>{
|
|
|
2015
2022
|
className: styles.content_child
|
|
2016
2023
|
}),
|
|
2017
2024
|
item.extraInfo && JSON.parse(item.extraInfo).length > 0 && JSON.parse(item.extraInfo)[0].key == "imageUrl" && /*#__PURE__*/ _jsxs("p", {
|
|
2018
|
-
className: styles.img_con
|
|
2025
|
+
className: `${styles.img_con} ${showType == 2 || showType == 4 ? styles.img_con2 : ''}`,
|
|
2019
2026
|
children: [
|
|
2020
2027
|
/*#__PURE__*/ _jsx("img", {
|
|
2021
2028
|
src: JSON.parse(item.extraInfo)[0].value
|
|
@@ -2044,10 +2051,9 @@ const CustomerService = (props)=>{
|
|
|
2044
2051
|
return /*#__PURE__*/ _jsx("li", {
|
|
2045
2052
|
onClick: ()=>{
|
|
2046
2053
|
sendMessage(list, 1);
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
}
|
|
2054
|
+
recommendeQuestionID.current = recommendeQuestionID.current.concat(list.value);
|
|
2055
|
+
setBottomRecommendationQuestions([]);
|
|
2056
|
+
resettingBottomHei();
|
|
2051
2057
|
},
|
|
2052
2058
|
children: item.message == '抱歉,我暂时无法回答这样的问题。' ? list.question : /*#__PURE__*/ _jsxs(_Fragment, {
|
|
2053
2059
|
children: [
|
|
@@ -2125,11 +2131,21 @@ const CustomerService = (props)=>{
|
|
|
2125
2131
|
return "";
|
|
2126
2132
|
}
|
|
2127
2133
|
// console.log(historyMessageList,i,'sdcsd;sldcscsdsd')
|
|
2134
|
+
//根据上一行数据,判断是否显示招唤老师按钮
|
|
2135
|
+
let showTeacherBtn = true;
|
|
2136
|
+
let previousLineData = historyMessageList[i - 1];
|
|
2137
|
+
if (!previousLineData) {
|
|
2138
|
+
showTeacherBtn = true;
|
|
2139
|
+
} else if (!previousLineData.extraInfo) {
|
|
2140
|
+
showTeacherBtn = true;
|
|
2141
|
+
} else if (JSON.parse(previousLineData.extraInfo).length > 0 && JSON.parse(previousLineData.extraInfo)[0].key == "imageUrl") {
|
|
2142
|
+
showTeacherBtn = false;
|
|
2143
|
+
}
|
|
2128
2144
|
return /*#__PURE__*/ _jsxs("p", {
|
|
2129
2145
|
className: styles.operate,
|
|
2130
2146
|
children: [
|
|
2131
2147
|
// 不在智能客服窗口,并已经点击了召唤老师,并有召唤老师权限
|
|
2132
|
-
isAiChatWindow && answerMode != 1 && userData.modules.some((item)=>item.short == "TeacherAnswer") &&
|
|
2148
|
+
isAiChatWindow && answerMode != 1 && userData.modules.some((item)=>item.short == "TeacherAnswer") && showTeacherBtn && /*#__PURE__*/ _jsx("span", {
|
|
2133
2149
|
className: styles.ask_question,
|
|
2134
2150
|
onClick: ()=>{
|
|
2135
2151
|
setAnswerMode(1);
|
|
@@ -2272,9 +2288,19 @@ const CustomerService = (props)=>{
|
|
|
2272
2288
|
}
|
|
2273
2289
|
//3、是否显示召唤老师回答按钮
|
|
2274
2290
|
let findTeacherBtn = false;
|
|
2275
|
-
if (!showStopBtn && isAiChatWindow && (extraInfo != undefined && JSON.parse(extraInfo).length > 0 && JSON.parse(extraInfo)[0].key == "questionId" || extraInfo == null)
|
|
2291
|
+
if (!showStopBtn && isAiChatWindow && (extraInfo != undefined && JSON.parse(extraInfo).length > 0 && JSON.parse(extraInfo)[0].key == "questionId" || extraInfo == null)) {
|
|
2276
2292
|
findTeacherBtn = true;
|
|
2277
2293
|
}
|
|
2294
|
+
//根据上一行数据,判断是否显示招唤老师按钮
|
|
2295
|
+
let showTeacherBtn = true;
|
|
2296
|
+
let previousLineData = historyMessageList[i - 1];
|
|
2297
|
+
if (!previousLineData) {
|
|
2298
|
+
showTeacherBtn = true;
|
|
2299
|
+
} else if (!previousLineData.extraInfo) {
|
|
2300
|
+
showTeacherBtn = true;
|
|
2301
|
+
} else if (JSON.parse(previousLineData.extraInfo).length > 0 && JSON.parse(previousLineData.extraInfo)[0].key == "imageUrl") {
|
|
2302
|
+
showTeacherBtn = false;
|
|
2303
|
+
}
|
|
2278
2304
|
/// style={{position:showStopBtn && isPosition.current ? 'sticky' : 'relative'}}
|
|
2279
2305
|
return /*#__PURE__*/ _jsxs("div", {
|
|
2280
2306
|
className: `${styles.operate_modal_bottom}`,
|
|
@@ -2320,7 +2346,7 @@ const CustomerService = (props)=>{
|
|
|
2320
2346
|
]
|
|
2321
2347
|
}),
|
|
2322
2348
|
//在ai窗口并ai已经生成完答案
|
|
2323
|
-
findTeacherBtn && userData.modules.some((item)=>item.short == "TeacherAnswer") && /*#__PURE__*/ _jsx("span", {
|
|
2349
|
+
findTeacherBtn && userData.modules.some((item)=>item.short == "TeacherAnswer") && showTeacherBtn && /*#__PURE__*/ _jsx("span", {
|
|
2324
2350
|
className: styles.find_teacher,
|
|
2325
2351
|
onClick: ()=>{
|
|
2326
2352
|
setAnswerMode(1);
|
|
@@ -2586,6 +2612,7 @@ const CustomerService = (props)=>{
|
|
|
2586
2612
|
"讲解这张图片涉及到的知识内容"
|
|
2587
2613
|
]
|
|
2588
2614
|
}),
|
|
2615
|
+
/*#__PURE__*/ _jsx("br", {}),
|
|
2589
2616
|
/*#__PURE__*/ _jsxs("p", {
|
|
2590
2617
|
onClick: ()=>{
|
|
2591
2618
|
setHistoryMessageList((historyMessageList)=>{
|
|
@@ -2649,7 +2676,7 @@ const CustomerService = (props)=>{
|
|
|
2649
2676
|
let roomList = contactsList;
|
|
2650
2677
|
if (roomList.length > 0 && roomList[0].roomId != roomId) return;
|
|
2651
2678
|
console.log(props, 333333);
|
|
2652
|
-
if (
|
|
2679
|
+
if (config && config.type == 'video') {
|
|
2653
2680
|
getQuestiionsList(String(e.target.value), 3);
|
|
2654
2681
|
} else {
|
|
2655
2682
|
getQuestiionsList(String(e.target.value), 2);
|
|
@@ -2740,7 +2767,11 @@ const CustomerService = (props)=>{
|
|
|
2740
2767
|
onClick: ()=>{
|
|
2741
2768
|
if (!finished) return;
|
|
2742
2769
|
setSaveShowType(showType);
|
|
2743
|
-
|
|
2770
|
+
if (showType == 3) {
|
|
2771
|
+
setShowScreenshot(true);
|
|
2772
|
+
} else {
|
|
2773
|
+
setShowType(5);
|
|
2774
|
+
}
|
|
2744
2775
|
},
|
|
2745
2776
|
children: /*#__PURE__*/ _jsx(CustomScreenshot, {})
|
|
2746
2777
|
})
|
|
@@ -2894,17 +2925,20 @@ const CustomerService = (props)=>{
|
|
|
2894
2925
|
});
|
|
2895
2926
|
}
|
|
2896
2927
|
};
|
|
2928
|
+
//视频页面底部推荐问题
|
|
2897
2929
|
const renderBottomAssociationProblem = ()=>{
|
|
2898
2930
|
return /*#__PURE__*/ _jsx("div", {
|
|
2899
2931
|
className: styles.issues_list_flag,
|
|
2900
|
-
style: {
|
|
2901
|
-
bottom: `${buttomHei - 60}px`
|
|
2902
|
-
},
|
|
2903
2932
|
id: "BottomAssociationProblem",
|
|
2904
2933
|
children: bottomRecommendationQuestions.map((item)=>{
|
|
2905
2934
|
return /*#__PURE__*/ _jsx("p", {
|
|
2906
2935
|
onClick: ()=>{
|
|
2907
2936
|
sendMessage(item, 1);
|
|
2937
|
+
if (config && config.type == 'video') {
|
|
2938
|
+
recommendeQuestionID.current = recommendeQuestionID.current.concat(item.id);
|
|
2939
|
+
setBottomRecommendationQuestions([]);
|
|
2940
|
+
resettingBottomHei();
|
|
2941
|
+
}
|
|
2908
2942
|
},
|
|
2909
2943
|
children: item.question
|
|
2910
2944
|
}, item.id);
|
|
@@ -3116,7 +3150,7 @@ const CustomerService = (props)=>{
|
|
|
3116
3150
|
})
|
|
3117
3151
|
]
|
|
3118
3152
|
}),
|
|
3119
|
-
showType == 3
|
|
3153
|
+
showType == 3 && /*#__PURE__*/ _jsxs("div", {
|
|
3120
3154
|
className: `${styles.ChatWindow_Drawer}`,
|
|
3121
3155
|
id: "",
|
|
3122
3156
|
onClick: ()=>{
|
|
@@ -3227,12 +3261,12 @@ const CustomerService = (props)=>{
|
|
|
3227
3261
|
})
|
|
3228
3262
|
})
|
|
3229
3263
|
]
|
|
3230
|
-
})
|
|
3231
|
-
showType == 4 && /*#__PURE__*/ _jsxs(_Fragment, {
|
|
3264
|
+
}),
|
|
3265
|
+
(showType == 4 || showType == 5) && /*#__PURE__*/ _jsxs(_Fragment, {
|
|
3232
3266
|
children: [
|
|
3233
3267
|
/*#__PURE__*/ _jsxs(Modal, {
|
|
3234
3268
|
title: "AI助手",
|
|
3235
|
-
open: true,
|
|
3269
|
+
open: showType == 4 ? true : false,
|
|
3236
3270
|
onCancel: ()=>{
|
|
3237
3271
|
onCancel();
|
|
3238
3272
|
onEvent(serverName + serverUrl(), "click_智能问答_收起侧边栏", "提交");
|
|
@@ -3318,7 +3352,7 @@ const CustomerService = (props)=>{
|
|
|
3318
3352
|
})
|
|
3319
3353
|
]
|
|
3320
3354
|
}),
|
|
3321
|
-
/*#__PURE__*/ _jsxs("div", {
|
|
3355
|
+
(showType == 4 || showType == 5) && /*#__PURE__*/ _jsxs("div", {
|
|
3322
3356
|
className: `${styles.ChatWindow_Drawer}`,
|
|
3323
3357
|
id: "",
|
|
3324
3358
|
children: [
|
|
@@ -3416,7 +3450,7 @@ const CustomerService = (props)=>{
|
|
|
3416
3450
|
})
|
|
3417
3451
|
]
|
|
3418
3452
|
}),
|
|
3419
|
-
showType == 5 && imgBese64 && /*#__PURE__*/ _jsx(ScreenshotTool, {
|
|
3453
|
+
(showType == 5 || showScreenshot) && imgBese64 && /*#__PURE__*/ _jsx(ScreenshotTool, {
|
|
3420
3454
|
imgBese64: imgBese64,
|
|
3421
3455
|
saveScreenshotBese64: (base64)=>{
|
|
3422
3456
|
setScreenshotBese64(base64);
|
|
@@ -3425,9 +3459,15 @@ const CustomerService = (props)=>{
|
|
|
3425
3459
|
} else {
|
|
3426
3460
|
setShowType(1);
|
|
3427
3461
|
}
|
|
3462
|
+
setShowScreenshot(false);
|
|
3428
3463
|
},
|
|
3429
3464
|
cancelScreenshot: ()=>{
|
|
3430
|
-
|
|
3465
|
+
if (saveShowType != -1) {
|
|
3466
|
+
setShowType(saveShowType);
|
|
3467
|
+
} else {
|
|
3468
|
+
setShowType(1);
|
|
3469
|
+
}
|
|
3470
|
+
setShowScreenshot(false);
|
|
3431
3471
|
}
|
|
3432
3472
|
}),
|
|
3433
3473
|
viewBase64 && visible && /*#__PURE__*/ _jsx(ViewImage, {
|
|
@@ -638,8 +638,11 @@
|
|
|
638
638
|
overflow: hidden;
|
|
639
639
|
display: inline-flex;
|
|
640
640
|
margin-top: 12px;
|
|
641
|
+
width: 240px;
|
|
642
|
+
max-height: 134px;
|
|
641
643
|
img{
|
|
642
|
-
width:
|
|
644
|
+
width: 240px;
|
|
645
|
+
height: fit-content;
|
|
643
646
|
}
|
|
644
647
|
.mask_zoom{
|
|
645
648
|
position: absolute;
|
|
@@ -666,6 +669,14 @@
|
|
|
666
669
|
}
|
|
667
670
|
}
|
|
668
671
|
}
|
|
672
|
+
.img_con2{
|
|
673
|
+
width: 300px;
|
|
674
|
+
max-height: 168px;
|
|
675
|
+
img{
|
|
676
|
+
width: 300px;
|
|
677
|
+
height: fit-content;
|
|
678
|
+
}
|
|
679
|
+
}
|
|
669
680
|
|
|
670
681
|
.copyCode{
|
|
671
682
|
display: flex;
|
|
@@ -935,8 +946,8 @@
|
|
|
935
946
|
}
|
|
936
947
|
}
|
|
937
948
|
.issues_list_flag {
|
|
938
|
-
position: absolute;
|
|
939
|
-
bottom: 60px;
|
|
949
|
+
// position: absolute;
|
|
950
|
+
// bottom: 60px;
|
|
940
951
|
margin: 0 16px;
|
|
941
952
|
// padding-bottom: 4px;
|
|
942
953
|
line-height: 1;
|
|
@@ -946,6 +957,7 @@
|
|
|
946
957
|
background-color: #fff;
|
|
947
958
|
border-radius: 38px;
|
|
948
959
|
margin-bottom: 16px;
|
|
960
|
+
line-height: 1.5;
|
|
949
961
|
cursor: pointer;
|
|
950
962
|
&:hover{
|
|
951
963
|
background-color: @color-background-primary-weak;
|
|
@@ -635,8 +635,11 @@
|
|
|
635
635
|
overflow: hidden;
|
|
636
636
|
display: inline-flex;
|
|
637
637
|
margin-top: 12px;
|
|
638
|
+
width: 240px;
|
|
639
|
+
max-height: 134px;
|
|
638
640
|
img{
|
|
639
|
-
width:
|
|
641
|
+
width: 240px;
|
|
642
|
+
height: fit-content;
|
|
640
643
|
}
|
|
641
644
|
.mask_zoom{
|
|
642
645
|
position: absolute;
|
|
@@ -663,6 +666,14 @@
|
|
|
663
666
|
}
|
|
664
667
|
}
|
|
665
668
|
}
|
|
669
|
+
.img_con2{
|
|
670
|
+
width: 300px;
|
|
671
|
+
max-height: 168px;
|
|
672
|
+
img{
|
|
673
|
+
width: 300px;
|
|
674
|
+
height: fit-content;
|
|
675
|
+
}
|
|
676
|
+
}
|
|
666
677
|
|
|
667
678
|
.copyCode{
|
|
668
679
|
display: flex;
|
|
@@ -932,8 +943,8 @@
|
|
|
932
943
|
}
|
|
933
944
|
}
|
|
934
945
|
.issues_list_flag {
|
|
935
|
-
position: absolute;
|
|
936
|
-
bottom: 60px;
|
|
946
|
+
// position: absolute;
|
|
947
|
+
// bottom: 60px;
|
|
937
948
|
margin: 0 16px;
|
|
938
949
|
// padding-bottom: 4px;
|
|
939
950
|
line-height: 1;
|
|
@@ -943,6 +954,7 @@
|
|
|
943
954
|
background-color: #fff;
|
|
944
955
|
border-radius: 38px;
|
|
945
956
|
margin-bottom: 16px;
|
|
957
|
+
line-height: 1.5;
|
|
946
958
|
cursor: pointer;
|
|
947
959
|
&:hover{
|
|
948
960
|
background-color: @color-background-primary-weak;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "@ice/jsx-runtime/jsx-runtime";
|
|
2
|
-
import React, { useState,
|
|
2
|
+
import React, { useState, forwardRef } from "react";
|
|
3
3
|
import ReactCrop, { centerCrop, makeAspectCrop } from "react-image-crop";
|
|
4
4
|
import { CloseOutlined } from "@ant-design/icons";
|
|
5
5
|
import { CustomDuihao } from "../icons/index";
|
|
@@ -9,7 +9,6 @@ const ScreenshotTool = /*#__PURE__*/ forwardRef((props)=>{
|
|
|
9
9
|
let { imgBese64 , saveScreenshotBese64 , cancelScreenshot } = props;
|
|
10
10
|
const [crop, setCrop] = useState();
|
|
11
11
|
const [completedCrop, setCompletedCrop] = useState();
|
|
12
|
-
const imgRef = useRef(null);
|
|
13
12
|
const [aspect, setAspect] = useState(16 / 9);
|
|
14
13
|
const [btnPosition, setBtnPosition] = useState({
|
|
15
14
|
top: 0,
|
|
@@ -85,20 +84,22 @@ const ScreenshotTool = /*#__PURE__*/ forwardRef((props)=>{
|
|
|
85
84
|
className: styles.ReactCrop,
|
|
86
85
|
crop: crop,
|
|
87
86
|
onChange: (_, percentCrop)=>{
|
|
87
|
+
if (percentCrop.height === 0 && percentCrop.width === 0) {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
88
90
|
setShowBtn(false);
|
|
89
91
|
setCrop(percentCrop);
|
|
90
92
|
},
|
|
91
93
|
onComplete: (c)=>{
|
|
94
|
+
if (c.height === 0 && c.width === 0) {
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
92
97
|
setCompletedCrop(c);
|
|
93
98
|
savePosition(c);
|
|
94
|
-
// console.log(c,'剪裁222');
|
|
95
99
|
},
|
|
96
|
-
// aspect={aspect}
|
|
97
|
-
// minWidth={400}
|
|
98
100
|
minHeight: 100,
|
|
99
101
|
minWidth: 100,
|
|
100
102
|
children: /*#__PURE__*/ _jsx("img", {
|
|
101
|
-
// ref={imgRef}
|
|
102
103
|
alt: "Crop me",
|
|
103
104
|
src: imgBese64,
|
|
104
105
|
onLoad: onImageLoad
|
|
@@ -113,7 +114,12 @@ const ScreenshotTool = /*#__PURE__*/ forwardRef((props)=>{
|
|
|
113
114
|
children: [
|
|
114
115
|
/*#__PURE__*/ _jsx("span", {
|
|
115
116
|
onClick: cancelScreenshot,
|
|
116
|
-
children: /*#__PURE__*/ _jsx(CloseOutlined, {
|
|
117
|
+
children: /*#__PURE__*/ _jsx(CloseOutlined, {
|
|
118
|
+
style: {
|
|
119
|
+
position: 'relative',
|
|
120
|
+
top: '1px'
|
|
121
|
+
}
|
|
122
|
+
})
|
|
117
123
|
}),
|
|
118
124
|
/*#__PURE__*/ _jsx("span", {
|
|
119
125
|
onClick: saveImage,
|
|
@@ -120,7 +120,7 @@ var ContactsList = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
120
120
|
}) : /*#__PURE__*/ _jsxs("div", {
|
|
121
121
|
className: "".concat(styles.teacher_layout, " ").concat(type == 3 ? styles.teacher_layout_newlabo : ""),
|
|
122
122
|
style: {
|
|
123
|
-
left: type == 3 ? document.getElementById("box").offsetWidth + 10 + "px" : "auto"
|
|
123
|
+
left: type == 3 ? document.getElementById("box") && document.getElementById("box").offsetWidth + 10 + "px" : "auto"
|
|
124
124
|
},
|
|
125
125
|
children: [
|
|
126
126
|
/*#__PURE__*/ _jsxs("div", {
|