|
|
|
|
@ -6847,7 +6847,7 @@ var SelectShixunModal = function SelectShixunModal(_ref) {
|
|
|
|
|
var _useContext = (0,_react_17_0_2_react.useContext)(DataContext),
|
|
|
|
|
data = _useContext.data;
|
|
|
|
|
var courseOptions = useCourseOptions();
|
|
|
|
|
var _useCustomRequest = (0,useCustomRequest/* useCustomRequest */.U)(classrooms/* getShixunLists */.Pj, {
|
|
|
|
|
var _useCustomRequest = (0,useCustomRequest/* useCustomRequest */.U)(classrooms/* getShixunListsItem */.Gm, {
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 10,
|
|
|
|
|
keyword: '',
|
|
|
|
|
@ -6855,7 +6855,8 @@ var SelectShixunModal = function SelectShixunModal(_ref) {
|
|
|
|
|
discipline_id: '',
|
|
|
|
|
sub_discipline_id: '',
|
|
|
|
|
type: 0,
|
|
|
|
|
status: 'published'
|
|
|
|
|
include_shixuns: true,
|
|
|
|
|
item_type: 'SHIXUN'
|
|
|
|
|
}),
|
|
|
|
|
_useCustomRequest2 = slicedToArray_default()(_useCustomRequest, 4),
|
|
|
|
|
queryParams = _useCustomRequest2[0],
|
|
|
|
|
@ -6871,8 +6872,7 @@ var SelectShixunModal = function SelectShixunModal(_ref) {
|
|
|
|
|
getShixunData({
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 10,
|
|
|
|
|
type: 0,
|
|
|
|
|
status: 'published'
|
|
|
|
|
type: 0
|
|
|
|
|
}, true).then(function (res) {
|
|
|
|
|
if ((res === null || res === void 0 ? void 0 : res.shixuns_count) === 0) {
|
|
|
|
|
setEmptyTipsVisible(true);
|
|
|
|
|
@ -6980,7 +6980,7 @@ var SelectShixunModal = function SelectShixunModal(_ref) {
|
|
|
|
|
rowKey: "id",
|
|
|
|
|
columns: [{
|
|
|
|
|
title: '试题名称',
|
|
|
|
|
dataIndex: 'title',
|
|
|
|
|
dataIndex: 'name',
|
|
|
|
|
width: '30%',
|
|
|
|
|
// ellipsis: true,
|
|
|
|
|
ellipsis: {
|
|
|
|
|
@ -6990,30 +6990,23 @@ var SelectShixunModal = function SelectShixunModal(_ref) {
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
|
|
|
showLines: 1,
|
|
|
|
|
showTextOnly: true,
|
|
|
|
|
value: text
|
|
|
|
|
value: text || '--'
|
|
|
|
|
}, 1);
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
title: '创建者',
|
|
|
|
|
dataIndex: 'author_name',
|
|
|
|
|
render: function render(authorName) {
|
|
|
|
|
return Array.isArray(authorName) ? /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
|
|
|
showLines: 1,
|
|
|
|
|
showTextOnly: true,
|
|
|
|
|
value: authorName === null || authorName === void 0 ? void 0 : authorName[0]
|
|
|
|
|
}, 1) : authorName.split('、')[0];
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
title: '所属学校',
|
|
|
|
|
dataIndex: 'author_school_name',
|
|
|
|
|
render: function render(value) {
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
|
|
|
showLines: 1,
|
|
|
|
|
showTextOnly: true,
|
|
|
|
|
value: value
|
|
|
|
|
}, 1);
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
},
|
|
|
|
|
// {
|
|
|
|
|
// title: '创建者',
|
|
|
|
|
// dataIndex: 'author_name',
|
|
|
|
|
// render: (authorName: string) => Array.isArray(authorName) ? <RenderHtml key={1} showLines={1} showTextOnly value={authorName?.[0]} /> : authorName.split('、')[0]
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// title: '所属学校',
|
|
|
|
|
// dataIndex: 'author_school_name',
|
|
|
|
|
// render(value) {
|
|
|
|
|
// return <RenderHtml key={1} showLines={1} showTextOnly value={value} />
|
|
|
|
|
// },
|
|
|
|
|
// },
|
|
|
|
|
{
|
|
|
|
|
title: '难度',
|
|
|
|
|
dataIndex: 'level'
|
|
|
|
|
}, {
|
|
|
|
|
@ -7053,79 +7046,93 @@ var SelectShixunModal = function SelectShixunModal(_ref) {
|
|
|
|
|
identifier = _ref2.identifier,
|
|
|
|
|
author_school_name = _ref2.author_school_name,
|
|
|
|
|
study_count = _ref2.study_count;
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
style: {
|
|
|
|
|
color: '#165DFF',
|
|
|
|
|
cursor: 'pointer'
|
|
|
|
|
},
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
modal/* default */.Z.confirm({
|
|
|
|
|
title: '题目详情',
|
|
|
|
|
closable: true,
|
|
|
|
|
width: 1000,
|
|
|
|
|
centered: true,
|
|
|
|
|
icon: null,
|
|
|
|
|
footer: null,
|
|
|
|
|
content: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
|
|
|
value: title,
|
|
|
|
|
style: {
|
|
|
|
|
marginBottom: 18
|
|
|
|
|
}
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
className: QuestionInfomodules.challengeNameWrapper,
|
|
|
|
|
children: challenge_names.map(function (name, index) {
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
className: QuestionInfomodules.challengeName,
|
|
|
|
|
children: ["\u7B2C", (0,utils_util/* toChineseNumber */.EM)(index + 1), "\u9898\xA0", name]
|
|
|
|
|
}, index);
|
|
|
|
|
})
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
|
|
className: QuestionInfomodules.shixunPreviewFooter,
|
|
|
|
|
justify: "space-between",
|
|
|
|
|
style: {
|
|
|
|
|
alignItems: 'center'
|
|
|
|
|
},
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
|
|
className: QuestionInfomodules.shixunInfoWrapper,
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
children: "\u521B\u5EFA\u8005"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: QuestionInfomodules.shixunInfo,
|
|
|
|
|
children: author_name.split('、')[0]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
children: "\u6240\u5C5E\u5355\u4F4D"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: QuestionInfomodules.shixunInfo,
|
|
|
|
|
children: author_school_name
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
children: "\u5B66\u4E60\u4EBA\u6570"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: QuestionInfomodules.shixunInfo,
|
|
|
|
|
children: study_count
|
|
|
|
|
})]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.ZP, {
|
|
|
|
|
type: "primary",
|
|
|
|
|
className: QuestionInfomodules.btnToDetail,
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
return (0,utils_util/* openNewWindow */.xg)("/shixuns/".concat(identifier, "/challenges?exercise=true"));
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
style: {
|
|
|
|
|
color: '#165DFF',
|
|
|
|
|
cursor: 'pointer'
|
|
|
|
|
},
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
modal/* default */.Z.confirm({
|
|
|
|
|
title: '题目详情',
|
|
|
|
|
closable: true,
|
|
|
|
|
width: 1000,
|
|
|
|
|
centered: true,
|
|
|
|
|
icon: null,
|
|
|
|
|
footer: null,
|
|
|
|
|
content: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
|
|
|
value: title,
|
|
|
|
|
style: {
|
|
|
|
|
marginBottom: 18
|
|
|
|
|
}
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
className: QuestionInfomodules.challengeNameWrapper,
|
|
|
|
|
children: challenge_names.map(function (name, index) {
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
className: QuestionInfomodules.challengeName,
|
|
|
|
|
children: ["\u7B2C", (0,utils_util/* toChineseNumber */.EM)(index + 1), "\u9898\xA0", name]
|
|
|
|
|
}, index);
|
|
|
|
|
})
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
|
|
className: QuestionInfomodules.shixunPreviewFooter,
|
|
|
|
|
justify: "space-between",
|
|
|
|
|
style: {
|
|
|
|
|
alignItems: 'center'
|
|
|
|
|
},
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
|
|
className: "iconfont icon-shixunkecheng"
|
|
|
|
|
}), "\u5B9E\u8BAD\u8BE6\u60C5"]
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
|
|
className: QuestionInfomodules.shixunInfoWrapper,
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
children: "\u521B\u5EFA\u8005"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: QuestionInfomodules.shixunInfo,
|
|
|
|
|
children: author_name.split('、')[0]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
children: "\u6240\u5C5E\u5355\u4F4D"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: QuestionInfomodules.shixunInfo,
|
|
|
|
|
children: author_school_name
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
children: "\u5B66\u4E60\u4EBA\u6570"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: QuestionInfomodules.shixunInfo,
|
|
|
|
|
children: study_count
|
|
|
|
|
})]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.ZP, {
|
|
|
|
|
type: "primary",
|
|
|
|
|
className: QuestionInfomodules.btnToDetail,
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
return (0,utils_util/* openNewWindow */.xg)("/shixuns/".concat(identifier, "/challenges?exercise=true"));
|
|
|
|
|
},
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
|
|
className: "iconfont icon-shixunkecheng"
|
|
|
|
|
}), "\u5B9E\u8BAD\u8BE6\u60C5"]
|
|
|
|
|
})]
|
|
|
|
|
})]
|
|
|
|
|
})]
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
children: "\u67E5\u770B"
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
children: "\u67E5\u770B"
|
|
|
|
|
}), (record === null || record === void 0 ? void 0 : record.shixun_tag_num) === 1 && /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
|
|
|
target: "_blank",
|
|
|
|
|
href: "/shixuns/".concat(record === null || record === void 0 ? void 0 : record.identifier, "/challenges"),
|
|
|
|
|
style: {
|
|
|
|
|
marginLeft: 10
|
|
|
|
|
},
|
|
|
|
|
children: "\u53BB\u53D1\u5E03"
|
|
|
|
|
})]
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}],
|
|
|
|
|
dataSource: shixunData === null || shixunData === void 0 ? void 0 : shixunData.shixun_list,
|
|
|
|
|
dataSource: shixunData === null || shixunData === void 0 ? void 0 : shixunData.items,
|
|
|
|
|
rowSelection: {
|
|
|
|
|
selectedRowKeys: selectedRowKeys,
|
|
|
|
|
preserveSelectedRowKeys: true,
|
|
|
|
|
getCheckboxProps: function getCheckboxProps(record) {
|
|
|
|
|
return {
|
|
|
|
|
disabled: record.shixun_tag_num === 1
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
onChange: function onChange(newSelectedRowKeys, newSelectedRows) {
|
|
|
|
|
console.log(newSelectedRowKeys);
|
|
|
|
|
setSelectedRowKeys(newSelectedRowKeys);
|
|
|
|
|
@ -7178,7 +7185,7 @@ var SelectShixunModal = function SelectShixunModal(_ref) {
|
|
|
|
|
pagination: {
|
|
|
|
|
current: queryParams.page,
|
|
|
|
|
pageSize: queryParams.limit,
|
|
|
|
|
total: shixunData === null || shixunData === void 0 ? void 0 : shixunData.shixuns_count,
|
|
|
|
|
total: shixunData === null || shixunData === void 0 ? void 0 : shixunData.items_count,
|
|
|
|
|
showTotal: function showTotal(total) {
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
|
|
children: ["\u5171\xA0", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|