|
|
|
|
@ -1831,7 +1831,7 @@ var RenderEditor = function RenderEditor(_ref) {
|
|
|
|
|
return editorMapping[currentItemType] || null;
|
|
|
|
|
};
|
|
|
|
|
var NewItem = function NewItem(_ref2) {
|
|
|
|
|
var _form$getFieldsValue$, _form$getFieldsValue;
|
|
|
|
|
var _Form$useWatch, _form$getFieldsValue$, _form$getFieldsValue;
|
|
|
|
|
var problemset = _ref2.problemset,
|
|
|
|
|
loading = _ref2.loading,
|
|
|
|
|
dispatch = _ref2.dispatch;
|
|
|
|
|
@ -1879,7 +1879,7 @@ var NewItem = function NewItem(_ref2) {
|
|
|
|
|
_useState18 = slicedToArray_default()(_useState17, 2),
|
|
|
|
|
currentItemType = _useState18[0],
|
|
|
|
|
setCurrentItemType = _useState18[1];
|
|
|
|
|
var formKnowLedgeValue = currentItemType === es_form/* default */.Z.useWatch('knowledge', form);
|
|
|
|
|
var formKnowLedgeValue = currentItemType === "BPROGRAM" ? (_Form$useWatch = es_form/* default */.Z.useWatch('hack', form)) === null || _Form$useWatch === void 0 ? void 0 : _Form$useWatch.tag_discipline_ids : es_form/* default */.Z.useWatch('knowledge', form);
|
|
|
|
|
|
|
|
|
|
// console.log('---tag_disc', Form.useWatch('hack', form)?.tag_discipline_ids, Form.useWatch('knowledge', form));
|
|
|
|
|
|
|
|
|
|
@ -1965,7 +1965,7 @@ var NewItem = function NewItem(_ref2) {
|
|
|
|
|
sub_item_banks = _ref3$sub_item_banks === void 0 ? [] : _ref3$sub_item_banks;
|
|
|
|
|
if (searchParams.get('type') === '1') {
|
|
|
|
|
var _problemset$disciplin;
|
|
|
|
|
setCurrentItemType('PROGRAM_COMPLETION');
|
|
|
|
|
setCurrentItemType('BPROGRAM');
|
|
|
|
|
if (problemset !== null && problemset !== void 0 && (_problemset$disciplin = problemset.disciplinesData) !== null && _problemset$disciplin !== void 0 && _problemset$disciplin.disciplines) {
|
|
|
|
|
var _problemset$disciplin2, _problemset$editData, _problemset$editData2, _problemset$editData3;
|
|
|
|
|
var _getDisciplineIds = (0,OjForm_util/* getDisciplineIds */.y3)(problemset === null || problemset === void 0 || (_problemset$disciplin2 = problemset.disciplinesData) === null || _problemset$disciplin2 === void 0 ? void 0 : _problemset$disciplin2.disciplines, sub_discipline_id),
|
|
|
|
|
@ -1973,7 +1973,7 @@ var NewItem = function NewItem(_ref2) {
|
|
|
|
|
ids = _getDisciplineIds2[0],
|
|
|
|
|
dictData = _getDisciplineIds2[1];
|
|
|
|
|
var initData = {
|
|
|
|
|
item_type: 'PROGRAM_COMPLETION',
|
|
|
|
|
item_type: 'BPROGRAM',
|
|
|
|
|
standard_answers: problemset.editData.standard_answer,
|
|
|
|
|
difficulty: problemset.editData.difficult,
|
|
|
|
|
item_banks_group_id: problemset.editData.item_banks_group_id,
|
|
|
|
|
@ -2081,7 +2081,7 @@ var NewItem = function NewItem(_ref2) {
|
|
|
|
|
break;
|
|
|
|
|
case 'PROGRAM_COMPLETION':
|
|
|
|
|
break;
|
|
|
|
|
// case 'PROGRAM_COMPLETION':
|
|
|
|
|
// case 'BPROGRAM':
|
|
|
|
|
// form.setFieldsValue({
|
|
|
|
|
// hack: {
|
|
|
|
|
// time_limit: 3,
|