bhd-components 0.6.1 → 0.6.3
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/{ab2a98d6.esm.es5.development.js → a0cd97b9.esm.es5.development.js} +1 -1
- package/dist/{b8edd934.esm.es5.production.js → e88a10a0.esm.es5.production.js} +1 -1
- package/dist/index.esm.es5.development.css +1711 -827
- package/dist/index.esm.es5.development.js +515 -384
- package/dist/index.esm.es5.production.css +1 -1
- package/dist/index.esm.es5.production.js +1 -1
- package/es2017/bhdSelect/index.d.ts +3 -0
- package/es2017/bhdSelect/index.js +18 -13
- package/es2017/bhdSelect/index.module.less +4 -1
- package/es2017/customerService/{contactsList/index.js → contactsList.js} +92 -77
- package/es2017/customerService/function.d.ts +1 -1
- package/es2017/customerService/function.js +10 -2
- package/es2017/customerService/{historyFun/index.d.ts → historyFun.d.ts} +0 -1
- package/es2017/customerService/{historyFun/index.js → historyFun.js} +62 -16
- package/es2017/customerService/index.d.ts +3 -3
- package/es2017/customerService/index.js +144 -81
- package/es2017/customerService/index.module.less +496 -5
- package/es2017/customerService/index2.module.less +1282 -0
- package/es2017/typings.d.ts +12 -0
- package/esm/bhdSelect/index.d.ts +3 -0
- package/esm/bhdSelect/index.js +18 -13
- package/esm/bhdSelect/index.module.less +4 -1
- package/esm/customerService/{contactsList/index.js → contactsList.js} +83 -66
- package/esm/customerService/function.d.ts +1 -1
- package/esm/customerService/function.js +10 -1
- package/esm/customerService/{historyFun/index.d.ts → historyFun.d.ts} +0 -1
- package/esm/customerService/{historyFun/index.js → historyFun.js} +64 -17
- package/esm/customerService/index.d.ts +3 -3
- package/esm/customerService/index.js +176 -111
- package/esm/customerService/index.module.less +496 -5
- package/esm/customerService/index2.module.less +1282 -0
- package/esm/typings.d.ts +12 -0
- package/package.json +1 -1
- package/es2017/customerService/contactsList/index.module.less +0 -206
- package/es2017/customerService/historyFun/index.module.less +0 -223
- package/esm/customerService/contactsList/index.module.less +0 -206
- package/esm/customerService/historyFun/index.module.less +0 -223
- /package/es2017/customerService/{contactsList/index.d.ts → contactsList.d.ts} +0 -0
- /package/esm/customerService/{contactsList/index.d.ts → contactsList.d.ts} +0 -0
|
@@ -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 './a0cd97b9.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 './a0cd97b9.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';
|
|
@@ -130,7 +130,7 @@ var TextTootip = function(props) {
|
|
|
130
130
|
};
|
|
131
131
|
var TextTootip$1 = TextTootip;
|
|
132
132
|
|
|
133
|
-
var modules_63b47c51$
|
|
133
|
+
var modules_63b47c51$9 = {"Table":"index_module_Table__dfa8dab0","SmallTable":"index_module_SmallTable__dfa8dab0","columnTootipClassName":"index_module_columnTootipClassName__dfa8dab0"};
|
|
134
134
|
|
|
135
135
|
var widthPercentage = /^\d+%$/;
|
|
136
136
|
var widthPx = /^\d+px$/;
|
|
@@ -250,7 +250,7 @@ var Table = function(props) {
|
|
|
250
250
|
},
|
|
251
251
|
title: text,
|
|
252
252
|
trigger: "hover",
|
|
253
|
-
overlayClassName: columnTootipClassName || modules_63b47c51$
|
|
253
|
+
overlayClassName: columnTootipClassName || modules_63b47c51$9.columnTootipClassName,
|
|
254
254
|
color: columnTootipColor || "#FFF",
|
|
255
255
|
children: /*#__PURE__*/ jsx("span", {
|
|
256
256
|
children: text
|
|
@@ -356,7 +356,7 @@ var Table = function(props) {
|
|
|
356
356
|
}
|
|
357
357
|
});
|
|
358
358
|
return /*#__PURE__*/ jsx("div", {
|
|
359
|
-
className: "".concat(modules_63b47c51$
|
|
359
|
+
className: "".concat(modules_63b47c51$9.Table, " ").concat(kind === "simple" ? modules_63b47c51$9.SmallTable : ""),
|
|
360
360
|
ref: tableRef,
|
|
361
361
|
children: /*#__PURE__*/ jsx(Table$2, _object_spread({}, config))
|
|
362
362
|
});
|
|
@@ -371,7 +371,7 @@ Table.ColumnGroup = Table$2.ColumnGroup;
|
|
|
371
371
|
// Table.Summary = AntdTable.Summary;
|
|
372
372
|
var Table$1 = Table;
|
|
373
373
|
|
|
374
|
-
var modules_63b47c51$
|
|
374
|
+
var modules_63b47c51$8 = {"customSuccess":"index_module_customSuccess__84cecc41","customWarning":"index_module_customWarning__84cecc41","customError":"index_module_customError__84cecc41"};
|
|
375
375
|
|
|
376
376
|
var CustomCloseSvg = function() {
|
|
377
377
|
return /*#__PURE__*/ jsx("svg", {
|
|
@@ -867,7 +867,7 @@ var CustomAiIcon$1 = CustomAiIcon;
|
|
|
867
867
|
|
|
868
868
|
var BhdMessage = _object_spread_props(_object_spread({}, message), {
|
|
869
869
|
customSuccess: function(config) {
|
|
870
|
-
var className = modules_63b47c51$
|
|
870
|
+
var className = modules_63b47c51$8.customSuccess;
|
|
871
871
|
if (typeof config === "string") {
|
|
872
872
|
return message.success({
|
|
873
873
|
content: config,
|
|
@@ -879,7 +879,7 @@ var BhdMessage = _object_spread_props(_object_spread({}, message), {
|
|
|
879
879
|
}));
|
|
880
880
|
},
|
|
881
881
|
customWarning: function(config) {
|
|
882
|
-
var className = modules_63b47c51$
|
|
882
|
+
var className = modules_63b47c51$8.customWarning;
|
|
883
883
|
if (typeof config === "string") {
|
|
884
884
|
return message.warning({
|
|
885
885
|
content: config,
|
|
@@ -891,7 +891,7 @@ var BhdMessage = _object_spread_props(_object_spread({}, message), {
|
|
|
891
891
|
}));
|
|
892
892
|
},
|
|
893
893
|
customError: function(config) {
|
|
894
|
-
var className = modules_63b47c51$
|
|
894
|
+
var className = modules_63b47c51$8.customError;
|
|
895
895
|
if (typeof config === "string") {
|
|
896
896
|
return message.error({
|
|
897
897
|
content: config,
|
|
@@ -907,17 +907,17 @@ var BhdMessage = _object_spread_props(_object_spread({}, message), {
|
|
|
907
907
|
});
|
|
908
908
|
var BhdMessage$1 = BhdMessage;
|
|
909
909
|
|
|
910
|
-
var modules_63b47c51$
|
|
910
|
+
var modules_63b47c51$7 = {"pagination":"index_module_pagination__ea803a71"};
|
|
911
911
|
|
|
912
912
|
var BhdPagination = function(props) {
|
|
913
|
-
var className = "".concat(modules_63b47c51$
|
|
913
|
+
var className = "".concat(modules_63b47c51$7.pagination, " ").concat(props.className || "");
|
|
914
914
|
return /*#__PURE__*/ jsx(Pagination, _object_spread_props(_object_spread({}, props), {
|
|
915
915
|
className: className
|
|
916
916
|
}));
|
|
917
917
|
};
|
|
918
918
|
var BhdPagination$1 = BhdPagination;
|
|
919
919
|
|
|
920
|
-
var modules_63b47c51$
|
|
920
|
+
var modules_63b47c51$6 = {"BhdTableSelect":"index_module_BhdTableSelect__1274ed5e"};
|
|
921
921
|
|
|
922
922
|
var BhdTableSelect = function(props) {
|
|
923
923
|
var _props_className = props.// initOption=[],
|
|
@@ -971,7 +971,7 @@ var BhdTableSelect = function(props) {
|
|
|
971
971
|
suffixIcon: suffixIcon ? suffixIcon : /*#__PURE__*/ jsx(CaretDownOutlined, {})
|
|
972
972
|
});
|
|
973
973
|
return /*#__PURE__*/ jsx("div", {
|
|
974
|
-
className: "".concat(modules_63b47c51$
|
|
974
|
+
className: "".concat(modules_63b47c51$6.BhdTableSelect, " ").concat(className),
|
|
975
975
|
ref: tableSelectRef,
|
|
976
976
|
children: /*#__PURE__*/ jsx(Select, _object_spread_props(_object_spread({}, config), {
|
|
977
977
|
children: children
|
|
@@ -981,7 +981,7 @@ var BhdTableSelect = function(props) {
|
|
|
981
981
|
BhdTableSelect.Option = Select.Option;
|
|
982
982
|
var BhdTableSelect$1 = BhdTableSelect;
|
|
983
983
|
|
|
984
|
-
var modules_63b47c51$
|
|
984
|
+
var modules_63b47c51$5 = {"titleBar":"index_module_titleBar__241d4397","left":"index_module_left__241d4397","leftIcon":"index_module_leftIcon__241d4397","leftContent":"index_module_leftContent__241d4397","leftTitle":"index_module_leftTitle__241d4397","leftSubTitle":"index_module_leftSubTitle__241d4397","right":"index_module_right__241d4397"};
|
|
985
985
|
|
|
986
986
|
var TitleBar = function(props) {
|
|
987
987
|
var title = props.title, leftIcon = props.leftIcon, subTitle = props.subTitle, rightContent = props.rightContent, _props_wrapClassName = props.wrapClassName, wrapClassName = _props_wrapClassName === void 0 ? "" : _props_wrapClassName, _props_rightMaxWidth = props.rightMaxWidth, rightMaxWidth = _props_rightMaxWidth === void 0 ? 45 : _props_rightMaxWidth, _props_leftIconClassName = props.leftIconClassName, leftIconClassName = _props_leftIconClassName === void 0 ? "" : _props_leftIconClassName, _props_leftTitleClassName = props.leftTitleClassName, leftTitleClassName = _props_leftTitleClassName === void 0 ? "" : _props_leftTitleClassName, _props_leftSubTitleClassName = props.leftSubTitleClassName, leftSubTitleClassName = _props_leftSubTitleClassName === void 0 ? "" : _props_leftSubTitleClassName, _props_rightClassName = props.rightClassName, rightClassName = _props_rightClassName === void 0 ? "" : _props_rightClassName, _props_leftClassName = props.leftClassName, leftClassName = _props_leftClassName === void 0 ? "" : _props_leftClassName;
|
|
@@ -1031,25 +1031,25 @@ var TitleBar = function(props) {
|
|
|
1031
1031
|
screenWidth
|
|
1032
1032
|
]);
|
|
1033
1033
|
return /*#__PURE__*/ jsxs("div", {
|
|
1034
|
-
className: "".concat(modules_63b47c51$
|
|
1034
|
+
className: "".concat(modules_63b47c51$5.titleBar, " ").concat(wrapClassName),
|
|
1035
1035
|
ref: titleBarRef,
|
|
1036
1036
|
children: [
|
|
1037
1037
|
/*#__PURE__*/ jsxs("div", {
|
|
1038
|
-
className: "".concat(modules_63b47c51$
|
|
1038
|
+
className: "".concat(modules_63b47c51$5.left, " ").concat(leftClassName),
|
|
1039
1039
|
children: [
|
|
1040
1040
|
leftIcon && /*#__PURE__*/ jsx("div", {
|
|
1041
|
-
className: "".concat(modules_63b47c51$
|
|
1041
|
+
className: "".concat(modules_63b47c51$5.leftIcon, " ").concat(leftIconClassName),
|
|
1042
1042
|
children: leftIcon
|
|
1043
1043
|
}),
|
|
1044
1044
|
/*#__PURE__*/ jsxs("div", {
|
|
1045
|
-
className: modules_63b47c51$
|
|
1045
|
+
className: modules_63b47c51$5.leftContent,
|
|
1046
1046
|
children: [
|
|
1047
1047
|
/*#__PURE__*/ jsx("div", {
|
|
1048
|
-
className: "".concat(modules_63b47c51$
|
|
1048
|
+
className: "".concat(modules_63b47c51$5.leftTitle, " ").concat(leftTitleClassName),
|
|
1049
1049
|
children: title
|
|
1050
1050
|
}),
|
|
1051
1051
|
subTitle && /*#__PURE__*/ jsx("div", {
|
|
1052
|
-
className: "".concat(modules_63b47c51$
|
|
1052
|
+
className: "".concat(modules_63b47c51$5.leftSubTitle, " ").concat(leftSubTitleClassName),
|
|
1053
1053
|
children: subTitle
|
|
1054
1054
|
})
|
|
1055
1055
|
]
|
|
@@ -1057,7 +1057,7 @@ var TitleBar = function(props) {
|
|
|
1057
1057
|
]
|
|
1058
1058
|
}),
|
|
1059
1059
|
rightContent && /*#__PURE__*/ jsx("div", {
|
|
1060
|
-
className: "".concat(modules_63b47c51$
|
|
1060
|
+
className: "".concat(modules_63b47c51$5.right, " ").concat(rightClassName),
|
|
1061
1061
|
ref: rightContentRef,
|
|
1062
1062
|
children: renderRightContent()
|
|
1063
1063
|
})
|
|
@@ -1066,7 +1066,7 @@ var TitleBar = function(props) {
|
|
|
1066
1066
|
};
|
|
1067
1067
|
var TitleBar$1 = TitleBar;
|
|
1068
1068
|
|
|
1069
|
-
var modules_63b47c51$
|
|
1069
|
+
var modules_63b47c51$4 = {"AppViewImage":"index_module_AppViewImage__e4b9963d","viewImgBody":"index_module_viewImgBody__e4b9963d","viewImgContent":"index_module_viewImgContent__e4b9963d","viewImgAction":"index_module_viewImgAction__e4b9963d","viewImgBody_load":"index_module_viewImgBody_load__e4b9963d","viewImgBody_pic":"index_module_viewImgBody_pic__e4b9963d","viewImgBody_pre":"index_module_viewImgBody_pre__e4b9963d","viewImgBody_next":"index_module_viewImgBody_next__e4b9963d","viewImgBodyScale":"index_module_viewImgBodyScale__e4b9963d","viewImgBodyScale_minu":"index_module_viewImgBodyScale_minu__e4b9963d","viewImgBodyScale_add":"index_module_viewImgBodyScale_add__e4b9963d","viewImgBodyScale_value":"index_module_viewImgBodyScale_value__e4b9963d","viewImgInfo":"index_module_viewImgInfo__e4b9963d"};
|
|
1070
1070
|
|
|
1071
1071
|
//获取css样式
|
|
1072
1072
|
var getStyle = function getStyle(dom, key) {
|
|
@@ -1091,7 +1091,7 @@ var Success$1 = Success;
|
|
|
1091
1091
|
var Info = "data:image/png;base64,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";
|
|
1092
1092
|
var Info$1 = Info;
|
|
1093
1093
|
|
|
1094
|
-
var modules_63b47c51$
|
|
1094
|
+
var modules_63b47c51$3 = {"confirm":"index_module_confirm__fecd33f4","success":"index_module_success__fecd33f4","custom":"index_module_custom__fecd33f4","noCancel":"index_module_noCancel__fecd33f4","noButton":"index_module_noButton__fecd33f4","haveComfirm":"index_module_haveComfirm__fecd33f4"};
|
|
1095
1095
|
|
|
1096
1096
|
var initConFirmModal = function(obj) {
|
|
1097
1097
|
var title = obj.title, content = obj.content, _obj_cancelBtn = obj.cancelBtn, cancelBtn = _obj_cancelBtn === void 0 ? true : _obj_cancelBtn, _obj_okText = obj.okText, okText = _obj_okText === void 0 ? "确定" : _obj_okText, _obj_keyboard = obj.keyboard, keyboard = _obj_keyboard === void 0 ? false : _obj_keyboard, _obj_cancelText = obj.cancelText, cancelText = _obj_cancelText === void 0 ? "取消" : _obj_cancelText, _obj_autoFocusButton = obj.autoFocusButton, autoFocusButton = _obj_autoFocusButton === void 0 ? null : _obj_autoFocusButton;
|
|
@@ -1127,7 +1127,7 @@ var initConFirmModal = function(obj) {
|
|
|
1127
1127
|
})
|
|
1128
1128
|
]
|
|
1129
1129
|
}),
|
|
1130
|
-
className: "".concat(obj.className || "", " ").concat(modules_63b47c51$
|
|
1130
|
+
className: "".concat(obj.className || "", " ").concat(modules_63b47c51$3.confirm, " ").concat(cancelBtn ? "" : modules_63b47c51$3.noCancel)
|
|
1131
1131
|
});
|
|
1132
1132
|
};
|
|
1133
1133
|
var initSuccessModal = function(obj) {
|
|
@@ -1165,7 +1165,7 @@ var initSuccessModal = function(obj) {
|
|
|
1165
1165
|
})
|
|
1166
1166
|
]
|
|
1167
1167
|
}),
|
|
1168
|
-
className: "".concat(obj.className || "", " ").concat(modules_63b47c51$
|
|
1168
|
+
className: "".concat(obj.className || "", " ").concat(modules_63b47c51$3.success, " ").concat(cancelBtn ? "" : modules_63b47c51$3.noCancel)
|
|
1169
1169
|
});
|
|
1170
1170
|
};
|
|
1171
1171
|
var initCustomModal = function(obj) {
|
|
@@ -1191,7 +1191,7 @@ var initCustomModal = function(obj) {
|
|
|
1191
1191
|
})
|
|
1192
1192
|
]
|
|
1193
1193
|
}),
|
|
1194
|
-
className: "".concat(modules_63b47c51$
|
|
1194
|
+
className: "".concat(modules_63b47c51$3.custom, " ").concat(obj.className || "", " ").concat(cancelBtn ? "" : okBtn ? modules_63b47c51$3.haveComfirm : modules_63b47c51$3.noButton)
|
|
1195
1195
|
});
|
|
1196
1196
|
};
|
|
1197
1197
|
var initInfoModal = function(obj) {
|
|
@@ -1228,7 +1228,7 @@ var initInfoModal = function(obj) {
|
|
|
1228
1228
|
})
|
|
1229
1229
|
]
|
|
1230
1230
|
}),
|
|
1231
|
-
className: "".concat(obj.className || "", " ").concat(modules_63b47c51$
|
|
1231
|
+
className: "".concat(obj.className || "", " ").concat(modules_63b47c51$3.success, " ").concat(cancelBtn ? "" : modules_63b47c51$3.noCancel)
|
|
1232
1232
|
});
|
|
1233
1233
|
};
|
|
1234
1234
|
var initWarnModal = function(obj) {
|
|
@@ -1265,7 +1265,7 @@ var initWarnModal = function(obj) {
|
|
|
1265
1265
|
})
|
|
1266
1266
|
]
|
|
1267
1267
|
}),
|
|
1268
|
-
className: "".concat(obj.className || "", " ").concat(modules_63b47c51$
|
|
1268
|
+
className: "".concat(obj.className || "", " ").concat(modules_63b47c51$3.confirm, " ").concat(cancelBtn ? "" : modules_63b47c51$3.noCancel, " ")
|
|
1269
1269
|
});
|
|
1270
1270
|
};
|
|
1271
1271
|
var BhdTipModal = {
|
|
@@ -1354,7 +1354,7 @@ var ViewImage = /*#__PURE__*/ function(_React_Component) {
|
|
|
1354
1354
|
_define_property(_assert_this_initialized(_this), "moveImg", function(ev) {
|
|
1355
1355
|
var _this_state = _this.state, imgLeft = _this_state.imgLeft, imgTop = _this_state.imgTop;
|
|
1356
1356
|
ev.preventDefault();
|
|
1357
|
-
var dom = document.getElementsByClassName("".concat(modules_63b47c51$
|
|
1357
|
+
var dom = document.getElementsByClassName("".concat(modules_63b47c51$4.viewImgBody_pic))[0];
|
|
1358
1358
|
if (!dom) return;
|
|
1359
1359
|
if (imgLeft == "auto") {
|
|
1360
1360
|
imgLeft = getStyle(dom, "left");
|
|
@@ -1650,13 +1650,13 @@ var ViewImage = /*#__PURE__*/ function(_React_Component) {
|
|
|
1650
1650
|
var _this_state = this.state, scaleValue = _this_state.scaleValue, imgSrc = _this_state.imgSrc, imgLeft = _this_state.imgLeft, imgTop = _this_state.imgTop, rotateValue = _this_state.rotateValue, loading = _this_state.loading, multiSelect = _this_state.multiSelect, imgError = _this_state.imgError;
|
|
1651
1651
|
var _this_props = this.props, content = _this_props.content, download = _this_props.download;
|
|
1652
1652
|
return /*#__PURE__*/ jsxs("div", {
|
|
1653
|
-
className: modules_63b47c51$
|
|
1653
|
+
className: modules_63b47c51$4.viewImgBody,
|
|
1654
1654
|
children: [
|
|
1655
1655
|
/*#__PURE__*/ jsxs("div", {
|
|
1656
|
-
className: modules_63b47c51$
|
|
1656
|
+
className: modules_63b47c51$4.viewImgContent,
|
|
1657
1657
|
children: [
|
|
1658
1658
|
/*#__PURE__*/ jsxs("div", {
|
|
1659
|
-
className: modules_63b47c51$
|
|
1659
|
+
className: modules_63b47c51$4.viewImgAction,
|
|
1660
1660
|
children: [
|
|
1661
1661
|
/*#__PURE__*/ jsx("span", {
|
|
1662
1662
|
title: "旋转",
|
|
@@ -1676,11 +1676,11 @@ var ViewImage = /*#__PURE__*/ function(_React_Component) {
|
|
|
1676
1676
|
]
|
|
1677
1677
|
}),
|
|
1678
1678
|
/*#__PURE__*/ jsxs("div", {
|
|
1679
|
-
className: modules_63b47c51$
|
|
1679
|
+
className: modules_63b47c51$4.viewImgBody,
|
|
1680
1680
|
children: [
|
|
1681
1681
|
loading ? /*#__PURE__*/ jsx("img", {
|
|
1682
1682
|
src: Loading,
|
|
1683
|
-
className: modules_63b47c51$
|
|
1683
|
+
className: modules_63b47c51$4.viewImgBody_load
|
|
1684
1684
|
}, "load") : imgError ? /*#__PURE__*/ jsx("div", {
|
|
1685
1685
|
style: {
|
|
1686
1686
|
color: "#FFFFFF"
|
|
@@ -1696,19 +1696,19 @@ var ViewImage = /*#__PURE__*/ function(_React_Component) {
|
|
|
1696
1696
|
left: imgLeft == "auto" ? "auto" : imgLeft + "px",
|
|
1697
1697
|
top: imgTop == "auto" ? "auto" : imgTop + "px"
|
|
1698
1698
|
},
|
|
1699
|
-
className: modules_63b47c51$
|
|
1699
|
+
className: modules_63b47c51$4.viewImgBody_pic,
|
|
1700
1700
|
onLoad: this.imgLoad,
|
|
1701
1701
|
onError: this.imgErr
|
|
1702
1702
|
}, "img"),
|
|
1703
1703
|
multiSelect && /*#__PURE__*/ jsxs(Fragment, {
|
|
1704
1704
|
children: [
|
|
1705
1705
|
this.state.curIndex !== 0 && /*#__PURE__*/ jsx("div", {
|
|
1706
|
-
className: modules_63b47c51$
|
|
1706
|
+
className: modules_63b47c51$4.viewImgBody_pre,
|
|
1707
1707
|
onClick: this.preChange,
|
|
1708
1708
|
children: /*#__PURE__*/ jsx(LeftOutlined, {})
|
|
1709
1709
|
}),
|
|
1710
1710
|
this.state.curIndex < this.props.multiSelect.length - 1 && /*#__PURE__*/ jsx("div", {
|
|
1711
|
-
className: modules_63b47c51$
|
|
1711
|
+
className: modules_63b47c51$4.viewImgBody_next,
|
|
1712
1712
|
onClick: this.nextChange,
|
|
1713
1713
|
children: /*#__PURE__*/ jsx(RightOutlined, {})
|
|
1714
1714
|
})
|
|
@@ -1717,10 +1717,10 @@ var ViewImage = /*#__PURE__*/ function(_React_Component) {
|
|
|
1717
1717
|
]
|
|
1718
1718
|
}),
|
|
1719
1719
|
/*#__PURE__*/ jsxs("div", {
|
|
1720
|
-
className: modules_63b47c51$
|
|
1720
|
+
className: modules_63b47c51$4.viewImgBodyScale,
|
|
1721
1721
|
children: [
|
|
1722
1722
|
/*#__PURE__*/ jsx("span", {
|
|
1723
|
-
className: modules_63b47c51$
|
|
1723
|
+
className: modules_63b47c51$4.viewImgBodyScale_minu,
|
|
1724
1724
|
onClick: function() {
|
|
1725
1725
|
scaleValue = scaleValue - 10;
|
|
1726
1726
|
_this.scaleChange(scaleValue);
|
|
@@ -1728,7 +1728,7 @@ var ViewImage = /*#__PURE__*/ function(_React_Component) {
|
|
|
1728
1728
|
children: /*#__PURE__*/ jsx(MinusOutlined, {})
|
|
1729
1729
|
}),
|
|
1730
1730
|
/*#__PURE__*/ jsxs("span", {
|
|
1731
|
-
className: modules_63b47c51$
|
|
1731
|
+
className: modules_63b47c51$4.viewImgBodyScale_value,
|
|
1732
1732
|
onClick: this.reset,
|
|
1733
1733
|
children: [
|
|
1734
1734
|
scaleValue,
|
|
@@ -1736,7 +1736,7 @@ var ViewImage = /*#__PURE__*/ function(_React_Component) {
|
|
|
1736
1736
|
]
|
|
1737
1737
|
}),
|
|
1738
1738
|
/*#__PURE__*/ jsx("span", {
|
|
1739
|
-
className: modules_63b47c51$
|
|
1739
|
+
className: modules_63b47c51$4.viewImgBodyScale_add,
|
|
1740
1740
|
onClick: function() {
|
|
1741
1741
|
scaleValue = scaleValue + 10;
|
|
1742
1742
|
_this.scaleChange(scaleValue);
|
|
@@ -1748,7 +1748,7 @@ var ViewImage = /*#__PURE__*/ function(_React_Component) {
|
|
|
1748
1748
|
]
|
|
1749
1749
|
}),
|
|
1750
1750
|
content && /*#__PURE__*/ jsx("div", {
|
|
1751
|
-
className: modules_63b47c51$
|
|
1751
|
+
className: modules_63b47c51$4.viewImgInfo,
|
|
1752
1752
|
children: content()
|
|
1753
1753
|
})
|
|
1754
1754
|
]
|
|
@@ -1781,7 +1781,7 @@ var AppViewImage = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
1781
1781
|
maskStyle: {
|
|
1782
1782
|
background: "rgba(0, 0, 0, 0.65)"
|
|
1783
1783
|
},
|
|
1784
|
-
wrapClassName: "".concat(modules_63b47c51$
|
|
1784
|
+
wrapClassName: "".concat(modules_63b47c51$4.AppViewImage, " ").concat(className || ""),
|
|
1785
1785
|
children: visible && /*#__PURE__*/ jsx(ViewImage, _object_spread_props(_object_spread({}, props), {
|
|
1786
1786
|
ref: viewRef
|
|
1787
1787
|
}))
|
|
@@ -1789,7 +1789,7 @@ var AppViewImage = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
1789
1789
|
});
|
|
1790
1790
|
var AppViewImage$1 = AppViewImage;
|
|
1791
1791
|
|
|
1792
|
-
var modules_63b47c51$
|
|
1792
|
+
var modules_63b47c51$2 = {"BhdSelect":"index_module_BhdSelect__0982ff78","bhdSelect_option":"index_module_bhdSelect_option__0982ff78","bhdSelectDrop":"index_module_bhdSelectDrop__0982ff78","selectTitle":"index_module_selectTitle__0982ff78","bhdSelectSearch":"index_module_bhdSelectSearch__0982ff78","search":"index_module_search__0982ff78"};
|
|
1793
1793
|
|
|
1794
1794
|
var Search = Input.Search;
|
|
1795
1795
|
var RenderDrop = function(param) {
|
|
@@ -1812,7 +1812,7 @@ var BhdSelect = function(props) {
|
|
|
1812
1812
|
var _useState1 = _sliced_to_array(useState(0), 2), optionHei = _useState1[0], setOptionHei = _useState1[1]; //option的宽度
|
|
1813
1813
|
var _useState2 = _sliced_to_array(useState(""), 2), filterValue = _useState2[0], setFilterValue = _useState2[1]; //下拉搜索的内容
|
|
1814
1814
|
var _useState3 = _sliced_to_array(useState([]), 2), filterChildren = _useState3[0], setfilterChildren = _useState3[1];
|
|
1815
|
-
|
|
1815
|
+
var _useState4 = _sliced_to_array(useState(0), 2), selectWidth = _useState4[0], setSelectWidth = _useState4[1]; //下拉框的宽度
|
|
1816
1816
|
var renderSuffixIcon = function() {
|
|
1817
1817
|
switch(arrowType){
|
|
1818
1818
|
case "table":
|
|
@@ -1929,12 +1929,12 @@ var BhdSelect = function(props) {
|
|
|
1929
1929
|
//如果需要搜索菜单
|
|
1930
1930
|
if (showSearch) {
|
|
1931
1931
|
return /*#__PURE__*/ jsxs("div", {
|
|
1932
|
-
className: "".concat(modules_63b47c51$
|
|
1932
|
+
className: "".concat(modules_63b47c51$2.bhdSelectDrop, " ").concat(optionClassName),
|
|
1933
1933
|
ref: bhdDropdownRef,
|
|
1934
1934
|
children: [
|
|
1935
1935
|
renderTitle(),
|
|
1936
1936
|
/*#__PURE__*/ jsx("div", {
|
|
1937
|
-
className: modules_63b47c51$
|
|
1937
|
+
className: modules_63b47c51$2.bhdSelectSearch,
|
|
1938
1938
|
style: {
|
|
1939
1939
|
backgroundColor: select_title ? "rgba(0,0,0,0.02)" : "rgba(0,0,0,0)"
|
|
1940
1940
|
},
|
|
@@ -1944,7 +1944,7 @@ var BhdSelect = function(props) {
|
|
|
1944
1944
|
var value = param.target.value;
|
|
1945
1945
|
setFilterValue(value);
|
|
1946
1946
|
},
|
|
1947
|
-
className: "".concat(modules_63b47c51$
|
|
1947
|
+
className: "".concat(modules_63b47c51$2.search, " ").concat(searchClassName || ""),
|
|
1948
1948
|
onKeyDown: function(e) {
|
|
1949
1949
|
e.stopPropagation();
|
|
1950
1950
|
},
|
|
@@ -1956,7 +1956,7 @@ var BhdSelect = function(props) {
|
|
|
1956
1956
|
});
|
|
1957
1957
|
} else {
|
|
1958
1958
|
return /*#__PURE__*/ jsx("div", {
|
|
1959
|
-
className: modules_63b47c51$
|
|
1959
|
+
className: modules_63b47c51$2.bhdSelectDrop,
|
|
1960
1960
|
ref: bhdDropdownRef,
|
|
1961
1961
|
children: dropdownRender ? dropdownRender(menu) : menu
|
|
1962
1962
|
});
|
|
@@ -1971,18 +1971,16 @@ var BhdSelect = function(props) {
|
|
|
1971
1971
|
return select_title;
|
|
1972
1972
|
} else {
|
|
1973
1973
|
return /*#__PURE__*/ jsx("div", {
|
|
1974
|
-
className: modules_63b47c51$
|
|
1974
|
+
className: modules_63b47c51$2.selectTitle,
|
|
1975
1975
|
children: select_title
|
|
1976
1976
|
});
|
|
1977
1977
|
}
|
|
1978
1978
|
};
|
|
1979
1979
|
useEffect(function() {
|
|
1980
1980
|
// console.log(34343434,props);
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
// // console.log(bhdSelectRef.current.getBoundingClientRect(),555555555);
|
|
1985
|
-
// }
|
|
1981
|
+
if (props.popupMatchSelectWidth) {
|
|
1982
|
+
setSelectWidth(props.popupMatchSelectWidth);
|
|
1983
|
+
}
|
|
1986
1984
|
filterOption();
|
|
1987
1985
|
window.addEventListener("resize", initHeight);
|
|
1988
1986
|
return function() {
|
|
@@ -1997,8 +1995,12 @@ var BhdSelect = function(props) {
|
|
|
1997
1995
|
var getConfig = function() {
|
|
1998
1996
|
var config = _object_spread_props(_object_spread({}, props), {
|
|
1999
1997
|
listHeight: optionHei,
|
|
2000
|
-
popupClassName: "".concat(modules_63b47c51$
|
|
2001
|
-
suffixIcon: suffixIcon ? suffixIcon : renderSuffixIcon()
|
|
1998
|
+
popupClassName: "".concat(modules_63b47c51$2.bhdSelect_option, " ").concat(popupClassName || "", " "),
|
|
1999
|
+
suffixIcon: suffixIcon ? suffixIcon : renderSuffixIcon(),
|
|
2000
|
+
popupMatchSelectWidth: selectWidth,
|
|
2001
|
+
dropdownStyle: _object_spread_props(_object_spread({}, props.dropdownStyle), {
|
|
2002
|
+
width: selectWidth
|
|
2003
|
+
})
|
|
2002
2004
|
});
|
|
2003
2005
|
delete config.mask;
|
|
2004
2006
|
delete config.className;
|
|
@@ -2015,7 +2017,7 @@ var BhdSelect = function(props) {
|
|
|
2015
2017
|
return config;
|
|
2016
2018
|
};
|
|
2017
2019
|
return /*#__PURE__*/ jsx("div", {
|
|
2018
|
-
className: "".concat(modules_63b47c51$
|
|
2020
|
+
className: "".concat(modules_63b47c51$2.BhdSelect, " ").concat(className),
|
|
2019
2021
|
ref: bhdSelectRef,
|
|
2020
2022
|
children: /*#__PURE__*/ jsx(Select, _object_spread_props(_object_spread({}, getConfig()), {
|
|
2021
2023
|
showSearch: false,
|
|
@@ -2043,12 +2045,13 @@ var BhdSelect = function(props) {
|
|
|
2043
2045
|
}
|
|
2044
2046
|
//表格中使用下拉列表,定义下拉列表宽度
|
|
2045
2047
|
// console.log(props.dropdownStyle,'sdsddfdfdf');
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2048
|
+
if (props.dropdownStyle != undefined && props.dropdownStyle.width != undefined) {
|
|
2049
|
+
setSelectWidth(props.dropdownStyle.width);
|
|
2050
|
+
} else if ((props.dropdownStyle == undefined || props.dropdownStyle.width == undefined) && useType === "table") {
|
|
2051
|
+
try {
|
|
2052
|
+
setSelectWidth(bhdSelectRef.current.parentNode.getBoundingClientRect().width + 14);
|
|
2053
|
+
} catch (error) {}
|
|
2054
|
+
}
|
|
2052
2055
|
props.onMouseEnter && props.onMouseEnter(e);
|
|
2053
2056
|
},
|
|
2054
2057
|
children: filterChildren
|
|
@@ -2058,7 +2061,7 @@ var BhdSelect = function(props) {
|
|
|
2058
2061
|
BhdSelect.Option = Select.Option;
|
|
2059
2062
|
var BhdSelect$1 = BhdSelect;
|
|
2060
2063
|
|
|
2061
|
-
var modules_63b47c51$
|
|
2064
|
+
var modules_63b47c51$1 = {"bhd_app_layout":"index_module_bhd_app_layout__577bc6d2","bhd_app_layout_header":"index_module_bhd_app_layout_header__577bc6d2","bhd_app_layout_main":"index_module_bhd_app_layout_main__577bc6d2","bhd_app_layout_main_filter":"index_module_bhd_app_layout_main_filter__577bc6d2","bhd_app_layout_main_filter_title":"index_module_bhd_app_layout_main_filter_title__577bc6d2","bhd_app_layout_main_filter_ul":"index_module_bhd_app_layout_main_filter_ul__577bc6d2","bhd_app_layout_main_filter_show_value":"index_module_bhd_app_layout_main_filter_show_value__577bc6d2","bhd_app_layout_main_filter_clear":"index_module_bhd_app_layout_main_filter_clear__577bc6d2","bhd_app_layout_main_table":"index_module_bhd_app_layout_main_table__577bc6d2","bhd_app_layout_footer":"index_module_bhd_app_layout_footer__577bc6d2"};
|
|
2062
2065
|
|
|
2063
2066
|
var zh_CN = {
|
|
2064
2067
|
已筛选: "已筛选",
|
|
@@ -2213,11 +2216,11 @@ function BhdAppLayout(props) {
|
|
|
2213
2216
|
otherContentRef === null || otherContentRef === void 0 ? void 0 : (_otherContentRef_current = otherContentRef.current) === null || _otherContentRef_current === void 0 ? void 0 : _otherContentRef_current.offsetHeight
|
|
2214
2217
|
]);
|
|
2215
2218
|
return /*#__PURE__*/ jsxs("div", {
|
|
2216
|
-
className: "".concat(modules_63b47c51$
|
|
2219
|
+
className: "".concat(modules_63b47c51$1.bhd_app_layout, " ").concat(modules_63b47c51$1.className, " ").concat(className || ""),
|
|
2217
2220
|
children: [
|
|
2218
2221
|
/*#__PURE__*/ jsx("header", {
|
|
2219
2222
|
ref: headRef,
|
|
2220
|
-
className: "".concat(modules_63b47c51$
|
|
2223
|
+
className: "".concat(modules_63b47c51$1.bhd_app_layout_header, " ").concat(headerClassName || ""),
|
|
2221
2224
|
children: headConfig && /*#__PURE__*/ jsx(TitleBar$1, _object_spread({}, headConfig))
|
|
2222
2225
|
}),
|
|
2223
2226
|
headContent && /*#__PURE__*/ jsx("div", {
|
|
@@ -2225,30 +2228,30 @@ function BhdAppLayout(props) {
|
|
|
2225
2228
|
children: headContent
|
|
2226
2229
|
}),
|
|
2227
2230
|
/*#__PURE__*/ jsxs("main", {
|
|
2228
|
-
className: modules_63b47c51$
|
|
2231
|
+
className: modules_63b47c51$1.bhd_app_layout_main,
|
|
2229
2232
|
children: [
|
|
2230
2233
|
(filterConfig === null || filterConfig === void 0 ? void 0 : filterConfig.filterArr) && filterConfig.filterArr.length ? /*#__PURE__*/ jsxs("div", {
|
|
2231
2234
|
ref: filterRef,
|
|
2232
|
-
className: modules_63b47c51$
|
|
2235
|
+
className: modules_63b47c51$1.bhd_app_layout_main_filter,
|
|
2233
2236
|
children: [
|
|
2234
2237
|
/*#__PURE__*/ jsxs("div", {
|
|
2235
|
-
className: modules_63b47c51$
|
|
2238
|
+
className: modules_63b47c51$1.bhd_app_layout_main_filter_title,
|
|
2236
2239
|
children: [
|
|
2237
2240
|
i18Conversion$1("已筛选"),
|
|
2238
2241
|
":"
|
|
2239
2242
|
]
|
|
2240
2243
|
}),
|
|
2241
2244
|
/*#__PURE__*/ jsx("ul", {
|
|
2242
|
-
className: modules_63b47c51$
|
|
2245
|
+
className: modules_63b47c51$1.bhd_app_layout_main_filter_ul,
|
|
2243
2246
|
children: filterConfig.filterArr.map(function(ele, index) {
|
|
2244
2247
|
return /*#__PURE__*/ jsxs("li", {
|
|
2245
2248
|
children: [
|
|
2246
2249
|
/*#__PURE__*/ jsx("span", {
|
|
2247
|
-
className: modules_63b47c51$
|
|
2250
|
+
className: modules_63b47c51$1.bhd_app_layout_main_filter_show_title,
|
|
2248
2251
|
children: ele.title
|
|
2249
2252
|
}),
|
|
2250
2253
|
/*#__PURE__*/ jsxs("span", {
|
|
2251
|
-
className: modules_63b47c51$
|
|
2254
|
+
className: modules_63b47c51$1.bhd_app_layout_main_filter_show_value,
|
|
2252
2255
|
children: [
|
|
2253
2256
|
"“",
|
|
2254
2257
|
ele.value,
|
|
@@ -2267,7 +2270,7 @@ function BhdAppLayout(props) {
|
|
|
2267
2270
|
}),
|
|
2268
2271
|
/*#__PURE__*/ jsx("div", {
|
|
2269
2272
|
onClick: filterConfig === null || filterConfig === void 0 ? void 0 : filterConfig.onClearAll,
|
|
2270
|
-
className: modules_63b47c51$
|
|
2273
|
+
className: modules_63b47c51$1.bhd_app_layout_main_filter_clear,
|
|
2271
2274
|
children: i18Conversion$1("清空条件")
|
|
2272
2275
|
})
|
|
2273
2276
|
]
|
|
@@ -2277,7 +2280,7 @@ function BhdAppLayout(props) {
|
|
|
2277
2280
|
children: otherContent
|
|
2278
2281
|
}),
|
|
2279
2282
|
/*#__PURE__*/ jsx("div", {
|
|
2280
|
-
className: "".concat(modules_63b47c51$
|
|
2283
|
+
className: "".concat(modules_63b47c51$1.bhd_app_layout_main_table, " ").concat(tableBoxClassName || ""),
|
|
2281
2284
|
children: scrollConfig ? tableConfig && /*#__PURE__*/ jsx(BhdTableSimple$1, _object_spread_props(_object_spread({}, tableConfig), {
|
|
2282
2285
|
pagination: false,
|
|
2283
2286
|
scroll: _object_spread({}, scrollConfig)
|
|
@@ -2286,7 +2289,7 @@ function BhdAppLayout(props) {
|
|
|
2286
2289
|
]
|
|
2287
2290
|
}),
|
|
2288
2291
|
footerConfig ? /*#__PURE__*/ jsxs("footer", {
|
|
2289
|
-
className: modules_63b47c51$
|
|
2292
|
+
className: modules_63b47c51$1.bhd_app_layout_footer,
|
|
2290
2293
|
children: [
|
|
2291
2294
|
/*#__PURE__*/ jsx("div", {
|
|
2292
2295
|
children: (footerConfig === null || footerConfig === void 0 ? void 0 : footerConfig.leftDom) && footerConfig.leftDom
|
|
@@ -2298,9 +2301,7 @@ function BhdAppLayout(props) {
|
|
|
2298
2301
|
});
|
|
2299
2302
|
}
|
|
2300
2303
|
|
|
2301
|
-
var modules_63b47c51
|
|
2302
|
-
|
|
2303
|
-
var modules_63b47c51$1 = {"history_list":"index_module_history_list__65b6bf62","search_layout":"index_module_search_layout__65b6bf62","mymove":"index_module_mymove__65b6bf62","title":"index_module_title__65b6bf62","search_top":"index_module_search_top__65b6bf62","main_list":"index_module_main_list__65b6bf62","list":"index_module_list__65b6bf62","name":"index_module_name__65b6bf62","time":"index_module_time__65b6bf62","con":"index_module_con__65b6bf62","no_data":"index_module_no_data__65b6bf62","history_list_broadside":"index_module_history_list_broadside__65b6bf62"};
|
|
2304
|
+
var modules_63b47c51 = {"service_ChatWindow_Drawer":"index_module_service_ChatWindow_Drawer__0ae06d23","ChatWindow_Modal":"index_module_ChatWindow_Modal__0ae06d23","ChatWindow_Drawer":"index_module_ChatWindow_Drawer__0ae06d23","header_wrap":"index_module_header_wrap__0ae06d23","top":"index_module_top__0ae06d23","user":"index_module_user__0ae06d23","count":"index_module_count__0ae06d23","operate":"index_module_operate__0ae06d23","line":"index_module_line__0ae06d23","header_wrap_newlabo":"index_module_header_wrap_newlabo__0ae06d23","Drawer_main":"index_module_Drawer_main__0ae06d23","loading":"index_module_loading__0ae06d23","message_con":"index_module_message_con__0ae06d23","left":"index_module_left__0ae06d23","head_sculpture":"index_module_head_sculpture__0ae06d23","main_content":"index_module_main_content__0ae06d23","right":"index_module_right__0ae06d23","main":"index_module_main__0ae06d23","operate_modal":"index_module_operate_modal__0ae06d23","content":"index_module_content__0ae06d23","content_child":"index_module_content_child__0ae06d23","active":"index_module_active__0ae06d23","ask_question":"index_module_ask_question__0ae06d23","operate_modal_bottom":"index_module_operate_modal_bottom__0ae06d23","stop_generate":"index_module_stop_generate__0ae06d23","icon":"index_module_icon__0ae06d23","find_teacher":"index_module_find_teacher__0ae06d23","stop_findTeacher":"index_module_stop_findTeacher__0ae06d23","association_problem":"index_module_association_problem__0ae06d23","time":"index_module_time__0ae06d23","citation_content":"index_module_citation_content__0ae06d23","text_exceed":"index_module_text_exceed__0ae06d23","popover_content":"index_module_popover_content__0ae06d23","Drawer_main_newlabo":"index_module_Drawer_main_newlabo__0ae06d23","Drawer_main_newlabo_no_pic":"index_module_Drawer_main_newlabo_no_pic__0ae06d23","Drawer_buttom_Issues_List":"index_module_Drawer_buttom_Issues_List__0ae06d23","issues_list_teacherList":"index_module_issues_list_teacherList__0ae06d23","item":"index_module_item__0ae06d23","issues_list":"index_module_issues_list__0ae06d23","sign":"index_module_sign__0ae06d23","Drawer_buttom":"index_module_Drawer_buttom__0ae06d23","input_wrap":"index_module_input_wrap__0ae06d23","input":"index_module_input__0ae06d23","no_AI":"index_module_no_AI__0ae06d23","voice":"index_module_voice__0ae06d23","voice_btn":"index_module_voice_btn__0ae06d23","disabled":"index_module_disabled__0ae06d23","content_main":"index_module_content_main__0ae06d23","content_con":"index_module_content_con__0ae06d23","delete_quote":"index_module_delete_quote__0ae06d23","sending":"index_module_sending__0ae06d23","Drawer_buttom_Issues_List_newlabo":"index_module_Drawer_buttom_Issues_List_newlabo__0ae06d23","main_list":"index_module_main_list__0ae06d23","chat_content":"index_module_chat_content__0ae06d23","popover_main_content":"index_module_popover_main_content__0ae06d23","popover_main_content_name":"index_module_popover_main_content_name__0ae06d23","teacher_layout":"index_module_teacher_layout__0ae06d23","bottom":"index_module_bottom__0ae06d23","delete":"index_module_delete__0ae06d23","num":"index_module_num__0ae06d23","shrink":"index_module_shrink__0ae06d23","teacher_layout_newlabo":"index_module_teacher_layout_newlabo__0ae06d23","teacher_layout_modal":"index_module_teacher_layout_modal__0ae06d23","ai":"index_module_ai__0ae06d23","user_info":"index_module_user_info__0ae06d23","message":"index_module_message__0ae06d23","con":"index_module_con__0ae06d23","teacher_layout_modal_newlabo":"index_module_teacher_layout_modal_newlabo__0ae06d23","history_list":"index_module_history_list__0ae06d23","search_layout":"index_module_search_layout__0ae06d23","mymove":"index_module_mymove__0ae06d23","title":"index_module_title__0ae06d23","search_top":"index_module_search_top__0ae06d23","list":"index_module_list__0ae06d23","name":"index_module_name__0ae06d23","no_data":"index_module_no_data__0ae06d23","history_list_broadside":"index_module_history_list_broadside__0ae06d23"};
|
|
2304
2305
|
|
|
2305
2306
|
//消息已读
|
|
2306
2307
|
var readMessage = function(roomId, urllocation, userData, http) {
|
|
@@ -2355,6 +2356,9 @@ var copyText = function(text) {
|
|
|
2355
2356
|
};
|
|
2356
2357
|
//获取当前时间
|
|
2357
2358
|
var getDataTime = function(time) {
|
|
2359
|
+
var type = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : -1;
|
|
2360
|
+
//type = 1 ,获取当前年月日
|
|
2361
|
+
//type = 2 ,只显示十 分
|
|
2358
2362
|
try {
|
|
2359
2363
|
var now;
|
|
2360
2364
|
if (time != undefined && time != -1) {
|
|
@@ -2370,24 +2374,58 @@ var getDataTime = function(time) {
|
|
|
2370
2374
|
var minutes = String(now.getMinutes()).padStart(2, "0");
|
|
2371
2375
|
var seconds = String(now.getSeconds()).padStart(2, "0");
|
|
2372
2376
|
var currentDateTime = "".concat(year, "-").concat(month, "-").concat(day, " ").concat(hours, ":").concat(minutes, ":").concat(seconds);
|
|
2373
|
-
|
|
2377
|
+
if (type == 1) {
|
|
2378
|
+
return "".concat(year, "-").concat(month, "-").concat(day);
|
|
2379
|
+
} else if (type == 2) {
|
|
2380
|
+
return "".concat(hours, ":").concat(minutes);
|
|
2381
|
+
} else {
|
|
2382
|
+
return currentDateTime;
|
|
2383
|
+
}
|
|
2374
2384
|
} catch (error) {
|
|
2375
2385
|
return "";
|
|
2376
2386
|
}
|
|
2377
2387
|
};
|
|
2378
2388
|
|
|
2379
2389
|
var HistoryFun = function(props) {
|
|
2380
|
-
var type = props.type, roomId = props.roomId, userData = props.userData, http = props.http, urllocation = props.urllocation, onClose = props.onClose, loadSpecifiedData = props.loadSpecifiedData;
|
|
2390
|
+
var type = props.type, roomId = props.roomId, userData = props.userData, http = props.http, urllocation = props.urllocation, onClose = props.onClose, loadSpecifiedData = props.loadSpecifiedData;
|
|
2381
2391
|
var _useState = _sliced_to_array(useState(""), 2), keyWordProblem = _useState[0], setKeyWordProblem = _useState[1]; //搜索内容
|
|
2382
2392
|
var _useState1 = _sliced_to_array(useState([]), 2), keyHistoryMessageList = _useState1[0], setKeyHistoryMessageList = _useState1[1]; //搜索的历史记录
|
|
2383
|
-
var _useState2 = _sliced_to_array(useState(
|
|
2384
|
-
var _useState3 = _sliced_to_array(useState(1), 2)
|
|
2385
|
-
var _useState4 = _sliced_to_array(useState(
|
|
2393
|
+
var _useState2 = _sliced_to_array(useState(1), 2), showLoadingState = _useState2[0], setShowLoadingState = _useState2[1]; //1,初始状态,2、无数据 ,3、不显示图片
|
|
2394
|
+
var _useState3 = _sliced_to_array(useState(1), 2); _useState3[0]; _useState3[1];
|
|
2395
|
+
var _useState4 = _sliced_to_array(useState(0), 2); _useState4[0]; var setPageCount = _useState4[1];
|
|
2396
|
+
var _useState5 = _sliced_to_array(useState(false), 2), load = _useState5[0], setLoad = _useState5[1];
|
|
2386
2397
|
var timer = useRef(null); //文本框输入时
|
|
2387
2398
|
var objName = useRef([]);
|
|
2399
|
+
// useEffect(() => {
|
|
2400
|
+
// function handleScroll() {
|
|
2401
|
+
// const container = document.getElementById('history_list');
|
|
2402
|
+
// const scrollTop = container.scrollTop;
|
|
2403
|
+
// const clientHeight = container.clientHeight;
|
|
2404
|
+
// const scrollHeight = container.scrollHeight;
|
|
2405
|
+
// // console.log(scrollTop,clientHeight,scrollHeight,'333dfkvmdfv')
|
|
2406
|
+
// // if((clientHeight + scrollTop + 10) >= scrollHeight && pageCount > pageNum && pageCount > 0){
|
|
2407
|
+
// // // console.log(11111111,pageNumHistory)
|
|
2408
|
+
// // let number = pageNum + 1;
|
|
2409
|
+
// // console.log('到底部了22222',number)
|
|
2410
|
+
// // setPageNum((pageNum) => {
|
|
2411
|
+
// // return pageNum + 1;
|
|
2412
|
+
// // });
|
|
2413
|
+
// // getKeyHistoryMessage(keyWordProblem,number);
|
|
2414
|
+
// // }
|
|
2415
|
+
// }
|
|
2416
|
+
// const content = document.getElementById('history_list');
|
|
2417
|
+
// if (content) {
|
|
2418
|
+
// content.addEventListener("scroll", handleScroll);
|
|
2419
|
+
// }
|
|
2420
|
+
// return () => {
|
|
2421
|
+
// const content = document.getElementById('history_list');
|
|
2422
|
+
// if (content) {
|
|
2423
|
+
// content.removeEventListener("scroll", handleScroll);
|
|
2424
|
+
// }
|
|
2425
|
+
// };
|
|
2426
|
+
// }, [keyHistoryMessageList]);
|
|
2388
2427
|
useEffect(function() {
|
|
2389
2428
|
setKeyHistoryMessageList(function(list) {
|
|
2390
|
-
console.log(objName, 4444455555);
|
|
2391
2429
|
var newList = list.map(function(item) {
|
|
2392
2430
|
var name = "";
|
|
2393
2431
|
var nameList = objName.current.filter(function(a) {
|
|
@@ -2396,12 +2434,10 @@ var HistoryFun = function(props) {
|
|
|
2396
2434
|
if (nameList.length > 0) {
|
|
2397
2435
|
name = nameList[0].name;
|
|
2398
2436
|
}
|
|
2399
|
-
console.log(name, 77777);
|
|
2400
2437
|
return _object_spread_props(_object_spread({}, item), {
|
|
2401
2438
|
name: name
|
|
2402
2439
|
});
|
|
2403
2440
|
});
|
|
2404
|
-
console.log(newList, 4444444444);
|
|
2405
2441
|
return newList;
|
|
2406
2442
|
});
|
|
2407
2443
|
}, [
|
|
@@ -2409,13 +2445,16 @@ var HistoryFun = function(props) {
|
|
|
2409
2445
|
]);
|
|
2410
2446
|
//获取搜索中的历史消息记录
|
|
2411
2447
|
var getKeyHistoryMessage = function(keyWordProblem) {
|
|
2448
|
+
var page = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
|
|
2412
2449
|
if (roomId == "") return;
|
|
2450
|
+
setLoad(false);
|
|
2451
|
+
setKeyHistoryMessageList([]);
|
|
2413
2452
|
return http.get("".concat(urllocation, "/chat-service/public/v1.0/history-messages"), {
|
|
2414
2453
|
params: {
|
|
2415
2454
|
roomId: "",
|
|
2416
2455
|
message: keyWordProblem,
|
|
2417
|
-
page:
|
|
2418
|
-
maxPageSize:
|
|
2456
|
+
page: page,
|
|
2457
|
+
maxPageSize: 1000,
|
|
2419
2458
|
direction: "desc"
|
|
2420
2459
|
},
|
|
2421
2460
|
headers: {
|
|
@@ -2425,11 +2464,16 @@ var HistoryFun = function(props) {
|
|
|
2425
2464
|
"x-auth-jwt": window.localStorage.getItem("usertoken") || ""
|
|
2426
2465
|
}
|
|
2427
2466
|
}).then(function(res) {
|
|
2428
|
-
console.log(res.data, 3434378);
|
|
2429
2467
|
if (res.data.messages.length > 0) {
|
|
2468
|
+
var total = res.data.total;
|
|
2469
|
+
var maxPageSize = 20;
|
|
2470
|
+
setPageCount(Math.ceil(total / maxPageSize));
|
|
2430
2471
|
setShowLoadingState(3);
|
|
2431
2472
|
var dataList = res.data.messages;
|
|
2432
|
-
setKeyHistoryMessageList(
|
|
2473
|
+
setKeyHistoryMessageList(function(list) {
|
|
2474
|
+
var newList = list.concat(dataList);
|
|
2475
|
+
return newList;
|
|
2476
|
+
});
|
|
2433
2477
|
getUserName(dataList);
|
|
2434
2478
|
} else {
|
|
2435
2479
|
// setKeyHistoryMessageList([]);
|
|
@@ -2462,7 +2506,7 @@ var HistoryFun = function(props) {
|
|
|
2462
2506
|
return pageNumber;
|
|
2463
2507
|
};
|
|
2464
2508
|
//根据index,计算历史数据在第几页
|
|
2465
|
-
var calculationData = function(roomId,
|
|
2509
|
+
var calculationData = function(roomId, id, receiver) {
|
|
2466
2510
|
allData(roomId).then(function(res) {
|
|
2467
2511
|
// console.log(res.data.messages,'11111111')
|
|
2468
2512
|
if (res.data) {
|
|
@@ -2476,7 +2520,10 @@ var HistoryFun = function(props) {
|
|
|
2476
2520
|
}
|
|
2477
2521
|
});
|
|
2478
2522
|
var pageNumber = findPageNumber(30, Math.ceil(total / 30), number);
|
|
2479
|
-
console.log(
|
|
2523
|
+
// console.log(
|
|
2524
|
+
// roomId, pageNumber, id,
|
|
2525
|
+
// "第几页第几页第几页第几页第几页第几页"
|
|
2526
|
+
// );
|
|
2480
2527
|
loadSpecifiedData(roomId, pageNumber, id, receiver);
|
|
2481
2528
|
onClose();
|
|
2482
2529
|
setKeyWordProblem("");
|
|
@@ -2528,12 +2575,12 @@ var HistoryFun = function(props) {
|
|
|
2528
2575
|
});
|
|
2529
2576
|
};
|
|
2530
2577
|
return /*#__PURE__*/ jsx("div", {
|
|
2531
|
-
className: "".concat(modules_63b47c51
|
|
2578
|
+
className: "".concat(modules_63b47c51.history_list, " ").concat(type == 2 ? modules_63b47c51.history_list_broadside : "", " "),
|
|
2532
2579
|
children: /*#__PURE__*/ jsxs("div", {
|
|
2533
|
-
className: modules_63b47c51
|
|
2580
|
+
className: modules_63b47c51.search_layout,
|
|
2534
2581
|
children: [
|
|
2535
2582
|
/*#__PURE__*/ jsxs("div", {
|
|
2536
|
-
className: modules_63b47c51
|
|
2583
|
+
className: modules_63b47c51.title,
|
|
2537
2584
|
children: [
|
|
2538
2585
|
/*#__PURE__*/ jsx("span", {
|
|
2539
2586
|
children: "历史记录"
|
|
@@ -2547,7 +2594,7 @@ var HistoryFun = function(props) {
|
|
|
2547
2594
|
]
|
|
2548
2595
|
}),
|
|
2549
2596
|
/*#__PURE__*/ jsxs("div", {
|
|
2550
|
-
className: modules_63b47c51
|
|
2597
|
+
className: modules_63b47c51.search_top,
|
|
2551
2598
|
children: [
|
|
2552
2599
|
/*#__PURE__*/ jsx(SearchOutlined, {}),
|
|
2553
2600
|
/*#__PURE__*/ jsx(Input, {
|
|
@@ -2581,10 +2628,11 @@ var HistoryFun = function(props) {
|
|
|
2581
2628
|
]
|
|
2582
2629
|
}),
|
|
2583
2630
|
/*#__PURE__*/ jsxs("div", {
|
|
2584
|
-
className: modules_63b47c51
|
|
2631
|
+
className: modules_63b47c51.main_list,
|
|
2632
|
+
id: "history_list",
|
|
2585
2633
|
children: [
|
|
2586
2634
|
showLoadingState == 1 && /*#__PURE__*/ jsxs("div", {
|
|
2587
|
-
className: modules_63b47c51
|
|
2635
|
+
className: modules_63b47c51.no_data,
|
|
2588
2636
|
children: [
|
|
2589
2637
|
/*#__PURE__*/ jsx("img", {
|
|
2590
2638
|
src: "/new_yun/images/aiService/search_for_icon.png"
|
|
@@ -2595,7 +2643,7 @@ var HistoryFun = function(props) {
|
|
|
2595
2643
|
]
|
|
2596
2644
|
}),
|
|
2597
2645
|
showLoadingState == 2 && /*#__PURE__*/ jsxs("div", {
|
|
2598
|
-
className: modules_63b47c51
|
|
2646
|
+
className: modules_63b47c51.no_data,
|
|
2599
2647
|
children: [
|
|
2600
2648
|
/*#__PURE__*/ jsx("img", {
|
|
2601
2649
|
src: "/new_yun/images/aiService/no_data.png"
|
|
@@ -2607,7 +2655,7 @@ var HistoryFun = function(props) {
|
|
|
2607
2655
|
}),
|
|
2608
2656
|
keyHistoryMessageList.map(function(item, index) {
|
|
2609
2657
|
var span = item.message.replaceAll(keyWordProblem, function() {
|
|
2610
|
-
return "<span class=".concat(modules_63b47c51
|
|
2658
|
+
return "<span class=".concat(modules_63b47c51.sign, ">").concat(keyWordProblem, "</span>");
|
|
2611
2659
|
});
|
|
2612
2660
|
var name = "";
|
|
2613
2661
|
if (item.receiver == userData.mid) {
|
|
@@ -2620,26 +2668,35 @@ var HistoryFun = function(props) {
|
|
|
2620
2668
|
} else {
|
|
2621
2669
|
name = item.name;
|
|
2622
2670
|
}
|
|
2671
|
+
var time = "";
|
|
2672
|
+
var currentTime = getDataTime(-1, 1); //当前时间
|
|
2673
|
+
var updatedAt = getDataTime(item.updatedAt, 1);
|
|
2674
|
+
if (currentTime == updatedAt) {
|
|
2675
|
+
time = getDataTime(item.updatedAt, 2);
|
|
2676
|
+
} else {
|
|
2677
|
+
time = getDataTime(item.updatedAt);
|
|
2678
|
+
}
|
|
2623
2679
|
return /*#__PURE__*/ jsxs("div", {
|
|
2624
|
-
className: modules_63b47c51
|
|
2680
|
+
className: modules_63b47c51.list,
|
|
2625
2681
|
onClick: function() {
|
|
2626
|
-
|
|
2682
|
+
var id = item.receiver; // == userData.mid ? item.sender : item.receiver
|
|
2683
|
+
calculationData(item.roomId, item.id, id);
|
|
2627
2684
|
},
|
|
2628
2685
|
children: [
|
|
2629
2686
|
/*#__PURE__*/ jsxs("div", {
|
|
2630
|
-
className: modules_63b47c51
|
|
2687
|
+
className: modules_63b47c51.name,
|
|
2631
2688
|
children: [
|
|
2632
2689
|
/*#__PURE__*/ jsx("p", {
|
|
2633
2690
|
children: name
|
|
2634
2691
|
}),
|
|
2635
2692
|
/*#__PURE__*/ jsx("span", {
|
|
2636
|
-
className: modules_63b47c51
|
|
2637
|
-
children:
|
|
2693
|
+
className: modules_63b47c51.time,
|
|
2694
|
+
children: time
|
|
2638
2695
|
})
|
|
2639
2696
|
]
|
|
2640
2697
|
}),
|
|
2641
2698
|
/*#__PURE__*/ jsx("div", {
|
|
2642
|
-
className: modules_63b47c51
|
|
2699
|
+
className: modules_63b47c51.con,
|
|
2643
2700
|
dangerouslySetInnerHTML: {
|
|
2644
2701
|
__html: span
|
|
2645
2702
|
}
|
|
@@ -2655,25 +2712,21 @@ var HistoryFun = function(props) {
|
|
|
2655
2712
|
};
|
|
2656
2713
|
var HistoryFun$1 = HistoryFun;
|
|
2657
2714
|
|
|
2658
|
-
var modules_63b47c51 = {"teacher_layout":"index_module_teacher_layout__7dfb8d6a","top":"index_module_top__7dfb8d6a","bottom":"index_module_bottom__7dfb8d6a","delete":"index_module_delete__7dfb8d6a","num":"index_module_num__7dfb8d6a","shrink":"index_module_shrink__7dfb8d6a","active":"index_module_active__7dfb8d6a","teacher_layout_newlabo":"index_module_teacher_layout_newlabo__7dfb8d6a","teacher_layout_modal":"index_module_teacher_layout_modal__7dfb8d6a","ai":"index_module_ai__7dfb8d6a","user_info":"index_module_user_info__7dfb8d6a","message":"index_module_message__7dfb8d6a","time":"index_module_time__7dfb8d6a","con":"index_module_con__7dfb8d6a"};
|
|
2659
|
-
|
|
2660
2715
|
var ContactsList = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
2661
2716
|
var type = props.type, roomId = props.roomId, userData = props.userData, http = props.http, urllocation = props.urllocation, onClose = props.onClose, switchChatRoom = props.switchChatRoom, saveContactsList = props.saveContactsList;
|
|
2662
2717
|
var _useState = _sliced_to_array(useState([]), 2), contactsList = _useState[0], setContactsList = _useState[1]; //老师列表
|
|
2663
|
-
var _useState1 = _sliced_to_array(useState(""), 2); _useState1[0]; var setNewRoomId = _useState1[1];
|
|
2664
|
-
var _useState2 = _sliced_to_array(useState(true), 2); _useState2[0]; _useState2[1];
|
|
2665
|
-
// const [type,setType] = useState(0);
|
|
2666
2718
|
var timer = useRef(null); //文本框输入时
|
|
2667
2719
|
//获取聊天室列表
|
|
2668
2720
|
useEffect(function() {
|
|
2669
2721
|
roomsListTimer();
|
|
2670
|
-
if (roomId != "") {
|
|
2671
|
-
setNewRoomId(roomId);
|
|
2672
|
-
}
|
|
2673
2722
|
return function() {
|
|
2674
2723
|
clearTimeout(timer.current);
|
|
2675
2724
|
};
|
|
2676
2725
|
}, []);
|
|
2726
|
+
// //获取聊天室列表
|
|
2727
|
+
// useEffect(() => {
|
|
2728
|
+
// roomsListTimer();
|
|
2729
|
+
// }, [contactsList]);
|
|
2677
2730
|
useImperativeHandle(ref, function() {
|
|
2678
2731
|
return {
|
|
2679
2732
|
roomsListTimer: function() {
|
|
@@ -2681,11 +2734,6 @@ var ContactsList = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
2681
2734
|
}
|
|
2682
2735
|
};
|
|
2683
2736
|
});
|
|
2684
|
-
// useEffect(()=>{
|
|
2685
|
-
// //重新调用接口
|
|
2686
|
-
// console.log(44444444,contactsList)
|
|
2687
|
-
// roomsListTimer();
|
|
2688
|
-
// },[type])
|
|
2689
2737
|
var roomsListTimer = function() {
|
|
2690
2738
|
if (timer != null) clearTimeout(timer.current);
|
|
2691
2739
|
timer.current = setTimeout(function() {
|
|
@@ -2705,7 +2753,6 @@ var ContactsList = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
2705
2753
|
}).then(function(res) {
|
|
2706
2754
|
if (res.data) {
|
|
2707
2755
|
var list = res.data.contacts;
|
|
2708
|
-
// let newMessage = false;
|
|
2709
2756
|
setContactsList(function(contactsList) {
|
|
2710
2757
|
list = list.map(function(item, index) {
|
|
2711
2758
|
var c_list = contactsList.filter(function(e) {
|
|
@@ -2720,42 +2767,24 @@ var ContactsList = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
2720
2767
|
return list;
|
|
2721
2768
|
});
|
|
2722
2769
|
getUserInfo(list);
|
|
2723
|
-
// if(firstLoading){
|
|
2724
|
-
// setFirstLoading(false);
|
|
2725
|
-
// let isRoom = false;
|
|
2726
|
-
// for (let index = 0; index < list.length; index++) {
|
|
2727
|
-
// let count = list[index].unreadCount;
|
|
2728
|
-
// if(count > 0 && list[index].roomId == roomId){
|
|
2729
|
-
// isRoom = true;
|
|
2730
|
-
// //在当前窗口
|
|
2731
|
-
// return null;
|
|
2732
|
-
// }else if(count > 0){
|
|
2733
|
-
// isRoom = true;
|
|
2734
|
-
// switchChatRoom(list[index].roomId, "");
|
|
2735
|
-
// setContactsList((contactsList)=>{
|
|
2736
|
-
// let new_list = contactsList;
|
|
2737
|
-
// new_list = new_list.map((item)=>{
|
|
2738
|
-
// if(item.roomId == list[index].roomId){
|
|
2739
|
-
// return {
|
|
2740
|
-
// ...item,
|
|
2741
|
-
// unreadCount:0,
|
|
2742
|
-
// }
|
|
2743
|
-
// }else{
|
|
2744
|
-
// return item;
|
|
2745
|
-
// }
|
|
2746
|
-
// })
|
|
2747
|
-
// return new_list;
|
|
2748
|
-
// })
|
|
2749
|
-
// return null;
|
|
2750
|
-
// }
|
|
2751
|
-
// }
|
|
2752
|
-
// }
|
|
2753
2770
|
saveContactsList(list);
|
|
2754
2771
|
}
|
|
2755
2772
|
});
|
|
2756
2773
|
};
|
|
2757
2774
|
//删除聊天室
|
|
2758
2775
|
var deleteRoom = function(roomId) {
|
|
2776
|
+
var contactsList;
|
|
2777
|
+
setContactsList(function(list) {
|
|
2778
|
+
contactsList = list.filter(function(e) {
|
|
2779
|
+
return e.roomId != roomId;
|
|
2780
|
+
});
|
|
2781
|
+
//切换到AI聊天窗口
|
|
2782
|
+
if (roomId == props.roomId) {
|
|
2783
|
+
switchChatRoom(contactsList[0].roomId, "");
|
|
2784
|
+
}
|
|
2785
|
+
saveContactsList(contactsList);
|
|
2786
|
+
return contactsList;
|
|
2787
|
+
});
|
|
2759
2788
|
http.delete("".concat(urllocation, "/chat-service/public/v1.0/rooms/").concat(roomId), {
|
|
2760
2789
|
headers: {
|
|
2761
2790
|
"x-module-id": userData.modules.find(function(ele) {
|
|
@@ -2765,16 +2794,6 @@ var ContactsList = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
2765
2794
|
}
|
|
2766
2795
|
}).then(function(res) {
|
|
2767
2796
|
roomsListTimer();
|
|
2768
|
-
// let contactsList;
|
|
2769
|
-
// setContactsList((list)=>{
|
|
2770
|
-
// contactsList = list.filter(e=>e.roomId != roomId);
|
|
2771
|
-
// //切换到AI聊天窗口
|
|
2772
|
-
// if(roomId == props.roomId){
|
|
2773
|
-
// switchChatRoom(contactsList[0].roomId, "");
|
|
2774
|
-
// }
|
|
2775
|
-
// return contactsList;
|
|
2776
|
-
// })
|
|
2777
|
-
// saveContactsList(contactsList);
|
|
2778
2797
|
});
|
|
2779
2798
|
};
|
|
2780
2799
|
//获取老师的信息等
|
|
@@ -2815,16 +2834,15 @@ var ContactsList = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
2815
2834
|
};
|
|
2816
2835
|
return type == 2 || type == 4 ? //联系人展开
|
|
2817
2836
|
/*#__PURE__*/ jsxs("div", {
|
|
2818
|
-
className: modules_63b47c51.teacher_layout_modal,
|
|
2837
|
+
className: "".concat(modules_63b47c51.teacher_layout_modal, " ").concat(type == 4 ? modules_63b47c51.teacher_layout_modal_newlabo : ""),
|
|
2819
2838
|
children: [
|
|
2820
2839
|
/*#__PURE__*/ jsx("div", {
|
|
2821
2840
|
className: modules_63b47c51.top,
|
|
2822
2841
|
children: /*#__PURE__*/ jsxs("div", {
|
|
2823
2842
|
className: "".concat(modules_63b47c51.ai, " ").concat(contactsList.length > 0 && contactsList[0].roomId != undefined && roomId != "" && contactsList[0].roomId == roomId || contactsList.length == 0 ? modules_63b47c51.active : ""),
|
|
2824
2843
|
onClick: function() {
|
|
2825
|
-
setNewRoomId(contactsList[0].roomId);
|
|
2826
2844
|
switchChatRoom(contactsList[0].roomId, "");
|
|
2827
|
-
|
|
2845
|
+
// roomsListTimer();
|
|
2828
2846
|
},
|
|
2829
2847
|
children: [
|
|
2830
2848
|
/*#__PURE__*/ jsx(CustomAiIcon$1, {}),
|
|
@@ -2837,7 +2855,7 @@ var ContactsList = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
2837
2855
|
"AI助手",
|
|
2838
2856
|
/*#__PURE__*/ jsx("span", {
|
|
2839
2857
|
className: modules_63b47c51.time,
|
|
2840
|
-
children: contactsList.length > 0 && getDataTime(contactsList[0].createdAt)
|
|
2858
|
+
children: contactsList.length > 0 && contactsList[0].createdAt != undefined && getDataTime(contactsList[0].createdAt)
|
|
2841
2859
|
})
|
|
2842
2860
|
]
|
|
2843
2861
|
}),
|
|
@@ -2856,12 +2874,36 @@ var ContactsList = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
2856
2874
|
className: modules_63b47c51.bottom,
|
|
2857
2875
|
children: contactsList.map(function(item, index) {
|
|
2858
2876
|
if (index != 0) {
|
|
2877
|
+
var currentTime = getDataTime(-1, 1); //当前时间
|
|
2878
|
+
var updatedAt = getDataTime(item.createdAt, 1);
|
|
2879
|
+
if (currentTime == updatedAt) {
|
|
2880
|
+
getDataTime(item.createdAt, 2);
|
|
2881
|
+
} else {
|
|
2882
|
+
getDataTime(item.createdAt);
|
|
2883
|
+
}
|
|
2859
2884
|
return /*#__PURE__*/ jsxs("div", {
|
|
2860
2885
|
className: "".concat(modules_63b47c51.ai, " ").concat(item.roomId != undefined && roomId != "" && item.roomId == roomId ? modules_63b47c51.active : ""),
|
|
2861
2886
|
onClick: function() {
|
|
2862
|
-
setNewRoomId(item.roomId);
|
|
2863
2887
|
switchChatRoom(item.roomId, "");
|
|
2864
|
-
roomsListTimer();
|
|
2888
|
+
// roomsListTimer();
|
|
2889
|
+
var newList = [];
|
|
2890
|
+
setContactsList(function(list) {
|
|
2891
|
+
newList = list;
|
|
2892
|
+
newList = newList.map(function(v) {
|
|
2893
|
+
if (v.roomId == item.roomId) {
|
|
2894
|
+
return _object_spread_props(_object_spread({}, v), {
|
|
2895
|
+
unreadCount: 0
|
|
2896
|
+
});
|
|
2897
|
+
} else {
|
|
2898
|
+
return v;
|
|
2899
|
+
}
|
|
2900
|
+
});
|
|
2901
|
+
return newList;
|
|
2902
|
+
});
|
|
2903
|
+
// console.log(newList,9999999999)
|
|
2904
|
+
setTimeout(function() {
|
|
2905
|
+
saveContactsList(newList);
|
|
2906
|
+
}, 100);
|
|
2865
2907
|
},
|
|
2866
2908
|
children: [
|
|
2867
2909
|
/*#__PURE__*/ jsx("img", {
|
|
@@ -2873,7 +2915,12 @@ var ContactsList = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
2873
2915
|
/*#__PURE__*/ jsxs("p", {
|
|
2874
2916
|
className: modules_63b47c51.message,
|
|
2875
2917
|
children: [
|
|
2876
|
-
item.name,
|
|
2918
|
+
item.name != undefined && getByteLen(item.name) >= 20 ? /*#__PURE__*/ jsx(Tooltip, {
|
|
2919
|
+
overlayClassName: "".concat(modules_63b47c51.popover_main_content_name),
|
|
2920
|
+
title: item.name,
|
|
2921
|
+
placement: "top",
|
|
2922
|
+
children: item.name
|
|
2923
|
+
}) : item.name,
|
|
2877
2924
|
item.unreadCount != undefined && item.unreadCount > 0 && !(item.roomId != undefined && roomId != "" && item.roomId == roomId) && /*#__PURE__*/ jsx("span", {
|
|
2878
2925
|
className: modules_63b47c51.num,
|
|
2879
2926
|
children: item.unreadCount > 99 ? "99+" : item.unreadCount
|
|
@@ -2925,9 +2972,8 @@ var ContactsList = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
2925
2972
|
/*#__PURE__*/ jsxs("div", {
|
|
2926
2973
|
className: "".concat(modules_63b47c51.ai, " ").concat(contactsList.length > 0 && contactsList[0].roomId != undefined && roomId != "" && contactsList[0].roomId == roomId || contactsList.length == 0 ? modules_63b47c51.active : ""),
|
|
2927
2974
|
onClick: function() {
|
|
2928
|
-
setNewRoomId(contactsList[0].roomId);
|
|
2929
2975
|
switchChatRoom(contactsList[0].roomId, "");
|
|
2930
|
-
|
|
2976
|
+
// roomsListTimer();
|
|
2931
2977
|
},
|
|
2932
2978
|
children: [
|
|
2933
2979
|
/*#__PURE__*/ jsx(CustomAiIcon$1, {}),
|
|
@@ -2947,16 +2993,39 @@ var ContactsList = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
2947
2993
|
return /*#__PURE__*/ jsxs("div", {
|
|
2948
2994
|
className: "".concat(modules_63b47c51.ai, " ").concat(item.roomId != undefined && roomId != "" && item.roomId == roomId ? modules_63b47c51.active : ""),
|
|
2949
2995
|
onClick: function() {
|
|
2950
|
-
setNewRoomId(item.roomId);
|
|
2951
2996
|
switchChatRoom(item.roomId, "");
|
|
2952
|
-
roomsListTimer();
|
|
2997
|
+
// roomsListTimer();
|
|
2998
|
+
//消息更改为已读
|
|
2999
|
+
var newList = [];
|
|
3000
|
+
setContactsList(function(list) {
|
|
3001
|
+
newList = list;
|
|
3002
|
+
newList = newList.map(function(v) {
|
|
3003
|
+
if (v.roomId == item.roomId) {
|
|
3004
|
+
return _object_spread_props(_object_spread({}, v), {
|
|
3005
|
+
unreadCount: 0
|
|
3006
|
+
});
|
|
3007
|
+
} else {
|
|
3008
|
+
return v;
|
|
3009
|
+
}
|
|
3010
|
+
});
|
|
3011
|
+
return newList;
|
|
3012
|
+
});
|
|
3013
|
+
// console.log(newList,9999999999)
|
|
3014
|
+
setTimeout(function() {
|
|
3015
|
+
saveContactsList(newList);
|
|
3016
|
+
}, 100);
|
|
2953
3017
|
},
|
|
2954
3018
|
children: [
|
|
2955
3019
|
/*#__PURE__*/ jsx("img", {
|
|
2956
3020
|
src: item.headImg
|
|
2957
3021
|
}),
|
|
2958
3022
|
/*#__PURE__*/ jsx("p", {
|
|
2959
|
-
children: item.name
|
|
3023
|
+
children: item.name != undefined && getByteLen(item.name) >= 10 ? /*#__PURE__*/ jsx(Tooltip, {
|
|
3024
|
+
overlayClassName: modules_63b47c51.popover_main_content_name,
|
|
3025
|
+
title: item.name,
|
|
3026
|
+
placement: "top",
|
|
3027
|
+
children: item.name
|
|
3028
|
+
}) : item.name
|
|
2960
3029
|
}),
|
|
2961
3030
|
item.unreadCount != undefined && item.unreadCount > 0 && !(item.roomId != undefined && roomId != "" && item.roomId == roomId) && /*#__PURE__*/ jsx("span", {
|
|
2962
3031
|
className: modules_63b47c51.num,
|
|
@@ -3121,38 +3190,38 @@ var useMediaRecorder = function() {
|
|
|
3121
3190
|
};
|
|
3122
3191
|
};
|
|
3123
3192
|
|
|
3193
|
+
var styles = modules_63b47c51;
|
|
3124
3194
|
var TextArea = Input.TextArea;
|
|
3125
3195
|
var CustomerService = function(props) {
|
|
3126
3196
|
var userData = props.userData, http = props.http, urllocation = props.urllocation, onCancel = props.onCancel, serverName = props.serverName, fetchEventSource = props.fetchEventSource, initShowType = props.initShowType, onEvent = props.onEvent, stepIds = props.stepIds, stepId = props.stepId;
|
|
3127
|
-
var _useState = _sliced_to_array(useState(props.userData.mid), 2), mid = _useState[0]; _useState[1]; //当前用户id
|
|
3128
3197
|
var _useMediaRecorder = useMediaRecorder(), bese64String = _useMediaRecorder.bese64String, startRecord = _useMediaRecorder.startRecord, stopRecord = _useMediaRecorder.stopRecord; //语音转文字
|
|
3129
|
-
var
|
|
3130
|
-
var
|
|
3131
|
-
var
|
|
3132
|
-
var
|
|
3133
|
-
var
|
|
3134
|
-
var
|
|
3135
|
-
var
|
|
3136
|
-
var
|
|
3137
|
-
var
|
|
3138
|
-
var
|
|
3139
|
-
var
|
|
3140
|
-
var
|
|
3141
|
-
var
|
|
3142
|
-
var
|
|
3143
|
-
var
|
|
3144
|
-
var
|
|
3145
|
-
var
|
|
3146
|
-
var
|
|
3147
|
-
var
|
|
3148
|
-
var
|
|
3149
|
-
var
|
|
3150
|
-
var
|
|
3151
|
-
var
|
|
3152
|
-
var
|
|
3153
|
-
var
|
|
3154
|
-
var
|
|
3155
|
-
var
|
|
3198
|
+
var _useState = _sliced_to_array(useState(3), 2), voiceRecordingStatus = _useState[0], setVoiceRecordingStatus = _useState[1]; //语音录制状态 3,语音识别完成 2,录制中, 1,录制结束
|
|
3199
|
+
var _useState1 = _sliced_to_array(useState([]), 2), copyTextOBJ = _useState1[0], setCopyTextObj = _useState1[1]; //复制的消息id
|
|
3200
|
+
var _useState2 = _sliced_to_array(useState({}), 2), citationContent = _useState2[0], setCitationContent = _useState2[1]; //引用内容
|
|
3201
|
+
var _useState3 = _sliced_to_array(useState(""), 2), roomId = _useState3[0], setRoomId = _useState3[1]; //聊天室id
|
|
3202
|
+
var _useState4 = _sliced_to_array(useState([]), 2), historyMessageList = _useState4[0], setHistoryMessageList = _useState4[1]; //历史消息
|
|
3203
|
+
var _useState5 = _sliced_to_array(useState(""), 2), keyWord = _useState5[0], setKeyWord = _useState5[1]; //搜索内容
|
|
3204
|
+
var _useState6 = _sliced_to_array(useState([]), 2), questionsList = _useState6[0], setQuestionsList = _useState6[1]; //问题列表
|
|
3205
|
+
var _useState7 = _sliced_to_array(useState([]), 2), hotQuestionsList = _useState7[0], setHotQuestionsList = _useState7[1]; //热门问题
|
|
3206
|
+
var _useState8 = _sliced_to_array(useState(false), 2), greetingMessage = _useState8[0], setGreetingMessage = _useState8[1]; //聊天记录列表是否请求完成
|
|
3207
|
+
var _useState9 = _sliced_to_array(useState(1), 2), pageNum = _useState9[0], setPageNum = _useState9[1]; //页码
|
|
3208
|
+
var _useState10 = _sliced_to_array(useState(0), 2), pageNumHistory = _useState10[0], setPageNumHistory = _useState10[1]; //用于搜索历史记录后的页码
|
|
3209
|
+
var _useState11 = _sliced_to_array(useState(0), 2), pageCount = _useState11[0], setPageCount = _useState11[1]; //总页数
|
|
3210
|
+
var _useState12 = _sliced_to_array(useState(false), 2), loading = _useState12[0], setLoading = _useState12[1]; //上拉显示加载图标
|
|
3211
|
+
var _useState13 = _sliced_to_array(useState(false), 2), bottomLoading = _useState13[0], setBottomLoading = _useState13[1]; //下拉显示加载图标
|
|
3212
|
+
var _useState14 = _sliced_to_array(useState(true), 2), finished = _useState14[0], setFinished = _useState14[1]; //是否结束生成
|
|
3213
|
+
var _useState15 = _sliced_to_array(useState(""), 2), lastId = _useState15[0], setLastId = _useState15[1]; //最后一条数据的id,可用于定位当前位置
|
|
3214
|
+
var _useState16 = _sliced_to_array(useState({}), 2), chatWith = _useState16[0], setChatWith = _useState16[1]; //聊天的老师id或ai
|
|
3215
|
+
var _useState17 = _sliced_to_array(useState(false), 2), firstLoad = _useState17[0], setFirstLoad = _useState17[1]; //第一次切换全屏时滚动到页面底部
|
|
3216
|
+
var _useState18 = _sliced_to_array(useState(45), 2), buttomHei = _useState18[0], setButtomHei = _useState18[1]; //底部输入框的高度
|
|
3217
|
+
var _useState19 = _sliced_to_array(useState(false), 2), showHistory = _useState19[0], setShowHistory = _useState19[1]; //是否显示历史记录
|
|
3218
|
+
var _useState20 = _sliced_to_array(useState(false), 2), showContacts = _useState20[0], setShowContacts = _useState20[1]; //是否显示关联老师
|
|
3219
|
+
var _useState21 = _sliced_to_array(useState(-1), 2), showType = _useState21[0], setShowType = _useState21[1]; //显示聊天框类型 1、侧边栏 2 modal 3 相应的div中 newlabo中使用
|
|
3220
|
+
var _useState22 = _sliced_to_array(useState(-1), 2), answerMode = _useState22[0], setAnswerMode = _useState22[1]; //设置回答模式。1,召唤老师回答
|
|
3221
|
+
var _useState23 = _sliced_to_array(useState([]), 2), teacherList = _useState23[0], setTeacherList = _useState23[1]; //老师列表
|
|
3222
|
+
var _useState24 = _sliced_to_array(useState({}), 2), problem = _useState24[0], setProblem = _useState24[1]; //召唤老师回答的问题
|
|
3223
|
+
var _useState25 = _sliced_to_array(useState([]), 2), roomList = _useState25[0], setRoomList = _useState25[1]; //聊天列表
|
|
3224
|
+
var _useState26 = _sliced_to_array(useState([]), 2), chatObj = _useState26[0], setChatObj = _useState26[1]; //聊天记录id保存,用来在实验报告中记录
|
|
3156
3225
|
var timer = useRef(null); //文本框输入时
|
|
3157
3226
|
var receiveMessageTimer = useRef(null); //接收ai发回的消息
|
|
3158
3227
|
var voiceCountdownTimer = useRef(null); //语音录制倒计时
|
|
@@ -3160,6 +3229,8 @@ var CustomerService = function(props) {
|
|
|
3160
3229
|
var roomMessage = useRef(null); //循环当前页面的新消息
|
|
3161
3230
|
var ctrl = useRef(); //停止生成ai回答时使用
|
|
3162
3231
|
var childRef = useRef(null); //获取子组件方法
|
|
3232
|
+
// const [mid, setmid] = useState(props.userData.mid); //当前用户id
|
|
3233
|
+
var mid = props.userData.mid;
|
|
3163
3234
|
var remarkable = new Remarkable({
|
|
3164
3235
|
highlight: function highlight(str, lang) {
|
|
3165
3236
|
if (lang && HighlightJS.getLanguage(lang)) {
|
|
@@ -3193,37 +3264,39 @@ var CustomerService = function(props) {
|
|
|
3193
3264
|
var container = document.getElementById(showType == 1 || showType == 3 ? "chat_content" : "chat_content_modal");
|
|
3194
3265
|
var scrollTop = container.scrollTop;
|
|
3195
3266
|
// const scrollBottom = container.scroll;
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
}
|
|
3267
|
+
var clientHeight = container.clientHeight;
|
|
3268
|
+
var scrollHeight = container.scrollHeight;
|
|
3269
|
+
// console.log(scrollTop,clientHeight,scrollHeight,'333dfkvmdfv')
|
|
3270
|
+
if (clientHeight + scrollTop + 0.5 >= scrollHeight) {
|
|
3271
|
+
console.log("到底部了22222");
|
|
3272
|
+
// console.log(11111111,pageNumHistory)
|
|
3273
|
+
if (pageNumHistory > 1) {
|
|
3274
|
+
// console.log(pageNumHistory,'pageNumpageNumpageNum')
|
|
3275
|
+
var number = pageNumHistory - 1;
|
|
3276
|
+
setPageNumHistory(number);
|
|
3277
|
+
clearTimeout(listTimer.current);
|
|
3278
|
+
setBottomLoading(true);
|
|
3279
|
+
listTimer.current = setTimeout(function() {
|
|
3280
|
+
// console.log("加载下一页", number);
|
|
3281
|
+
getHistoryMessage(number, 4);
|
|
3282
|
+
}, 1000);
|
|
3283
|
+
} else {
|
|
3284
|
+
setLastId("");
|
|
3215
3285
|
}
|
|
3216
|
-
}
|
|
3286
|
+
}
|
|
3217
3287
|
if (scrollTop == 0 && pageCount > pageNum && pageCount > 0) {
|
|
3288
|
+
console.log("到顶了", pageNum);
|
|
3289
|
+
// if(pageNum == 1){
|
|
3290
|
+
// setFirstpage(true);//代表是否存在第一页
|
|
3291
|
+
// }
|
|
3218
3292
|
setLoading(true);
|
|
3219
|
-
var
|
|
3293
|
+
var number1 = pageNum + 1;
|
|
3220
3294
|
setPageNum(function(pageNum) {
|
|
3221
3295
|
return pageNum + 1;
|
|
3222
3296
|
});
|
|
3223
|
-
clearTimeout(listTimer.current);
|
|
3224
3297
|
listTimer.current = setTimeout(function() {
|
|
3225
|
-
console.log("下拉加载下一页",
|
|
3226
|
-
getHistoryMessage(
|
|
3298
|
+
console.log("下拉加载下一页", number1);
|
|
3299
|
+
getHistoryMessage(number1, 2);
|
|
3227
3300
|
}, 1000);
|
|
3228
3301
|
}
|
|
3229
3302
|
}
|
|
@@ -3509,19 +3582,23 @@ var CustomerService = function(props) {
|
|
|
3509
3582
|
}
|
|
3510
3583
|
}).then(function(res) {
|
|
3511
3584
|
if (res.data.id) {
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3585
|
+
console.log(pageNum, pageNumHistory, lastId, "dlskskdsd4444");
|
|
3586
|
+
if (pageNum == 1 || pageNumHistory == 1 || pageNumHistory == 0) {
|
|
3587
|
+
setHistoryMessageList(function(historyMessageList) {
|
|
3588
|
+
var newHistoryMessageList = historyMessageList.concat(_object_spread_props(_object_spread({}, obj), {
|
|
3589
|
+
id: res.data.id,
|
|
3590
|
+
upvoted: false,
|
|
3591
|
+
downvoted: false,
|
|
3592
|
+
createdAt: getDataTime(-1)
|
|
3593
|
+
}));
|
|
3594
|
+
return newHistoryMessageList;
|
|
3595
|
+
});
|
|
3596
|
+
if (!lastId) {
|
|
3597
|
+
setTimeout(function() {
|
|
3598
|
+
scrollToBottom();
|
|
3599
|
+
}, 100);
|
|
3600
|
+
}
|
|
3601
|
+
}
|
|
3525
3602
|
//判断当前窗口是否是
|
|
3526
3603
|
if (type == 1) {
|
|
3527
3604
|
var roomList = [
|
|
@@ -3537,7 +3614,6 @@ var CustomerService = function(props) {
|
|
|
3537
3614
|
return list2.concat(roomList);
|
|
3538
3615
|
});
|
|
3539
3616
|
}
|
|
3540
|
-
// }
|
|
3541
3617
|
}
|
|
3542
3618
|
}).catch(function(err) {
|
|
3543
3619
|
console.log(err);
|
|
@@ -3998,6 +4074,7 @@ var CustomerService = function(props) {
|
|
|
3998
4074
|
var getHistoryMessage = function(pageNum, flag) {
|
|
3999
4075
|
var id = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "1";
|
|
4000
4076
|
clearTimeout(roomMessage.current);
|
|
4077
|
+
console.log(pageNum, flag, "dkfjvndfjvndfkvdf");
|
|
4001
4078
|
// flag == 1 时已经设置好了位置标记
|
|
4002
4079
|
var last_id = "";
|
|
4003
4080
|
if (flag == 2 && historyMessageList.length > 0) {
|
|
@@ -4103,7 +4180,7 @@ var CustomerService = function(props) {
|
|
|
4103
4180
|
return item.roomId == rid;
|
|
4104
4181
|
});
|
|
4105
4182
|
var isAiChatWindow = chatWindow.length > 0 && chatWindow[0].sender != undefined && chatWindow[0].sender == "AI" ? true : false;
|
|
4106
|
-
if (!isAiChatWindow && roomList.length > 0) {
|
|
4183
|
+
if (!isAiChatWindow && roomList.length > 0 && (pageNum == 1 || pageNumHistory == 0)) {
|
|
4107
4184
|
getRoomidHistoryMessage(totalNumber, rid);
|
|
4108
4185
|
}
|
|
4109
4186
|
}).catch(function(res) {
|
|
@@ -4122,7 +4199,7 @@ var CustomerService = function(props) {
|
|
|
4122
4199
|
params: {
|
|
4123
4200
|
roomId: rid,
|
|
4124
4201
|
page: 1,
|
|
4125
|
-
maxPageSize: totalNumber
|
|
4202
|
+
maxPageSize: totalNumber,
|
|
4126
4203
|
direction: "desc"
|
|
4127
4204
|
},
|
|
4128
4205
|
headers: {
|
|
@@ -4135,17 +4212,24 @@ var CustomerService = function(props) {
|
|
|
4135
4212
|
var newHistoryMessageList = [];
|
|
4136
4213
|
if (res.data.messages.length > 0) {
|
|
4137
4214
|
var dataList = res.data.messages.reverse();
|
|
4215
|
+
var originList = 0;
|
|
4216
|
+
var newList = 0;
|
|
4138
4217
|
setHistoryMessageList(function(historyMessageList) {
|
|
4139
|
-
|
|
4218
|
+
originList = historyMessageList.length;
|
|
4219
|
+
newHistoryMessageList = historyMessageList.concat(dataList);
|
|
4140
4220
|
//去重
|
|
4141
4221
|
var _$res = new Map();
|
|
4142
4222
|
newHistoryMessageList = newHistoryMessageList.filter(function(a) {
|
|
4143
4223
|
return !_$res.has(a.id) && _$res.set(a.id, 1);
|
|
4144
4224
|
});
|
|
4225
|
+
newList = newHistoryMessageList.length;
|
|
4145
4226
|
return newHistoryMessageList;
|
|
4146
4227
|
});
|
|
4147
|
-
|
|
4148
|
-
|
|
4228
|
+
console.log(dataList.length, originList, lastId, "dfkvdnfkvdfj44444");
|
|
4229
|
+
if (!lastId && originList != newList) {
|
|
4230
|
+
setTimeout(function() {
|
|
4231
|
+
scrollToBottom();
|
|
4232
|
+
}, 100);
|
|
4149
4233
|
}
|
|
4150
4234
|
}
|
|
4151
4235
|
try {
|
|
@@ -4205,7 +4289,7 @@ var CustomerService = function(props) {
|
|
|
4205
4289
|
});
|
|
4206
4290
|
console.log(result, "存储的消息");
|
|
4207
4291
|
result.map(function(item) {
|
|
4208
|
-
testLabQuestion(item.question, item.answer, item.id);
|
|
4292
|
+
testLabQuestion(item.question, item.answer, String(item.id));
|
|
4209
4293
|
});
|
|
4210
4294
|
}
|
|
4211
4295
|
}
|
|
@@ -4368,7 +4452,7 @@ var CustomerService = function(props) {
|
|
|
4368
4452
|
var list = roomList.filter(function(e) {
|
|
4369
4453
|
return e.roomId == roomId;
|
|
4370
4454
|
});
|
|
4371
|
-
var title = "
|
|
4455
|
+
var title = "智能问答";
|
|
4372
4456
|
if (list.length > 0 && list[0].name) {
|
|
4373
4457
|
title = list[0].name;
|
|
4374
4458
|
}
|
|
@@ -4378,16 +4462,16 @@ var CustomerService = function(props) {
|
|
|
4378
4462
|
});
|
|
4379
4463
|
if (showType == 4) {
|
|
4380
4464
|
return /*#__PURE__*/ jsxs("div", {
|
|
4381
|
-
className:
|
|
4465
|
+
className: styles.top,
|
|
4382
4466
|
children: [
|
|
4383
4467
|
/*#__PURE__*/ jsx("div", {
|
|
4384
|
-
className:
|
|
4468
|
+
className: styles.user,
|
|
4385
4469
|
children: /*#__PURE__*/ jsx("p", {
|
|
4386
4470
|
children: title
|
|
4387
4471
|
})
|
|
4388
4472
|
}),
|
|
4389
4473
|
/*#__PURE__*/ jsxs("div", {
|
|
4390
|
-
className:
|
|
4474
|
+
className: styles.operate,
|
|
4391
4475
|
children: [
|
|
4392
4476
|
/*#__PURE__*/ jsx("i", {
|
|
4393
4477
|
onClick: function() {
|
|
@@ -4396,7 +4480,7 @@ var CustomerService = function(props) {
|
|
|
4396
4480
|
children: /*#__PURE__*/ jsx(CustomRecord$1, {})
|
|
4397
4481
|
}),
|
|
4398
4482
|
/*#__PURE__*/ jsx("span", {
|
|
4399
|
-
className:
|
|
4483
|
+
className: styles.line
|
|
4400
4484
|
}),
|
|
4401
4485
|
/*#__PURE__*/ jsx("i", {
|
|
4402
4486
|
onClick: function() {
|
|
@@ -4419,22 +4503,23 @@ var CustomerService = function(props) {
|
|
|
4419
4503
|
]
|
|
4420
4504
|
});
|
|
4421
4505
|
} else {
|
|
4506
|
+
// console.log(roomList,'777668888900')
|
|
4422
4507
|
return /*#__PURE__*/ jsxs("div", {
|
|
4423
|
-
className:
|
|
4508
|
+
className: styles.top,
|
|
4424
4509
|
children: [
|
|
4425
4510
|
/*#__PURE__*/ jsx("div", {
|
|
4426
|
-
className:
|
|
4511
|
+
className: styles.user,
|
|
4427
4512
|
children: /*#__PURE__*/ jsxs("p", {
|
|
4428
4513
|
children: [
|
|
4429
4514
|
showType == 1 && /*#__PURE__*/ jsxs("i", {
|
|
4430
4515
|
className: "lianxiren21",
|
|
4431
4516
|
onClick: function() {
|
|
4432
|
-
setShowContacts(
|
|
4517
|
+
setShowContacts(!showContacts);
|
|
4433
4518
|
},
|
|
4434
4519
|
children: [
|
|
4435
4520
|
/*#__PURE__*/ jsx(CustomContacts$1, {}),
|
|
4436
4521
|
count > 0 ? /*#__PURE__*/ jsx("span", {
|
|
4437
|
-
className:
|
|
4522
|
+
className: styles.count,
|
|
4438
4523
|
children: count > 99 ? "99+" : count
|
|
4439
4524
|
}) : ""
|
|
4440
4525
|
]
|
|
@@ -4444,17 +4529,18 @@ var CustomerService = function(props) {
|
|
|
4444
4529
|
})
|
|
4445
4530
|
}),
|
|
4446
4531
|
/*#__PURE__*/ jsxs("div", {
|
|
4447
|
-
className:
|
|
4532
|
+
className: styles.operate,
|
|
4448
4533
|
children: [
|
|
4449
4534
|
/*#__PURE__*/ jsx("i", {
|
|
4450
4535
|
className: "_lishixiao22",
|
|
4451
4536
|
onClick: function() {
|
|
4452
4537
|
setShowHistory(true);
|
|
4538
|
+
onEvent(serverName + serverUrl(), "click_智能问答_历史记录", "提交");
|
|
4453
4539
|
},
|
|
4454
4540
|
children: /*#__PURE__*/ jsx(CustomRecord$1, {})
|
|
4455
4541
|
}),
|
|
4456
4542
|
/*#__PURE__*/ jsx("span", {
|
|
4457
|
-
className:
|
|
4543
|
+
className: styles.line
|
|
4458
4544
|
}),
|
|
4459
4545
|
showType == 1 ? /*#__PURE__*/ jsx("i", {
|
|
4460
4546
|
onClick: function() {
|
|
@@ -4524,7 +4610,7 @@ var CustomerService = function(props) {
|
|
|
4524
4610
|
// console.log(mid, historyMessageList, "ddkfdscksdcs");
|
|
4525
4611
|
if (historyMessageList.length > 0) {
|
|
4526
4612
|
return /*#__PURE__*/ jsx("ul", {
|
|
4527
|
-
className:
|
|
4613
|
+
className: styles.message_con,
|
|
4528
4614
|
children: historyMessageList.map(function(item, i) {
|
|
4529
4615
|
var timeObj = parseDate(item.createdAt);
|
|
4530
4616
|
// console.log(item.message);
|
|
@@ -4560,22 +4646,22 @@ var CustomerService = function(props) {
|
|
|
4560
4646
|
li = /*#__PURE__*/ jsxs(Fragment, {
|
|
4561
4647
|
children: [
|
|
4562
4648
|
dataTime ? /*#__PURE__*/ jsx("li", {
|
|
4563
|
-
className:
|
|
4649
|
+
className: styles.time,
|
|
4564
4650
|
children: dataTime
|
|
4565
4651
|
}) : "",
|
|
4566
4652
|
/*#__PURE__*/ jsxs("li", {
|
|
4567
|
-
className:
|
|
4653
|
+
className: styles.left,
|
|
4568
4654
|
id: lastId == item.id ? "li_flag" : "",
|
|
4569
4655
|
children: [
|
|
4570
4656
|
/*#__PURE__*/ jsx("div", {
|
|
4571
|
-
className:
|
|
4657
|
+
className: styles.main,
|
|
4572
4658
|
children: /*#__PURE__*/ jsxs("div", {
|
|
4573
|
-
className:
|
|
4659
|
+
className: styles.main_content,
|
|
4574
4660
|
children: [
|
|
4575
4661
|
/*#__PURE__*/ jsx("div", {
|
|
4576
|
-
className:
|
|
4662
|
+
className: styles.operate_modal,
|
|
4577
4663
|
children: /*#__PURE__*/ jsxs("p", {
|
|
4578
|
-
className:
|
|
4664
|
+
className: styles.operate,
|
|
4579
4665
|
children: [
|
|
4580
4666
|
/*#__PURE__*/ jsx("i", {
|
|
4581
4667
|
className: "yinyong_quote1",
|
|
@@ -4621,25 +4707,26 @@ var CustomerService = function(props) {
|
|
|
4621
4707
|
})
|
|
4622
4708
|
}),
|
|
4623
4709
|
/*#__PURE__*/ jsx("div", {
|
|
4624
|
-
className:
|
|
4710
|
+
className: styles.content,
|
|
4625
4711
|
children: /*#__PURE__*/ jsx("p", {
|
|
4626
4712
|
dangerouslySetInnerHTML: {
|
|
4627
4713
|
__html: remarkable.render(message)
|
|
4628
4714
|
},
|
|
4629
|
-
className:
|
|
4715
|
+
className: styles.content_child
|
|
4630
4716
|
})
|
|
4631
4717
|
}),
|
|
4632
4718
|
//引用消息
|
|
4633
4719
|
item.quotedMessage && /*#__PURE__*/ jsx("div", {
|
|
4634
|
-
className:
|
|
4720
|
+
className: styles.citation_content,
|
|
4635
4721
|
children: getByteLen(item.quotedMessage) > 120 ? /*#__PURE__*/ jsx(Tooltip, {
|
|
4636
|
-
overlayClassName:
|
|
4722
|
+
overlayClassName: styles.popover_main_content,
|
|
4637
4723
|
title: item.quotedMessage,
|
|
4638
4724
|
placement: "leftTop",
|
|
4639
4725
|
children: /*#__PURE__*/ jsxs("p", {
|
|
4726
|
+
className: styles.text_exceed,
|
|
4640
4727
|
children: [
|
|
4641
4728
|
item.quotedMessage,
|
|
4642
|
-
|
|
4729
|
+
/*#__PURE__*/ jsx(RightOutlined, {})
|
|
4643
4730
|
]
|
|
4644
4731
|
})
|
|
4645
4732
|
}) : /*#__PURE__*/ jsx("p", {
|
|
@@ -4650,7 +4737,7 @@ var CustomerService = function(props) {
|
|
|
4650
4737
|
})
|
|
4651
4738
|
}),
|
|
4652
4739
|
showType == 2 || showType == 4 ? /*#__PURE__*/ jsx("div", {
|
|
4653
|
-
className:
|
|
4740
|
+
className: styles.head_sculpture,
|
|
4654
4741
|
style: {
|
|
4655
4742
|
marginLeft: "12px"
|
|
4656
4743
|
},
|
|
@@ -4681,15 +4768,15 @@ var CustomerService = function(props) {
|
|
|
4681
4768
|
li = /*#__PURE__*/ jsxs(Fragment, {
|
|
4682
4769
|
children: [
|
|
4683
4770
|
dataTime ? /*#__PURE__*/ jsx("li", {
|
|
4684
|
-
className:
|
|
4771
|
+
className: styles.time,
|
|
4685
4772
|
children: dataTime
|
|
4686
4773
|
}) : "",
|
|
4687
4774
|
/*#__PURE__*/ jsxs("li", {
|
|
4688
|
-
className:
|
|
4775
|
+
className: styles.right,
|
|
4689
4776
|
id: lastId == item.id ? "li_flag" : "",
|
|
4690
4777
|
children: [
|
|
4691
4778
|
(showType == 2 || showType == 4) && /*#__PURE__*/ jsx("div", {
|
|
4692
|
-
className:
|
|
4779
|
+
className: styles.head_sculpture,
|
|
4693
4780
|
style: {
|
|
4694
4781
|
marginRight: "12px"
|
|
4695
4782
|
},
|
|
@@ -4700,26 +4787,26 @@ var CustomerService = function(props) {
|
|
|
4700
4787
|
})
|
|
4701
4788
|
}),
|
|
4702
4789
|
/*#__PURE__*/ jsx("div", {
|
|
4703
|
-
className:
|
|
4790
|
+
className: styles.main,
|
|
4704
4791
|
children: /*#__PURE__*/ jsxs("div", {
|
|
4705
|
-
className:
|
|
4792
|
+
className: styles.main_content,
|
|
4706
4793
|
children: [
|
|
4707
4794
|
/*#__PURE__*/ jsx("div", {
|
|
4708
|
-
className:
|
|
4795
|
+
className: styles.operate_modal,
|
|
4709
4796
|
children: // 不是最后一行,
|
|
4710
4797
|
historyMessageList.length - 1 != i && renderOperateBtn(item, isAiChatWindow, i)
|
|
4711
4798
|
}),
|
|
4712
4799
|
/*#__PURE__*/ jsxs("div", {
|
|
4713
|
-
className:
|
|
4800
|
+
className: styles.content,
|
|
4714
4801
|
children: [
|
|
4715
4802
|
/*#__PURE__*/ jsx("p", {
|
|
4716
4803
|
dangerouslySetInnerHTML: {
|
|
4717
4804
|
__html: remarkable.render(message)
|
|
4718
4805
|
},
|
|
4719
|
-
className:
|
|
4806
|
+
className: styles.content_child
|
|
4720
4807
|
}),
|
|
4721
4808
|
item.extraInfo != undefined && JSON.parse(item.extraInfo).length > 0 && JSON.parse(item.extraInfo)[0].key == "messageSource" && JSON.parse(item.extraInfo)[0].value != "knowledgebase" && /*#__PURE__*/ jsx("ul", {
|
|
4722
|
-
className:
|
|
4809
|
+
className: styles.association_problem,
|
|
4723
4810
|
children: JSON.parse(item.extraInfo).map(function(list, index) {
|
|
4724
4811
|
return /*#__PURE__*/ jsxs("li", {
|
|
4725
4812
|
onClick: function() {
|
|
@@ -4737,15 +4824,16 @@ var CustomerService = function(props) {
|
|
|
4737
4824
|
}),
|
|
4738
4825
|
//引用消息
|
|
4739
4826
|
item.quotedMessage && /*#__PURE__*/ jsx("div", {
|
|
4740
|
-
className:
|
|
4827
|
+
className: styles.citation_content,
|
|
4741
4828
|
children: getByteLen(item.quotedMessage) > 120 ? /*#__PURE__*/ jsx(Tooltip, {
|
|
4742
|
-
overlayClassName:
|
|
4829
|
+
overlayClassName: styles.popover_main_content,
|
|
4743
4830
|
title: item.quotedMessage,
|
|
4744
|
-
placement: "
|
|
4831
|
+
placement: "rightTop",
|
|
4745
4832
|
children: /*#__PURE__*/ jsxs("p", {
|
|
4833
|
+
className: styles.text_exceed,
|
|
4746
4834
|
children: [
|
|
4747
4835
|
item.quotedMessage,
|
|
4748
|
-
|
|
4836
|
+
/*#__PURE__*/ jsx(RightOutlined, {})
|
|
4749
4837
|
]
|
|
4750
4838
|
})
|
|
4751
4839
|
}) : /*#__PURE__*/ jsx("p", {
|
|
@@ -4758,9 +4846,9 @@ var CustomerService = function(props) {
|
|
|
4758
4846
|
isAiChatWindow && item.findTeacher && userData.modules.some(function(item) {
|
|
4759
4847
|
return item.short == "TeacherAnswer";
|
|
4760
4848
|
}) ? /*#__PURE__*/ jsx("div", {
|
|
4761
|
-
className: "".concat(
|
|
4849
|
+
className: "".concat(styles.operate_modal_bottom),
|
|
4762
4850
|
children: /*#__PURE__*/ jsx("p", {
|
|
4763
|
-
className:
|
|
4851
|
+
className: styles.stop_findTeacher,
|
|
4764
4852
|
children: /*#__PURE__*/ jsx("span", {
|
|
4765
4853
|
onClick: function() {
|
|
4766
4854
|
setAnswerMode(-1);
|
|
@@ -4790,7 +4878,7 @@ var CustomerService = function(props) {
|
|
|
4790
4878
|
return "";
|
|
4791
4879
|
}
|
|
4792
4880
|
};
|
|
4793
|
-
//渲染相关操作按钮
|
|
4881
|
+
//渲染相关操作按钮 header == 1 ai ,== 2 知识库
|
|
4794
4882
|
var renderOperateBtn = function(item, isAiChatWindow, i) {
|
|
4795
4883
|
//问候语及点赞下面不需要展示相关按钮
|
|
4796
4884
|
var extraInfo = item.extraInfo;
|
|
@@ -4799,13 +4887,13 @@ var CustomerService = function(props) {
|
|
|
4799
4887
|
return "";
|
|
4800
4888
|
}
|
|
4801
4889
|
return /*#__PURE__*/ jsxs("p", {
|
|
4802
|
-
className:
|
|
4890
|
+
className: styles.operate,
|
|
4803
4891
|
children: [
|
|
4804
4892
|
// 不在智能客服窗口,并已经点击了召唤老师,并有召唤老师权限
|
|
4805
4893
|
isAiChatWindow && answerMode != 1 && userData.modules.some(function(item) {
|
|
4806
4894
|
return item.short == "TeacherAnswer";
|
|
4807
4895
|
}) && /*#__PURE__*/ jsx("span", {
|
|
4808
|
-
className:
|
|
4896
|
+
className: styles.ask_question,
|
|
4809
4897
|
onClick: function() {
|
|
4810
4898
|
setAnswerMode(1);
|
|
4811
4899
|
setProblem({
|
|
@@ -4820,7 +4908,13 @@ var CustomerService = function(props) {
|
|
|
4820
4908
|
recevier: mid,
|
|
4821
4909
|
message: "请告诉我您要召唤的老师名字",
|
|
4822
4910
|
createdAt: getDataTime(-1),
|
|
4823
|
-
findTeacher: true
|
|
4911
|
+
findTeacher: true,
|
|
4912
|
+
extraInfo: item.extraInfo == null ? null : JSON.stringify([
|
|
4913
|
+
{
|
|
4914
|
+
key: "questionId",
|
|
4915
|
+
value: "questionId"
|
|
4916
|
+
}
|
|
4917
|
+
])
|
|
4824
4918
|
});
|
|
4825
4919
|
return newHistoryMessageList;
|
|
4826
4920
|
});
|
|
@@ -4875,14 +4969,14 @@ var CustomerService = function(props) {
|
|
|
4875
4969
|
children: "|"
|
|
4876
4970
|
}),
|
|
4877
4971
|
/*#__PURE__*/ jsx("i", {
|
|
4878
|
-
className: "Frame427319094 ".concat(item.upvoted ?
|
|
4972
|
+
className: "Frame427319094 ".concat(item.upvoted ? styles.active : ""),
|
|
4879
4973
|
onClick: function() {
|
|
4880
4974
|
likeMessage(item.id, item.upvoted);
|
|
4881
4975
|
//老师的聊天窗口中不需要点赞和踩消息
|
|
4882
4976
|
if (!isAiChatWindow) return;
|
|
4883
4977
|
//只有最后一条回答,支持发送点赞或踩
|
|
4884
4978
|
if (!item.upvoted && (historyMessageList.length == i + 1 || historyMessageList.length - 2 == i)) {
|
|
4885
|
-
console.log("判断是AI
|
|
4979
|
+
console.log("判断是AI还是智能问答", item);
|
|
4886
4980
|
if (!item.extraInfo && item.sender == "AI") {
|
|
4887
4981
|
aiSendQuestions(1, {
|
|
4888
4982
|
roomId: roomId,
|
|
@@ -4900,7 +4994,7 @@ var CustomerService = function(props) {
|
|
|
4900
4994
|
children: /*#__PURE__*/ jsx(CustomLike$1, {})
|
|
4901
4995
|
}),
|
|
4902
4996
|
/*#__PURE__*/ jsx("i", {
|
|
4903
|
-
className: "Frame427319095 ".concat(item.downvoted ?
|
|
4997
|
+
className: "Frame427319095 ".concat(item.downvoted ? styles.active : ""),
|
|
4904
4998
|
onClick: function() {
|
|
4905
4999
|
disagreeMessage(item.id, item.downvoted);
|
|
4906
5000
|
//老师的聊天窗口中不需要点赞和踩消息
|
|
@@ -4949,15 +5043,15 @@ var CustomerService = function(props) {
|
|
|
4949
5043
|
findTeacherBtn = true;
|
|
4950
5044
|
}
|
|
4951
5045
|
return /*#__PURE__*/ jsxs("div", {
|
|
4952
|
-
className: "".concat(
|
|
5046
|
+
className: "".concat(styles.operate_modal_bottom),
|
|
4953
5047
|
children: [
|
|
4954
5048
|
/*#__PURE__*/ jsxs("p", {
|
|
4955
|
-
className:
|
|
5049
|
+
className: styles.stop_generate,
|
|
4956
5050
|
children: [
|
|
4957
5051
|
showStopBtn && /*#__PURE__*/ jsxs(Fragment, {
|
|
4958
5052
|
children: [
|
|
4959
5053
|
/*#__PURE__*/ jsx("span", {
|
|
4960
|
-
className:
|
|
5054
|
+
className: styles.icon,
|
|
4961
5055
|
onClick: function() {
|
|
4962
5056
|
try {
|
|
4963
5057
|
if (ctrl && ctrl.current) {
|
|
@@ -4996,14 +5090,18 @@ var CustomerService = function(props) {
|
|
|
4996
5090
|
]
|
|
4997
5091
|
}),
|
|
4998
5092
|
//在ai窗口并ai已经生成完答案
|
|
4999
|
-
findTeacherBtn &&
|
|
5000
|
-
|
|
5093
|
+
findTeacherBtn && userData.modules.some(function(item) {
|
|
5094
|
+
return item.short == "TeacherAnswer";
|
|
5095
|
+
}) && /*#__PURE__*/ jsx("span", {
|
|
5096
|
+
className: styles.find_teacher,
|
|
5001
5097
|
onClick: function() {
|
|
5002
5098
|
setAnswerMode(1);
|
|
5003
5099
|
setProblem({
|
|
5004
5100
|
question: historyMessageList[i - 1].message,
|
|
5005
5101
|
user: problem.user
|
|
5006
5102
|
});
|
|
5103
|
+
console.log(item, "88888999999");
|
|
5104
|
+
// if(item.extraInfo == null){
|
|
5007
5105
|
setHistoryMessageList(function(historyMessageList) {
|
|
5008
5106
|
var newHistoryMessageList = historyMessageList.concat({
|
|
5009
5107
|
id: -1,
|
|
@@ -5012,10 +5110,40 @@ var CustomerService = function(props) {
|
|
|
5012
5110
|
recevier: mid,
|
|
5013
5111
|
message: "请告诉我您要召唤的老师名字",
|
|
5014
5112
|
createdAt: getDataTime(-1),
|
|
5015
|
-
findTeacher: true
|
|
5113
|
+
findTeacher: true,
|
|
5114
|
+
extraInfo: item.extraInfo == null ? null : JSON.stringify([
|
|
5115
|
+
{
|
|
5116
|
+
key: "questionId",
|
|
5117
|
+
value: "questionId"
|
|
5118
|
+
}
|
|
5119
|
+
])
|
|
5016
5120
|
});
|
|
5017
5121
|
return newHistoryMessageList;
|
|
5018
5122
|
});
|
|
5123
|
+
// }else{
|
|
5124
|
+
// setHistoryMessageList(
|
|
5125
|
+
// (historyMessageList) => {
|
|
5126
|
+
// let newHistoryMessageList =
|
|
5127
|
+
// historyMessageList.concat({
|
|
5128
|
+
// id: -1,
|
|
5129
|
+
// roomId: roomId,
|
|
5130
|
+
// sender: "AI",
|
|
5131
|
+
// recevier: mid,
|
|
5132
|
+
// message:
|
|
5133
|
+
// "请告诉我您要召唤的老师名字",
|
|
5134
|
+
// createdAt: getDataTime(-1),
|
|
5135
|
+
// findTeacher:true,
|
|
5136
|
+
// extraInfo: JSON.stringify([
|
|
5137
|
+
// {
|
|
5138
|
+
// key: "questionId",
|
|
5139
|
+
// value: "questionId",
|
|
5140
|
+
// },
|
|
5141
|
+
// ])
|
|
5142
|
+
// });
|
|
5143
|
+
// return newHistoryMessageList;
|
|
5144
|
+
// }
|
|
5145
|
+
// );
|
|
5146
|
+
// }
|
|
5019
5147
|
setTimeout(function() {
|
|
5020
5148
|
scrollToBottom();
|
|
5021
5149
|
}, 200);
|
|
@@ -5025,7 +5153,7 @@ var CustomerService = function(props) {
|
|
|
5025
5153
|
]
|
|
5026
5154
|
}),
|
|
5027
5155
|
/*#__PURE__*/ jsxs("p", {
|
|
5028
|
-
className: "".concat(
|
|
5156
|
+
className: "".concat(styles.operate),
|
|
5029
5157
|
children: [
|
|
5030
5158
|
regenerationBtn && /*#__PURE__*/ jsx("i", {
|
|
5031
5159
|
onClick: function() {
|
|
@@ -5085,14 +5213,14 @@ var CustomerService = function(props) {
|
|
|
5085
5213
|
children: "|"
|
|
5086
5214
|
}),
|
|
5087
5215
|
/*#__PURE__*/ jsx("i", {
|
|
5088
|
-
className: "Frame427319094 ".concat(item.upvoted ?
|
|
5216
|
+
className: "Frame427319094 ".concat(item.upvoted ? styles.active : ""),
|
|
5089
5217
|
onClick: function() {
|
|
5090
5218
|
likeMessage(item.id, item.upvoted);
|
|
5091
5219
|
//老师的聊天窗口中不需要点赞和踩消息
|
|
5092
5220
|
if (!isAiChatWindow) return;
|
|
5093
5221
|
//只有最后一条回答,支持发送点赞或踩
|
|
5094
5222
|
if (!item.upvoted && (historyMessageList.length == i + 1 || historyMessageList.length - 2 == i)) {
|
|
5095
|
-
console.log("判断是AI
|
|
5223
|
+
console.log("判断是AI还是智能问答", item);
|
|
5096
5224
|
if (!item.extraInfo && item.sender == "AI") {
|
|
5097
5225
|
aiSendQuestions(1, {
|
|
5098
5226
|
roomId: roomId,
|
|
@@ -5110,7 +5238,7 @@ var CustomerService = function(props) {
|
|
|
5110
5238
|
children: /*#__PURE__*/ jsx(CustomLike$1, {})
|
|
5111
5239
|
}),
|
|
5112
5240
|
/*#__PURE__*/ jsx("i", {
|
|
5113
|
-
className: "Frame427319095 ".concat(item.downvoted ?
|
|
5241
|
+
className: "Frame427319095 ".concat(item.downvoted ? styles.active : ""),
|
|
5114
5242
|
onClick: function() {
|
|
5115
5243
|
disagreeMessage(item.id, item.downvoted);
|
|
5116
5244
|
//老师的聊天窗口中不需要点赞和踩消息
|
|
@@ -5145,7 +5273,7 @@ var CustomerService = function(props) {
|
|
|
5145
5273
|
var placeholder = "";
|
|
5146
5274
|
var disabled = false;
|
|
5147
5275
|
if (voiceRecordingStatus == 2) {
|
|
5148
|
-
placeholder = "
|
|
5276
|
+
placeholder = "语音录制中,请说话...";
|
|
5149
5277
|
} else if (voiceRecordingStatus == 1) {
|
|
5150
5278
|
placeholder = "正在语音识别文字,请稍后...";
|
|
5151
5279
|
} else if (!finished) {
|
|
@@ -5157,15 +5285,15 @@ var CustomerService = function(props) {
|
|
|
5157
5285
|
return /*#__PURE__*/ jsxs(Fragment, {
|
|
5158
5286
|
children: [
|
|
5159
5287
|
/*#__PURE__*/ jsxs("div", {
|
|
5160
|
-
className:
|
|
5288
|
+
className: styles.input_wrap,
|
|
5161
5289
|
onChange: function() {
|
|
5162
5290
|
resettingBottomHei();
|
|
5163
5291
|
},
|
|
5164
5292
|
children: [
|
|
5165
5293
|
/*#__PURE__*/ jsxs("div", {
|
|
5166
|
-
className: "".concat(
|
|
5294
|
+
className: "".concat(styles.input, " ").concat(userData.modules.some(function(item) {
|
|
5167
5295
|
return item.short == "AIservice";
|
|
5168
|
-
}) ? "" :
|
|
5296
|
+
}) ? "" : styles.no_AI),
|
|
5169
5297
|
children: [
|
|
5170
5298
|
/*#__PURE__*/ jsx(TextArea, {
|
|
5171
5299
|
placeholder: placeholder,
|
|
@@ -5205,7 +5333,7 @@ var CustomerService = function(props) {
|
|
|
5205
5333
|
if (roomList.length > 0 && roomList[0].roomId != roomId) {
|
|
5206
5334
|
sendToTeacher(2);
|
|
5207
5335
|
} else {
|
|
5208
|
-
sendMessage();
|
|
5336
|
+
sendMessage("", 0);
|
|
5209
5337
|
}
|
|
5210
5338
|
setButtomHei(45);
|
|
5211
5339
|
} else {
|
|
@@ -5220,16 +5348,16 @@ var CustomerService = function(props) {
|
|
|
5220
5348
|
maxLength: 1000
|
|
5221
5349
|
}),
|
|
5222
5350
|
citationContent.content != undefined && citationContent.content != "" ? /*#__PURE__*/ jsxs("div", {
|
|
5223
|
-
className:
|
|
5351
|
+
className: styles.content_main,
|
|
5224
5352
|
children: [
|
|
5225
5353
|
/*#__PURE__*/ jsx("div", {
|
|
5226
|
-
className:
|
|
5354
|
+
className: styles.content_con,
|
|
5227
5355
|
children: /*#__PURE__*/ jsx("p", {
|
|
5228
5356
|
children: citationContent.content
|
|
5229
5357
|
})
|
|
5230
5358
|
}),
|
|
5231
5359
|
/*#__PURE__*/ jsx("i", {
|
|
5232
|
-
className:
|
|
5360
|
+
className: styles.delete_quote,
|
|
5233
5361
|
onClick: function() {
|
|
5234
5362
|
setCitationContent({});
|
|
5235
5363
|
resettingBottomHei();
|
|
@@ -5243,10 +5371,10 @@ var CustomerService = function(props) {
|
|
|
5243
5371
|
userData.modules.some(function(item) {
|
|
5244
5372
|
return item.short == "AIservice";
|
|
5245
5373
|
}) ? /*#__PURE__*/ jsxs("p", {
|
|
5246
|
-
className:
|
|
5374
|
+
className: styles.voice,
|
|
5247
5375
|
children: [
|
|
5248
5376
|
voiceRecordingStatus == 1 || voiceRecordingStatus == 3 ? /*#__PURE__*/ jsx("i", {
|
|
5249
|
-
className: "".concat(!disabled ?
|
|
5377
|
+
className: "".concat(!disabled ? styles.disabled : ""),
|
|
5250
5378
|
onClick: function() {
|
|
5251
5379
|
//开始录音
|
|
5252
5380
|
if (!disabled) return;
|
|
@@ -5264,7 +5392,7 @@ var CustomerService = function(props) {
|
|
|
5264
5392
|
voiceRecordingStatus == 2 ? /*#__PURE__*/ jsx("img", {
|
|
5265
5393
|
// src={Voice_btn}
|
|
5266
5394
|
src: "/new_yun/images/aiService/voice_btn.gif",
|
|
5267
|
-
className:
|
|
5395
|
+
className: styles.voice_btn,
|
|
5268
5396
|
onClick: function() {
|
|
5269
5397
|
//结束录音
|
|
5270
5398
|
// console.log(mediaRecorder,'3333333');
|
|
@@ -5279,9 +5407,9 @@ var CustomerService = function(props) {
|
|
|
5279
5407
|
]
|
|
5280
5408
|
}),
|
|
5281
5409
|
/*#__PURE__*/ jsx("p", {
|
|
5282
|
-
className: "".concat(
|
|
5410
|
+
className: "".concat(styles.sending),
|
|
5283
5411
|
children: /*#__PURE__*/ jsx("i", {
|
|
5284
|
-
className: "".concat(!disabled || keyWord.trim() == "" ?
|
|
5412
|
+
className: "".concat(!disabled || keyWord.trim() == "" ? styles.disabled : ""),
|
|
5285
5413
|
onClick: function() {
|
|
5286
5414
|
if (!disabled) return;
|
|
5287
5415
|
setCitationContent({});
|
|
@@ -5292,7 +5420,7 @@ var CustomerService = function(props) {
|
|
|
5292
5420
|
if (roomList.length > 0 && roomList[0].roomId != roomId) {
|
|
5293
5421
|
sendToTeacher(2);
|
|
5294
5422
|
} else {
|
|
5295
|
-
sendMessage();
|
|
5423
|
+
sendMessage("", 0);
|
|
5296
5424
|
}
|
|
5297
5425
|
onEvent(serverName + serverUrl(), "click_智能问答_ Enter", "提交");
|
|
5298
5426
|
}
|
|
@@ -5307,16 +5435,16 @@ var CustomerService = function(props) {
|
|
|
5307
5435
|
var renderAssociationProblem = function() {
|
|
5308
5436
|
if (answerMode == 1) {
|
|
5309
5437
|
return /*#__PURE__*/ jsx("div", {
|
|
5310
|
-
className: "".concat(
|
|
5438
|
+
className: "".concat(styles.issues_list, " ").concat(styles.issues_list_teacherList),
|
|
5311
5439
|
style: {
|
|
5312
|
-
bottom: "".concat(buttomHei +
|
|
5440
|
+
bottom: "".concat(buttomHei + 14, "px")
|
|
5313
5441
|
},
|
|
5314
5442
|
children: teacherList.map(function(item) {
|
|
5315
5443
|
var span = item.name.replaceAll(keyWord, function() {
|
|
5316
|
-
return "<span class=".concat(
|
|
5444
|
+
return "<span class=".concat(styles.sign, ">").concat(keyWord, "</span>");
|
|
5317
5445
|
});
|
|
5318
5446
|
return /*#__PURE__*/ jsx("p", {
|
|
5319
|
-
className:
|
|
5447
|
+
className: styles.item,
|
|
5320
5448
|
children: /*#__PURE__*/ jsx("span", {
|
|
5321
5449
|
onClick: function() {
|
|
5322
5450
|
setTeacherList([]);
|
|
@@ -5351,16 +5479,16 @@ var CustomerService = function(props) {
|
|
|
5351
5479
|
});
|
|
5352
5480
|
} else {
|
|
5353
5481
|
return /*#__PURE__*/ jsx("div", {
|
|
5354
|
-
className:
|
|
5482
|
+
className: styles.issues_list,
|
|
5355
5483
|
style: {
|
|
5356
5484
|
bottom: "".concat(buttomHei + 6, "px")
|
|
5357
5485
|
},
|
|
5358
5486
|
children: questionsList.map(function(item) {
|
|
5359
5487
|
var span = item.question.replaceAll(keyWord, function() {
|
|
5360
|
-
return "<span class=".concat(
|
|
5488
|
+
return "<span class=".concat(styles.sign, ">").concat(keyWord, "</span>");
|
|
5361
5489
|
});
|
|
5362
5490
|
return /*#__PURE__*/ jsx("p", {
|
|
5363
|
-
className:
|
|
5491
|
+
className: styles.item,
|
|
5364
5492
|
children: /*#__PURE__*/ jsx("span", {
|
|
5365
5493
|
onClick: function() {
|
|
5366
5494
|
sendMessage(item, 2);
|
|
@@ -5381,10 +5509,6 @@ var CustomerService = function(props) {
|
|
|
5381
5509
|
if (page != 1) {
|
|
5382
5510
|
setPageNumHistory(page);
|
|
5383
5511
|
}
|
|
5384
|
-
createRooms(receiver);
|
|
5385
|
-
if (childRef.current) {
|
|
5386
|
-
childRef.current.roomsListTimer();
|
|
5387
|
-
}
|
|
5388
5512
|
setPageNum(page);
|
|
5389
5513
|
setLastId(id); //用于定位
|
|
5390
5514
|
//如果是当前聊天室
|
|
@@ -5392,22 +5516,30 @@ var CustomerService = function(props) {
|
|
|
5392
5516
|
getHistoryMessage(page, 1);
|
|
5393
5517
|
} else {
|
|
5394
5518
|
setRoomId(renewRoomId);
|
|
5519
|
+
if (childRef.current) {
|
|
5520
|
+
if (receiver != mid) {
|
|
5521
|
+
createRooms(receiver);
|
|
5522
|
+
}
|
|
5523
|
+
setTimeout(function() {
|
|
5524
|
+
childRef.current.roomsListTimer();
|
|
5525
|
+
}, 500);
|
|
5526
|
+
}
|
|
5395
5527
|
}
|
|
5396
5528
|
};
|
|
5397
5529
|
return /*#__PURE__*/ jsxs(Fragment, {
|
|
5398
5530
|
children: [
|
|
5399
5531
|
/*#__PURE__*/ jsxs(Drawer, {
|
|
5400
|
-
title: "
|
|
5532
|
+
title: "智能问答",
|
|
5401
5533
|
width: 560,
|
|
5402
5534
|
onClose: function() {
|
|
5403
5535
|
onCancel();
|
|
5404
5536
|
onEvent(serverName + serverUrl(), "click_智能问答_收起侧边栏", "提交");
|
|
5405
5537
|
},
|
|
5406
5538
|
open: showType == 1 ? true : false,
|
|
5407
|
-
className:
|
|
5539
|
+
className: styles.ChatWindow_Drawer,
|
|
5408
5540
|
mask: false,
|
|
5409
5541
|
// maskClosable={false}
|
|
5410
|
-
rootClassName:
|
|
5542
|
+
rootClassName: styles.service_ChatWindow_Drawer,
|
|
5411
5543
|
children: [
|
|
5412
5544
|
showType == 1 && /*#__PURE__*/ jsx("div", {
|
|
5413
5545
|
style: {
|
|
@@ -5429,18 +5561,18 @@ var CustomerService = function(props) {
|
|
|
5429
5561
|
})
|
|
5430
5562
|
}),
|
|
5431
5563
|
/*#__PURE__*/ jsx("div", {
|
|
5432
|
-
className:
|
|
5564
|
+
className: styles.header_wrap,
|
|
5433
5565
|
children: renderHeader()
|
|
5434
5566
|
}),
|
|
5435
5567
|
/*#__PURE__*/ jsxs("div", {
|
|
5436
|
-
className: "".concat(
|
|
5568
|
+
className: "".concat(styles.Drawer_main),
|
|
5437
5569
|
id: "chat_content",
|
|
5438
5570
|
style: {
|
|
5439
5571
|
maxHeight: "calc(100vh-".concat(buttomHei + 48, "px)")
|
|
5440
5572
|
},
|
|
5441
5573
|
children: [
|
|
5442
5574
|
loading ? /*#__PURE__*/ jsx("div", {
|
|
5443
|
-
className:
|
|
5575
|
+
className: styles.loading,
|
|
5444
5576
|
children: /*#__PURE__*/ jsx("img", {
|
|
5445
5577
|
src: "/new_yun/images/loading_d.gif",
|
|
5446
5578
|
alt: ""
|
|
@@ -5448,7 +5580,7 @@ var CustomerService = function(props) {
|
|
|
5448
5580
|
}) : "",
|
|
5449
5581
|
renderQuestion(),
|
|
5450
5582
|
bottomLoading ? /*#__PURE__*/ jsx("div", {
|
|
5451
|
-
className:
|
|
5583
|
+
className: styles.loading,
|
|
5452
5584
|
children: /*#__PURE__*/ jsx("img", {
|
|
5453
5585
|
src: "/new_yun/images/loading_d.gif",
|
|
5454
5586
|
alt: ""
|
|
@@ -5457,11 +5589,11 @@ var CustomerService = function(props) {
|
|
|
5457
5589
|
]
|
|
5458
5590
|
}),
|
|
5459
5591
|
/*#__PURE__*/ jsxs("div", {
|
|
5460
|
-
className:
|
|
5592
|
+
className: styles.Drawer_buttom_Issues_List,
|
|
5461
5593
|
children: [
|
|
5462
5594
|
renderAssociationProblem(),
|
|
5463
5595
|
/*#__PURE__*/ jsx("div", {
|
|
5464
|
-
className:
|
|
5596
|
+
className: styles.Drawer_buttom,
|
|
5465
5597
|
id: "Drawer_buttom",
|
|
5466
5598
|
children: renderBottomAnt()
|
|
5467
5599
|
})
|
|
@@ -5476,13 +5608,12 @@ var CustomerService = function(props) {
|
|
|
5476
5608
|
onClose: function() {
|
|
5477
5609
|
setShowHistory(false);
|
|
5478
5610
|
},
|
|
5479
|
-
loadSpecifiedData: loadSpecifiedData
|
|
5480
|
-
roomList: roomList
|
|
5611
|
+
loadSpecifiedData: loadSpecifiedData
|
|
5481
5612
|
})
|
|
5482
5613
|
]
|
|
5483
5614
|
}),
|
|
5484
5615
|
/*#__PURE__*/ jsxs(Modal, {
|
|
5485
|
-
title: "
|
|
5616
|
+
title: "智能问答",
|
|
5486
5617
|
open: showType == 2 ? true : false,
|
|
5487
5618
|
onCancel: function() {
|
|
5488
5619
|
onCancel();
|
|
@@ -5490,21 +5621,22 @@ var CustomerService = function(props) {
|
|
|
5490
5621
|
},
|
|
5491
5622
|
centered: true,
|
|
5492
5623
|
width: window.innerWidth - 252 > 1214 ? window.innerWidth - 252 : 1214,
|
|
5624
|
+
// @ts-ignore
|
|
5493
5625
|
height: window.innerHeight - 160,
|
|
5494
|
-
wrapClassName:
|
|
5626
|
+
wrapClassName: styles.ChatWindow_Modal,
|
|
5495
5627
|
footer: false,
|
|
5496
5628
|
maskClosable: false,
|
|
5497
5629
|
closeIcon: null,
|
|
5498
5630
|
children: [
|
|
5499
5631
|
/*#__PURE__*/ jsx("div", {
|
|
5500
|
-
className:
|
|
5632
|
+
className: styles.header_wrap,
|
|
5501
5633
|
children: renderHeader()
|
|
5502
5634
|
}),
|
|
5503
5635
|
/*#__PURE__*/ jsxs("div", {
|
|
5504
|
-
className: "".concat(
|
|
5636
|
+
className: "".concat(styles.Drawer_wrap_main),
|
|
5505
5637
|
children: [
|
|
5506
5638
|
/*#__PURE__*/ jsxs("div", {
|
|
5507
|
-
className: "".concat(
|
|
5639
|
+
className: "".concat(styles.Drawer_main, " ChatWindow_Modal_history_list"),
|
|
5508
5640
|
id: "chat_content_modal",
|
|
5509
5641
|
style: {
|
|
5510
5642
|
maxHeight: "".concat(window.innerHeight - 148 - buttomHei, "px")
|
|
@@ -5524,10 +5656,10 @@ var CustomerService = function(props) {
|
|
|
5524
5656
|
ref: childRef
|
|
5525
5657
|
}),
|
|
5526
5658
|
/*#__PURE__*/ jsxs("div", {
|
|
5527
|
-
className:
|
|
5659
|
+
className: styles.chat_content,
|
|
5528
5660
|
children: [
|
|
5529
5661
|
loading ? /*#__PURE__*/ jsx("div", {
|
|
5530
|
-
className:
|
|
5662
|
+
className: styles.loading,
|
|
5531
5663
|
children: /*#__PURE__*/ jsx("img", {
|
|
5532
5664
|
src: "/new_yun/images/loading_d.gif",
|
|
5533
5665
|
alt: ""
|
|
@@ -5539,11 +5671,11 @@ var CustomerService = function(props) {
|
|
|
5539
5671
|
]
|
|
5540
5672
|
}),
|
|
5541
5673
|
/*#__PURE__*/ jsxs("div", {
|
|
5542
|
-
className:
|
|
5674
|
+
className: styles.Drawer_buttom_Issues_List,
|
|
5543
5675
|
children: [
|
|
5544
5676
|
renderAssociationProblem(),
|
|
5545
5677
|
/*#__PURE__*/ jsx("div", {
|
|
5546
|
-
className:
|
|
5678
|
+
className: styles.Drawer_buttom,
|
|
5547
5679
|
id: "Drawer_buttom_modal",
|
|
5548
5680
|
children: renderBottomAnt()
|
|
5549
5681
|
})
|
|
@@ -5558,24 +5690,23 @@ var CustomerService = function(props) {
|
|
|
5558
5690
|
onClose: function() {
|
|
5559
5691
|
setShowHistory(false);
|
|
5560
5692
|
},
|
|
5561
|
-
loadSpecifiedData: loadSpecifiedData
|
|
5562
|
-
roomList: roomList
|
|
5693
|
+
loadSpecifiedData: loadSpecifiedData
|
|
5563
5694
|
})
|
|
5564
5695
|
]
|
|
5565
5696
|
})
|
|
5566
5697
|
]
|
|
5567
5698
|
}),
|
|
5568
5699
|
showType == 3 ? /*#__PURE__*/ jsxs("div", {
|
|
5569
|
-
className: "".concat(
|
|
5700
|
+
className: "".concat(styles.ChatWindow_Drawer),
|
|
5570
5701
|
id: "",
|
|
5571
5702
|
children: [
|
|
5572
5703
|
/*#__PURE__*/ jsx("div", {
|
|
5573
|
-
className: "".concat(
|
|
5704
|
+
className: "".concat(styles.header_wrap, " ").concat(styles.header_wrap_newlabo),
|
|
5574
5705
|
children: /*#__PURE__*/ jsxs("div", {
|
|
5575
|
-
className:
|
|
5706
|
+
className: styles.top,
|
|
5576
5707
|
children: [
|
|
5577
5708
|
/*#__PURE__*/ jsx("div", {
|
|
5578
|
-
className:
|
|
5709
|
+
className: styles.user,
|
|
5579
5710
|
children: /*#__PURE__*/ jsx("p", {
|
|
5580
5711
|
children: roomList.filter(function(e) {
|
|
5581
5712
|
return e.roomId == roomId;
|
|
@@ -5583,20 +5714,21 @@ var CustomerService = function(props) {
|
|
|
5583
5714
|
return e.roomId == roomId;
|
|
5584
5715
|
})[0].name != undefined ? roomList.filter(function(e) {
|
|
5585
5716
|
return e.roomId == roomId;
|
|
5586
|
-
})[0].name : "
|
|
5717
|
+
})[0].name : "智能问答"
|
|
5587
5718
|
})
|
|
5588
5719
|
}),
|
|
5589
5720
|
/*#__PURE__*/ jsxs("div", {
|
|
5590
|
-
className:
|
|
5721
|
+
className: styles.operate,
|
|
5591
5722
|
children: [
|
|
5592
5723
|
/*#__PURE__*/ jsx("i", {
|
|
5593
5724
|
onClick: function() {
|
|
5594
5725
|
setShowHistory(true);
|
|
5726
|
+
onEvent(serverName + serverUrl(), "click_智能问答_历史记录", "提交");
|
|
5595
5727
|
},
|
|
5596
5728
|
children: /*#__PURE__*/ jsx(CustomRecord$1, {})
|
|
5597
5729
|
}),
|
|
5598
5730
|
/*#__PURE__*/ jsx("span", {
|
|
5599
|
-
className:
|
|
5731
|
+
className: styles.line
|
|
5600
5732
|
}),
|
|
5601
5733
|
/*#__PURE__*/ jsx("i", {
|
|
5602
5734
|
onClick: function() {
|
|
@@ -5610,7 +5742,7 @@ var CustomerService = function(props) {
|
|
|
5610
5742
|
/*#__PURE__*/ jsx("i", {
|
|
5611
5743
|
className: "lianxiren21",
|
|
5612
5744
|
onClick: function() {
|
|
5613
|
-
setShowContacts(
|
|
5745
|
+
setShowContacts(!showContacts);
|
|
5614
5746
|
},
|
|
5615
5747
|
children: /*#__PURE__*/ jsx(CustomContacts$1, {})
|
|
5616
5748
|
})
|
|
@@ -5620,14 +5752,14 @@ var CustomerService = function(props) {
|
|
|
5620
5752
|
})
|
|
5621
5753
|
}),
|
|
5622
5754
|
/*#__PURE__*/ jsxs("div", {
|
|
5623
|
-
className: "".concat(
|
|
5755
|
+
className: "".concat(styles.Drawer_main, " ").concat(styles.Drawer_main_newlabo),
|
|
5624
5756
|
id: "chat_content",
|
|
5625
5757
|
style: {
|
|
5626
5758
|
maxHeight: "".concat(window.innerHeight - 110 - buttomHei, "px)")
|
|
5627
5759
|
},
|
|
5628
5760
|
children: [
|
|
5629
5761
|
loading ? /*#__PURE__*/ jsx("div", {
|
|
5630
|
-
className:
|
|
5762
|
+
className: styles.loading,
|
|
5631
5763
|
children: /*#__PURE__*/ jsx("img", {
|
|
5632
5764
|
src: "/new_yun/images/loading_d.gif",
|
|
5633
5765
|
alt: ""
|
|
@@ -5637,11 +5769,11 @@ var CustomerService = function(props) {
|
|
|
5637
5769
|
]
|
|
5638
5770
|
}),
|
|
5639
5771
|
/*#__PURE__*/ jsxs("div", {
|
|
5640
|
-
className: "".concat(
|
|
5772
|
+
className: "".concat(styles.Drawer_buttom_Issues_List, " ").concat(styles.Drawer_buttom_Issues_List_newlabo),
|
|
5641
5773
|
children: [
|
|
5642
5774
|
renderAssociationProblem(),
|
|
5643
5775
|
/*#__PURE__*/ jsx("div", {
|
|
5644
|
-
className:
|
|
5776
|
+
className: styles.Drawer_buttom,
|
|
5645
5777
|
id: "Drawer_buttom",
|
|
5646
5778
|
children: renderBottomAnt()
|
|
5647
5779
|
})
|
|
@@ -5656,8 +5788,7 @@ var CustomerService = function(props) {
|
|
|
5656
5788
|
onClose: function() {
|
|
5657
5789
|
setShowHistory(false);
|
|
5658
5790
|
},
|
|
5659
|
-
loadSpecifiedData: loadSpecifiedData
|
|
5660
|
-
roomList: roomList
|
|
5791
|
+
loadSpecifiedData: loadSpecifiedData
|
|
5661
5792
|
}),
|
|
5662
5793
|
showType == 3 && /*#__PURE__*/ jsx("div", {
|
|
5663
5794
|
style: {
|
|
@@ -5682,7 +5813,7 @@ var CustomerService = function(props) {
|
|
|
5682
5813
|
showType == 4 && /*#__PURE__*/ jsxs(Fragment, {
|
|
5683
5814
|
children: [
|
|
5684
5815
|
/*#__PURE__*/ jsxs(Modal, {
|
|
5685
|
-
title: "
|
|
5816
|
+
title: "智能问答",
|
|
5686
5817
|
open: true,
|
|
5687
5818
|
onCancel: function() {
|
|
5688
5819
|
onCancel();
|
|
@@ -5690,21 +5821,22 @@ var CustomerService = function(props) {
|
|
|
5690
5821
|
},
|
|
5691
5822
|
centered: true,
|
|
5692
5823
|
width: window.innerWidth - 252 > 1214 ? window.innerWidth - 252 : 1214,
|
|
5824
|
+
// @ts-ignore
|
|
5693
5825
|
height: window.innerHeight - 160,
|
|
5694
|
-
wrapClassName: "".concat(
|
|
5826
|
+
wrapClassName: "".concat(styles.ChatWindow_Modal),
|
|
5695
5827
|
footer: false,
|
|
5696
5828
|
maskClosable: false,
|
|
5697
5829
|
closeIcon: null,
|
|
5698
5830
|
children: [
|
|
5699
5831
|
/*#__PURE__*/ jsx("div", {
|
|
5700
|
-
className:
|
|
5832
|
+
className: styles.header_wrap,
|
|
5701
5833
|
children: renderHeader()
|
|
5702
5834
|
}),
|
|
5703
5835
|
/*#__PURE__*/ jsxs("div", {
|
|
5704
|
-
className: "".concat(
|
|
5836
|
+
className: "".concat(styles.Drawer_wrap_main),
|
|
5705
5837
|
children: [
|
|
5706
5838
|
/*#__PURE__*/ jsxs("div", {
|
|
5707
|
-
className: "".concat(
|
|
5839
|
+
className: "".concat(styles.Drawer_main, " ").concat(styles.Drawer_main_newlabo),
|
|
5708
5840
|
id: "chat_content_modal",
|
|
5709
5841
|
style: {
|
|
5710
5842
|
maxHeight: "".concat(window.innerHeight - 148 - buttomHei, "px")
|
|
@@ -5724,10 +5856,10 @@ var CustomerService = function(props) {
|
|
|
5724
5856
|
ref: childRef
|
|
5725
5857
|
}),
|
|
5726
5858
|
/*#__PURE__*/ jsxs("div", {
|
|
5727
|
-
className:
|
|
5859
|
+
className: styles.chat_content,
|
|
5728
5860
|
children: [
|
|
5729
5861
|
loading ? /*#__PURE__*/ jsx("div", {
|
|
5730
|
-
className:
|
|
5862
|
+
className: styles.loading,
|
|
5731
5863
|
children: /*#__PURE__*/ jsx("img", {
|
|
5732
5864
|
src: "/new_yun/images/loading_d.gif",
|
|
5733
5865
|
alt: ""
|
|
@@ -5739,11 +5871,11 @@ var CustomerService = function(props) {
|
|
|
5739
5871
|
]
|
|
5740
5872
|
}),
|
|
5741
5873
|
/*#__PURE__*/ jsxs("div", {
|
|
5742
|
-
className:
|
|
5874
|
+
className: styles.Drawer_buttom_Issues_List,
|
|
5743
5875
|
children: [
|
|
5744
5876
|
renderAssociationProblem(),
|
|
5745
5877
|
/*#__PURE__*/ jsx("div", {
|
|
5746
|
-
className:
|
|
5878
|
+
className: styles.Drawer_buttom,
|
|
5747
5879
|
id: "Drawer_buttom_modal",
|
|
5748
5880
|
children: renderBottomAnt()
|
|
5749
5881
|
})
|
|
@@ -5758,24 +5890,23 @@ var CustomerService = function(props) {
|
|
|
5758
5890
|
onClose: function() {
|
|
5759
5891
|
setShowHistory(false);
|
|
5760
5892
|
},
|
|
5761
|
-
loadSpecifiedData: loadSpecifiedData
|
|
5762
|
-
roomList: roomList
|
|
5893
|
+
loadSpecifiedData: loadSpecifiedData
|
|
5763
5894
|
})
|
|
5764
5895
|
]
|
|
5765
5896
|
})
|
|
5766
5897
|
]
|
|
5767
5898
|
}),
|
|
5768
5899
|
/*#__PURE__*/ jsxs("div", {
|
|
5769
|
-
className: "".concat(
|
|
5900
|
+
className: "".concat(styles.ChatWindow_Drawer),
|
|
5770
5901
|
id: "",
|
|
5771
5902
|
children: [
|
|
5772
5903
|
/*#__PURE__*/ jsx("div", {
|
|
5773
|
-
className: "".concat(
|
|
5904
|
+
className: "".concat(styles.header_wrap, " ").concat(styles.header_wrap_newlabo),
|
|
5774
5905
|
children: /*#__PURE__*/ jsxs("div", {
|
|
5775
|
-
className:
|
|
5906
|
+
className: styles.top,
|
|
5776
5907
|
children: [
|
|
5777
5908
|
/*#__PURE__*/ jsx("div", {
|
|
5778
|
-
className:
|
|
5909
|
+
className: styles.user,
|
|
5779
5910
|
children: /*#__PURE__*/ jsx("p", {
|
|
5780
5911
|
children: roomList.filter(function(e) {
|
|
5781
5912
|
return e.roomId == roomId;
|
|
@@ -5783,11 +5914,11 @@ var CustomerService = function(props) {
|
|
|
5783
5914
|
return e.roomId == roomId;
|
|
5784
5915
|
})[0].name ? roomList.filter(function(e) {
|
|
5785
5916
|
return e.roomId == roomId;
|
|
5786
|
-
})[0].name : "
|
|
5917
|
+
})[0].name : "智能问答"
|
|
5787
5918
|
})
|
|
5788
5919
|
}),
|
|
5789
5920
|
/*#__PURE__*/ jsxs("div", {
|
|
5790
|
-
className:
|
|
5921
|
+
className: styles.operate,
|
|
5791
5922
|
children: [
|
|
5792
5923
|
/*#__PURE__*/ jsx("i", {
|
|
5793
5924
|
onClick: function() {
|
|
@@ -5796,7 +5927,7 @@ var CustomerService = function(props) {
|
|
|
5796
5927
|
children: /*#__PURE__*/ jsx(CustomRecord$1, {})
|
|
5797
5928
|
}),
|
|
5798
5929
|
/*#__PURE__*/ jsx("span", {
|
|
5799
|
-
className:
|
|
5930
|
+
className: styles.line
|
|
5800
5931
|
}),
|
|
5801
5932
|
/*#__PURE__*/ jsx("i", {
|
|
5802
5933
|
onClick: function() {
|
|
@@ -5819,14 +5950,14 @@ var CustomerService = function(props) {
|
|
|
5819
5950
|
})
|
|
5820
5951
|
}),
|
|
5821
5952
|
/*#__PURE__*/ jsxs("div", {
|
|
5822
|
-
className: "".concat(
|
|
5953
|
+
className: "".concat(styles.Drawer_main, " ").concat(styles.Drawer_main_newlabo, " ").concat(styles.Drawer_main_newlabo_no_pic),
|
|
5823
5954
|
id: "",
|
|
5824
5955
|
style: {
|
|
5825
5956
|
maxHeight: "".concat(window.innerHeight - 100 - buttomHei, "px)")
|
|
5826
5957
|
},
|
|
5827
5958
|
children: [
|
|
5828
5959
|
loading ? /*#__PURE__*/ jsx("div", {
|
|
5829
|
-
className:
|
|
5960
|
+
className: styles.loading,
|
|
5830
5961
|
children: /*#__PURE__*/ jsx("img", {
|
|
5831
5962
|
src: "/new_yun/images/loading_d.gif",
|
|
5832
5963
|
alt: ""
|
|
@@ -5836,11 +5967,11 @@ var CustomerService = function(props) {
|
|
|
5836
5967
|
]
|
|
5837
5968
|
}),
|
|
5838
5969
|
/*#__PURE__*/ jsxs("div", {
|
|
5839
|
-
className: "".concat(
|
|
5970
|
+
className: "".concat(styles.Drawer_buttom_Issues_List, " ").concat(styles.Drawer_buttom_Issues_List_newlabo),
|
|
5840
5971
|
children: [
|
|
5841
5972
|
renderAssociationProblem(),
|
|
5842
5973
|
/*#__PURE__*/ jsx("div", {
|
|
5843
|
-
className:
|
|
5974
|
+
className: styles.Drawer_buttom,
|
|
5844
5975
|
id: "Drawer_buttom",
|
|
5845
5976
|
children: renderBottomAnt()
|
|
5846
5977
|
})
|