You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
264 lines
9.8 KiB
264 lines
9.8 KiB
"use strict";
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[57113],{
|
|
|
|
/***/ 98545:
|
|
/*!************************************************************************!*\
|
|
!*** ./src/pages/Paperlibrary/Random/SendRecord/index.tsx + 1 modules ***!
|
|
\************************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
// ESM COMPAT FLAG
|
|
__webpack_require__.r(__webpack_exports__);
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
"default": function() { return /* binding */ Random_SendRecord; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/regeneratorRuntime.js
|
|
var regeneratorRuntime = __webpack_require__(7557);
|
|
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectSpread2.js
|
|
var objectSpread2 = __webpack_require__(82242);
|
|
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/asyncToGenerator.js
|
|
var asyncToGenerator = __webpack_require__(41498);
|
|
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js
|
|
var slicedToArray = __webpack_require__(79800);
|
|
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.7@@ant-design/icons/es/icons/LeftOutlined.js + 1 modules
|
|
var LeftOutlined = __webpack_require__(11407);
|
|
;// CONCATENATED MODULE: ./src/pages/Paperlibrary/Random/SendRecord/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var SendRecordmodules = ({"flex_box_center":"flex_box_center___hyLE7","flex_space_between":"flex_space_between___zl9U1","flex_box_vertical_center":"flex_box_vertical_center___IJmQ7","flex_box_center_end":"flex_box_center_end___KY7ei","flex_box_column":"flex_box_column___bFZ13","head":"head___eQBPb","contentWrap":"contentWrap___KtSsy","footer":"footer___YRwjD"});
|
|
// EXTERNAL MODULE: ./node_modules/_dayjs@1.11.11@dayjs/dayjs.min.js
|
|
var dayjs_min = __webpack_require__(99232);
|
|
var dayjs_min_default = /*#__PURE__*/__webpack_require__.n(dayjs_min);
|
|
// EXTERNAL MODULE: ./src/.umi-production/exports.ts
|
|
var _umi_production_exports = __webpack_require__(28679);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/spin/index.js + 1 modules
|
|
var spin = __webpack_require__(71418);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/table/index.js + 85 modules
|
|
var table = __webpack_require__(14491);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/pagination/index.js + 10 modules
|
|
var pagination = __webpack_require__(53864);
|
|
// EXTERNAL MODULE: ./src/utils/fetch.ts
|
|
var fetch = __webpack_require__(82420);
|
|
// EXTERNAL MODULE: ./src/components/NoData/index.tsx
|
|
var NoData = __webpack_require__(21740);
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
;// CONCATENATED MODULE: ./src/pages/Paperlibrary/Random/SendRecord/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dayjs_min_default().locale('zh-cn');
|
|
var SendRecord = function SendRecord(_ref) {
|
|
var globalSetting = _ref.globalSetting,
|
|
dispatch = _ref.dispatch;
|
|
var _useState = (0,_react_17_0_2_react.useState)({
|
|
page: 1,
|
|
limit: 10
|
|
}),
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
params = _useState2[0],
|
|
setParams = _useState2[1];
|
|
var _useState3 = (0,_react_17_0_2_react.useState)([]),
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
tableData = _useState4[0],
|
|
setTableData = _useState4[1];
|
|
var _useState5 = (0,_react_17_0_2_react.useState)(true),
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
loading = _useState6[0],
|
|
setLoading = _useState6[1];
|
|
var _useState7 = (0,_react_17_0_2_react.useState)(0),
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
total = _useState8[0],
|
|
setTotal = _useState8[1];
|
|
function getData(_x) {
|
|
return _getData.apply(this, arguments);
|
|
}
|
|
function _getData() {
|
|
_getData = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(record) {
|
|
var res;
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
while (1) switch (_context.prev = _context.next) {
|
|
case 0:
|
|
setLoading(true);
|
|
_context.next = 3;
|
|
return (0,fetch/* default */.ZP)("/api/job_items.json", {
|
|
method: 'get',
|
|
params: {
|
|
type: "ExaminationBank",
|
|
per_page: record.limit,
|
|
page: record.page
|
|
}
|
|
});
|
|
case 3:
|
|
res = _context.sent;
|
|
setTableData((res === null || res === void 0 ? void 0 : res.banks) || []);
|
|
setTotal((res === null || res === void 0 ? void 0 : res.count) || 0);
|
|
setLoading(false);
|
|
case 7:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee);
|
|
}));
|
|
return _getData.apply(this, arguments);
|
|
}
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
getData(params);
|
|
}, []);
|
|
var handleChange = function handleChange(current) {
|
|
params.page = current;
|
|
setParams(objectSpread2_default()({}, params));
|
|
getData(params);
|
|
};
|
|
var handleShowSizeChange = function handleShowSizeChange(current, size) {
|
|
params.page = current;
|
|
params.limit = size;
|
|
setParams(objectSpread2_default()({}, params));
|
|
getData(params);
|
|
};
|
|
var columns = [{
|
|
title: '随机试卷名称',
|
|
dataIndex: 'exercise_name',
|
|
ellipsis: true,
|
|
width: '30%',
|
|
render: function render(text) {
|
|
return text;
|
|
}
|
|
}, {
|
|
title: '发送教学课堂',
|
|
dataIndex: 'course_name',
|
|
ellipsis: true,
|
|
render: function render(text) {
|
|
return text;
|
|
}
|
|
}, {
|
|
title: '状态',
|
|
dataIndex: 'jobable_type',
|
|
ellipsis: true,
|
|
render: function render(text) {
|
|
return text === "runnin" ? "执行中" : "已完成";
|
|
}
|
|
}, {
|
|
title: '发送人',
|
|
dataIndex: 'user_name',
|
|
ellipsis: true,
|
|
render: function render(text) {
|
|
return text;
|
|
}
|
|
}, {
|
|
title: '发送时间',
|
|
dataIndex: 'created_at',
|
|
width: '20%',
|
|
render: function render(text) {
|
|
return dayjs_min_default()(text).format('YYYY-MM-DD HH:mm:ss');
|
|
}
|
|
}].filter(function (item) {
|
|
return !!item;
|
|
});
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: SendRecordmodules.head,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
style: {
|
|
fontSize: '16px',
|
|
height: '40px',
|
|
display: 'flex',
|
|
padding: '10px 20px'
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(LeftOutlined/* default */.Z, {
|
|
onClick: function onClick() {
|
|
_umi_production_exports.history.push('/paperlibrary'); // 跳转回之前的页面
|
|
},
|
|
style: {
|
|
marginTop: '4px',
|
|
cursor: 'pointer',
|
|
marginRight: '5px',
|
|
color: "#666666"
|
|
}
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
onClick: function onClick() {
|
|
_umi_production_exports.history.push('/paperlibrary'); // 跳转回之前的页面
|
|
},
|
|
style: {
|
|
color: "#666666",
|
|
paddingRight: '20px'
|
|
},
|
|
children: "\u8FD4\u56DE"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
color: "#000000",
|
|
fontWeight: "500"
|
|
},
|
|
children: "\u968F\u673A\u8BD5\u5377\u53D1\u9001\u8BB0\u5F55"
|
|
})]
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: SendRecordmodules.contentWrap,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(spin/* default */.Z, {
|
|
spinning: loading,
|
|
children: total === 0 ? /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {
|
|
customText: "\u6682\u65E0\u968F\u673A\u8BD5\u5377\u53D1\u9001\u8BB0\u5F55"
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
|
className: "mt30",
|
|
rowKey: "id",
|
|
columns: columns,
|
|
dataSource: tableData,
|
|
pagination: false
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: SendRecordmodules.footer,
|
|
children: [total > (params === null || params === void 0 ? void 0 : params.limit) ? /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
style: {
|
|
color: '#656F87'
|
|
},
|
|
children: ["\u5171", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "c-light-primary",
|
|
children: total
|
|
}), "\u6761\u6570\u636E"]
|
|
})
|
|
}) : '', /*#__PURE__*/(0,jsx_runtime.jsx)(pagination/* default */.Z, {
|
|
total: total,
|
|
pageSize: params === null || params === void 0 ? void 0 : params.limit,
|
|
current: params === null || params === void 0 ? void 0 : params.page,
|
|
showSizeChanger: true,
|
|
onShowSizeChange: handleShowSizeChange,
|
|
onChange: handleChange,
|
|
showQuickJumper: true,
|
|
hideOnSinglePage: true
|
|
})]
|
|
})]
|
|
})]
|
|
});
|
|
};
|
|
/* harmony default export */ var Random_SendRecord = ((0,_umi_production_exports.connect)(function (_ref2) {
|
|
var loading = _ref2.loading,
|
|
globalSetting = _ref2.globalSetting;
|
|
return {
|
|
globalSetting: globalSetting,
|
|
loading: loading
|
|
};
|
|
})(SendRecord));
|
|
|
|
/***/ })
|
|
|
|
}]); |