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.
559 lines
23 KiB
559 lines
23 KiB
"use strict";
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[14452],{
|
|
|
|
/***/ 14452:
|
|
/*!********************************************************!*\
|
|
!*** ./src/components/AddPoints/index.tsx + 2 modules ***!
|
|
\********************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
Z: function() { return /* binding */ AddPoints; }
|
|
});
|
|
|
|
// 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/toConsumableArray.js
|
|
var toConsumableArray = __webpack_require__(37205);
|
|
var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray);
|
|
// 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: ./src/.umi-production/exports.ts
|
|
var _umi_production_exports = __webpack_require__(80184);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/checkbox/index.js + 3 modules
|
|
var es_checkbox = __webpack_require__(24905);
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/MinusCircleOutlined.js + 1 modules
|
|
var MinusCircleOutlined = __webpack_require__(12893);
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/PlusCircleOutlined.js + 1 modules
|
|
var PlusCircleOutlined = __webpack_require__(32134);
|
|
// EXTERNAL MODULE: ./src/utils/fetch.ts
|
|
var fetch = __webpack_require__(35325);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/form/index.js + 19 modules
|
|
var es_form = __webpack_require__(78241);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/select/index.js
|
|
var es_select = __webpack_require__(57809);
|
|
;// CONCATENATED MODULE: ./src/components/AddPoints/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var AddPointsmodules = ({});
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
;// CONCATENATED MODULE: ./src/components/AddPoints/item.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var CheckboxGroup = es_checkbox/* default */.Z.Group;
|
|
var ShixunsListPage = function ShixunsListPage(_ref) {
|
|
var _params$zydatas, _params$zydatas2, _params$jbdatas, _params$jbdatas2, _params$kcdatas, _params$kcdatas2, _params$zsdatas, _params$zsdatas2;
|
|
var classroomList = _ref.classroomList,
|
|
loading = _ref.loading,
|
|
user = _ref.user,
|
|
_ref$exercise_id = _ref.exercise_id,
|
|
exercise_id = _ref$exercise_id === void 0 ? null : _ref$exercise_id,
|
|
_ref$homework_common_ = _ref.homework_common_id,
|
|
homework_common_id = _ref$homework_common_ === void 0 ? null : _ref$homework_common_,
|
|
setitem = _ref.setitem,
|
|
item = _ref.item,
|
|
type = _ref.type,
|
|
rz = _ref.rz,
|
|
dispatch = _ref.dispatch;
|
|
var _useState = (0,_react_17_0_2_react.useState)([]),
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
datas = _useState2[0],
|
|
setdatas = _useState2[1];
|
|
var _useState3 = (0,_react_17_0_2_react.useState)({
|
|
zydatas: [],
|
|
jbdatas: [],
|
|
kcdatas: [],
|
|
zsdatas: [],
|
|
page: 1,
|
|
per_page: 20
|
|
}),
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
params = _useState4[0],
|
|
setparams = _useState4[1];
|
|
var param = (0,_umi_production_exports.useParams)();
|
|
var _useState5 = (0,_react_17_0_2_react.useState)(false),
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
isshowmodal = _useState6[0],
|
|
setisshowmodal = _useState6[1];
|
|
var _useState7 = (0,_react_17_0_2_react.useState)(false),
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
isloading = _useState8[0],
|
|
setisloading = _useState8[1];
|
|
var _Form$useForm = es_form/* default */.Z.useForm(),
|
|
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
|
|
form = _Form$useForm2[0];
|
|
|
|
// // console.log(params);
|
|
// useEffect(()=>{
|
|
// if(homework_common_id||exercise_id){
|
|
// getdatas();
|
|
// // getrz();
|
|
|
|
// }
|
|
// },[exercise_id,homework_common_id])
|
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
if (rz) {
|
|
// getrz();
|
|
params.zydatas = rz;
|
|
setparams(objectSpread2_default()({}, params));
|
|
if (item !== null && item !== void 0 && item.ec_course_id) {
|
|
setdata();
|
|
}
|
|
}
|
|
}, [item, rz]);
|
|
function setdata() {
|
|
return _setdata.apply(this, arguments);
|
|
} //获取认证届别
|
|
function _setdata() {
|
|
_setdata = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
|
|
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
case 0:
|
|
console.log('----', item);
|
|
_context3.next = 3;
|
|
return getjb(item === null || item === void 0 ? void 0 : item.ec_major_school_id);
|
|
case 3:
|
|
_context3.next = 5;
|
|
return getcourse(item === null || item === void 0 ? void 0 : item.ec_year_id);
|
|
case 5:
|
|
_context3.next = 7;
|
|
return getec_points(item === null || item === void 0 ? void 0 : item.ec_course_id);
|
|
case 7:
|
|
form.setFieldsValue({
|
|
ec_course_id: item === null || item === void 0 ? void 0 : item.ec_course_id,
|
|
ec_major_school_id: item === null || item === void 0 ? void 0 : item.ec_major_school_id,
|
|
ec_point_ids: item === null || item === void 0 ? void 0 : item.ec_point_ids,
|
|
ec_year_id: item === null || item === void 0 ? void 0 : item.ec_year_id
|
|
});
|
|
case 8:
|
|
case "end":
|
|
return _context3.stop();
|
|
}
|
|
}, _callee3);
|
|
}));
|
|
return _setdata.apply(this, arguments);
|
|
}
|
|
function getjb(_x) {
|
|
return _getjb.apply(this, arguments);
|
|
} //获取关联课程
|
|
function _getjb() {
|
|
_getjb = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4(key) {
|
|
var res;
|
|
return regeneratorRuntime_default()().wrap(function _callee4$(_context4) {
|
|
while (1) switch (_context4.prev = _context4.next) {
|
|
case 0:
|
|
_context4.next = 2;
|
|
return (0,fetch/* default */.ZP)("/api/ec_major_schools/".concat(key, "/ec_years/get_year_list.json"), {
|
|
method: 'get'
|
|
});
|
|
case 2:
|
|
res = _context4.sent;
|
|
params.jbdatas = res === null || res === void 0 ? void 0 : res.data;
|
|
setparams(objectSpread2_default()({}, params));
|
|
form.setFieldsValue({
|
|
ec_year_id: '',
|
|
ec_course_id: '',
|
|
ec_point_ids: []
|
|
});
|
|
case 6:
|
|
case "end":
|
|
return _context4.stop();
|
|
}
|
|
}, _callee4);
|
|
}));
|
|
return _getjb.apply(this, arguments);
|
|
}
|
|
function getcourse(_x2) {
|
|
return _getcourse.apply(this, arguments);
|
|
} //获取知识点
|
|
function _getcourse() {
|
|
_getcourse = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5(key) {
|
|
var res;
|
|
return regeneratorRuntime_default()().wrap(function _callee5$(_context5) {
|
|
while (1) switch (_context5.prev = _context5.next) {
|
|
case 0:
|
|
_context5.next = 2;
|
|
return (0,fetch/* default */.ZP)("/api/ec_years/".concat(key, "/ec_courses/get_courses.json"), {
|
|
method: 'get'
|
|
});
|
|
case 2:
|
|
res = _context5.sent;
|
|
params.kcdatas = res === null || res === void 0 ? void 0 : res.data;
|
|
setparams(objectSpread2_default()({}, params));
|
|
form.setFieldsValue({
|
|
ec_course_id: '',
|
|
ec_point_ids: []
|
|
});
|
|
case 6:
|
|
case "end":
|
|
return _context5.stop();
|
|
}
|
|
}, _callee5);
|
|
}));
|
|
return _getcourse.apply(this, arguments);
|
|
}
|
|
var getec_points = /*#__PURE__*/function () {
|
|
var _ref2 = 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:
|
|
_context.next = 2;
|
|
return (0,fetch/* default */.ZP)("/api/ec_courses/".concat(record, "/ec_points.json"), {
|
|
method: 'get',
|
|
params: {
|
|
ec_course_id: record
|
|
}
|
|
});
|
|
case 2:
|
|
res = _context.sent;
|
|
params.zsdatas = res === null || res === void 0 ? void 0 : res.data;
|
|
setparams(objectSpread2_default()({}, params));
|
|
case 5:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee);
|
|
}));
|
|
return function getec_points(_x3) {
|
|
return _ref2.apply(this, arguments);
|
|
};
|
|
}();
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: AddPointsmodules.from,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
|
|
form: form,
|
|
layout: "inline",
|
|
onValuesChange: function onValuesChange(value) {
|
|
console.log('----', value);
|
|
if (value.ec_major_school_id) {
|
|
params.jbdatas = [];
|
|
params.kcdatas = [];
|
|
params.zsdatas = [];
|
|
setparams(objectSpread2_default()({}, params));
|
|
getjb(value.ec_major_school_id);
|
|
}
|
|
if (value.ec_year_id) {
|
|
params.kcdatas = [];
|
|
params.zsdatas = [];
|
|
setparams(objectSpread2_default()({}, params));
|
|
getcourse(value.ec_year_id);
|
|
}
|
|
if (value.ec_course_id) {
|
|
params.zsdatas = [];
|
|
setparams(objectSpread2_default()({}, params));
|
|
getec_points(value.ec_course_id);
|
|
}
|
|
},
|
|
onFinish: ( /*#__PURE__*/function () {
|
|
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2(value) {
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
case 0:
|
|
setitem(value);
|
|
case 1:
|
|
case "end":
|
|
return _context2.stop();
|
|
}
|
|
}, _callee2);
|
|
}));
|
|
return function (_x4) {
|
|
return _ref3.apply(this, arguments);
|
|
};
|
|
}()),
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
label: "\u8BA4\u8BC1\u4E13\u4E1A",
|
|
name: "ec_major_school_id",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"], {
|
|
style: {
|
|
width: 150
|
|
},
|
|
disabled: ((_params$zydatas = params.zydatas) === null || _params$zydatas === void 0 ? void 0 : _params$zydatas.length) <= 0,
|
|
placeholder: "\u8BF7\u9009\u62E9\u8BA4\u8BC1\u4E13\u4E1A",
|
|
children: params === null || params === void 0 || (_params$zydatas2 = params.zydatas) === null || _params$zydatas2 === void 0 ? void 0 : _params$zydatas2.map(function (item, index) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
|
|
value: item === null || item === void 0 ? void 0 : item.ec_major_school_id,
|
|
children: item === null || item === void 0 ? void 0 : item.name
|
|
}, index);
|
|
})
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
label: "\u8BA4\u8BC1\u5C4A\u522B",
|
|
name: "ec_year_id",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"], {
|
|
style: {
|
|
width: 150
|
|
},
|
|
disabled: ((_params$jbdatas = params.jbdatas) === null || _params$jbdatas === void 0 ? void 0 : _params$jbdatas.length) <= 0,
|
|
placeholder: "\u8BF7\u9009\u62E9\u8BA4\u8BC1\u5C4A\u522B",
|
|
children: params === null || params === void 0 || (_params$jbdatas2 = params.jbdatas) === null || _params$jbdatas2 === void 0 ? void 0 : _params$jbdatas2.map(function (item, index) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
|
|
value: item === null || item === void 0 ? void 0 : item.ec_year_id,
|
|
children: item === null || item === void 0 ? void 0 : item.year
|
|
}, index);
|
|
})
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
label: "\u8BFE\u7A0B",
|
|
name: "ec_course_id",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"], {
|
|
style: {
|
|
width: 150
|
|
},
|
|
disabled: ((_params$kcdatas = params.kcdatas) === null || _params$kcdatas === void 0 ? void 0 : _params$kcdatas.length) <= 0,
|
|
placeholder: "\u8BF7\u9009\u62E9\u8BFE\u7A0B",
|
|
children: params === null || params === void 0 || (_params$kcdatas2 = params.kcdatas) === null || _params$kcdatas2 === void 0 ? void 0 : _params$kcdatas2.map(function (item, index) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
|
|
value: item === null || item === void 0 ? void 0 : item.id,
|
|
children: item === null || item === void 0 ? void 0 : item.name
|
|
}, index);
|
|
})
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
label: "\u77E5\u8BC6\u70B9",
|
|
name: "ec_point_ids",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"], {
|
|
onChange: function onChange() {
|
|
form.submit();
|
|
},
|
|
style: {
|
|
width: 150
|
|
},
|
|
mode: "multiple",
|
|
disabled: ((_params$zsdatas = params.zsdatas) === null || _params$zsdatas === void 0 ? void 0 : _params$zsdatas.length) <= 0,
|
|
placeholder: "\u8BF7\u9009\u62E9\u77E5\u8BC6\u70B9",
|
|
children: params === null || params === void 0 || (_params$zsdatas2 = params.zsdatas) === null || _params$zsdatas2 === void 0 ? void 0 : _params$zsdatas2.map(function (item, index) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
|
|
value: item === null || item === void 0 ? void 0 : item.id,
|
|
children: item === null || item === void 0 ? void 0 : item.name
|
|
}, index);
|
|
})
|
|
})
|
|
})]
|
|
})
|
|
});
|
|
};
|
|
/* harmony default export */ var AddPoints_item = ((0,_umi_production_exports.connect)(function (_ref4) {
|
|
var classroomList = _ref4.classroomList,
|
|
loading = _ref4.loading,
|
|
globalSetting = _ref4.globalSetting,
|
|
user = _ref4.user;
|
|
return {
|
|
classroomList: classroomList,
|
|
globalSetting: globalSetting,
|
|
loading: loading.effects,
|
|
user: user
|
|
};
|
|
})(ShixunsListPage));
|
|
;// CONCATENATED MODULE: ./src/components/AddPoints/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var AddPoints_CheckboxGroup = es_checkbox/* default */.Z.Group;
|
|
var AddPoints_ShixunsListPage = function ShixunsListPage(_ref) {
|
|
var _user$userInfo2, _user$userInfo$course;
|
|
var classroomList = _ref.classroomList,
|
|
loading = _ref.loading,
|
|
user = _ref.user,
|
|
_ref$exercise_id = _ref.exercise_id,
|
|
exercise_id = _ref$exercise_id === void 0 ? null : _ref$exercise_id,
|
|
_ref$homework_common_ = _ref.homework_common_id,
|
|
homework_common_id = _ref$homework_common_ === void 0 ? null : _ref$homework_common_,
|
|
_setitem = _ref.setitem,
|
|
type = _ref.type,
|
|
dispatch = _ref.dispatch;
|
|
var _useState = (0,_react_17_0_2_react.useState)([{}]),
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
datas = _useState2[0],
|
|
setdatas = _useState2[1];
|
|
var _useState3 = (0,_react_17_0_2_react.useState)([]),
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
rz = _useState4[0],
|
|
setrz = _useState4[1];
|
|
function getdatas() {
|
|
return _getdatas.apply(this, arguments);
|
|
}
|
|
function _getdatas() {
|
|
_getdatas = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
var _res$data;
|
|
var res, _res$data2, _res$data3, ec_point_ids;
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
while (1) switch (_context.prev = _context.next) {
|
|
case 0:
|
|
_context.next = 2;
|
|
return (0,fetch/* default */.ZP)("/api/ec_courses/".concat(0, "/ec_points/get_work_points.json"), {
|
|
method: 'get',
|
|
params: {
|
|
exercise_id: exercise_id,
|
|
homework_common_id: homework_common_id
|
|
}
|
|
});
|
|
case 2:
|
|
res = _context.sent;
|
|
// console.log(res?.data?.[0]);
|
|
|
|
if ((res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.length) > 0) {
|
|
ec_point_ids = [];
|
|
res === null || res === void 0 || (_res$data2 = res.data) === null || _res$data2 === void 0 || _res$data2.map(function (ite) {
|
|
var _ite$ec_point_ids2;
|
|
ite === null || ite === void 0 || (_ite$ec_point_ids2 = ite.ec_point_ids) === null || _ite$ec_point_ids2 === void 0 || _ite$ec_point_ids2.map(function (j) {
|
|
ec_point_ids.push(j);
|
|
});
|
|
});
|
|
_setitem(objectSpread2_default()(objectSpread2_default()({}, res === null || res === void 0 || (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3[0]), {}, {
|
|
ec_point_ids: ec_point_ids
|
|
}));
|
|
// setitem({...res?.data?.[0]});
|
|
setdatas(res === null || res === void 0 ? void 0 : res.data);
|
|
}
|
|
case 4:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee);
|
|
}));
|
|
return _getdatas.apply(this, arguments);
|
|
}
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
var _user$userInfo;
|
|
if (user !== null && user !== void 0 && (_user$userInfo = user.userInfo) !== null && _user$userInfo !== void 0 && (_user$userInfo = _user$userInfo.course) !== null && _user$userInfo !== void 0 && _user$userInfo.course_school_id) {
|
|
getrz();
|
|
}
|
|
}, [user === null || user === void 0 || (_user$userInfo2 = user.userInfo) === null || _user$userInfo2 === void 0 || (_user$userInfo2 = _user$userInfo2.course) === null || _user$userInfo2 === void 0 ? void 0 : _user$userInfo2.course_school_id]);
|
|
function getrz() {
|
|
return _getrz.apply(this, arguments);
|
|
}
|
|
function _getrz() {
|
|
_getrz = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
|
|
var _user$userInfo3;
|
|
var res;
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
case 0:
|
|
_context2.next = 2;
|
|
return (0,fetch/* default */.ZP)("/api/schools/".concat(user === null || user === void 0 || (_user$userInfo3 = user.userInfo) === null || _user$userInfo3 === void 0 || (_user$userInfo3 = _user$userInfo3.course) === null || _user$userInfo3 === void 0 ? void 0 : _user$userInfo3.course_school_id, "/ec_majors/get_major_list.json"), {
|
|
method: 'get'
|
|
});
|
|
case 2:
|
|
res = _context2.sent;
|
|
setrz(res === null || res === void 0 ? void 0 : res.data);
|
|
if (homework_common_id || exercise_id) {
|
|
getdatas();
|
|
// getrz();
|
|
}
|
|
case 5:
|
|
case "end":
|
|
return _context2.stop();
|
|
}
|
|
}, _callee2);
|
|
}));
|
|
return _getrz.apply(this, arguments);
|
|
}
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
style: {
|
|
display: (_user$userInfo$course = user.userInfo.course) !== null && _user$userInfo$course !== void 0 && _user$userInfo$course.is_openengineering ? '' : 'none'
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
style: {
|
|
fontSize: '16px',
|
|
fontWeight: 400
|
|
},
|
|
children: "\u5DE5\u7A0B\u8BA4\u8BC1\u8003\u6838\u77E5\u8BC6\u70B9"
|
|
}), datas === null || datas === void 0 ? void 0 : datas.map(function (item, index) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
style: {
|
|
display: 'flex',
|
|
alignItems: 'center',
|
|
marginBottom: '10px'
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(AddPoints_item, {
|
|
rz: rz,
|
|
item: item,
|
|
type: index,
|
|
setitem: function setitem(value) {
|
|
// item=value
|
|
// console.log('---',item,datas);
|
|
datas.splice(index, 1, value);
|
|
setdatas(toConsumableArray_default()(datas));
|
|
var ec_point_ids = [];
|
|
datas === null || datas === void 0 || datas.map(function (ite) {
|
|
var _ite$ec_point_ids;
|
|
ite === null || ite === void 0 || (_ite$ec_point_ids = ite.ec_point_ids) === null || _ite$ec_point_ids === void 0 || _ite$ec_point_ids.map(function (j) {
|
|
ec_point_ids.push(j);
|
|
});
|
|
});
|
|
_setitem(objectSpread2_default()(objectSpread2_default()({}, value), {}, {
|
|
ec_point_ids: ec_point_ids
|
|
}));
|
|
}
|
|
}), index != 0 && /*#__PURE__*/(0,jsx_runtime.jsx)(MinusCircleOutlined/* default */.Z, {
|
|
onClick: function onClick() {
|
|
datas.splice(index, 1);
|
|
setdatas(toConsumableArray_default()(datas));
|
|
},
|
|
style: {
|
|
marginLeft: 10,
|
|
fontSize: '20px'
|
|
}
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(PlusCircleOutlined/* default */.Z, {
|
|
onClick: function onClick() {
|
|
datas.push({});
|
|
setdatas(toConsumableArray_default()(datas));
|
|
},
|
|
style: {
|
|
marginLeft: 10,
|
|
fontSize: '20px'
|
|
}
|
|
})]
|
|
}, index);
|
|
})]
|
|
});
|
|
};
|
|
/* harmony default export */ var AddPoints = ((0,_umi_production_exports.connect)(function (_ref2) {
|
|
var classroomList = _ref2.classroomList,
|
|
loading = _ref2.loading,
|
|
globalSetting = _ref2.globalSetting,
|
|
user = _ref2.user;
|
|
return {
|
|
classroomList: classroomList,
|
|
globalSetting: globalSetting,
|
|
loading: loading.effects,
|
|
user: user
|
|
};
|
|
})(AddPoints_ShixunsListPage));
|
|
|
|
/***/ })
|
|
|
|
}]); |