@ -22,16 +22,18 @@
/* harmony import */ var _root _workspace _ppte5yg23 _local _v9 _node _modules _babel _runtime _7 _23 _2 _babel _runtime _helpers _slicedToArray _js _ _WEBPACK _IMPORTED _MODULE _4 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _root _workspace _ppte5yg23 _local _v9 _node _modules _babel _runtime _7 _23 _2 _babel _runtime _helpers _slicedToArray _js _ _WEBPACK _IMPORTED _MODULE _4 _ _ ) ;
/* harmony import */ var react _ _WEBPACK _IMPORTED _MODULE _5 _ _ = _ _webpack _require _ _ ( /*! react */ 59301 ) ;
/* harmony import */ var antd _ _WEBPACK _IMPORTED _MODULE _11 _ _ = _ _webpack _require _ _ ( /*! antd */ 1056 ) ;
/* harmony import */ var antd _ _WEBPACK _IMPORTED _MODULE _12 _ _ = _ _webpack _require _ _ ( /*! antd */ 78673 ) ;
/* harmony import */ var antd _ _WEBPACK _IMPORTED _MODULE _13 _ _ = _ _webpack _require _ _ ( /*! antd */ 78241 ) ;
/* harmony import */ var antd _ _WEBPACK _IMPORTED _MODULE _14 _ _ = _ _webpack _require _ _ ( /*! antd */ 95237 ) ;
/* harmony import */ var antd _ _WEBPACK _IMPORTED _MODULE _15 _ _ = _ _webpack _require _ _ ( /*! antd */ 43604 ) ;
/* harmony import */ var antd _ _WEBPACK _IMPORTED _MODULE _16 _ _ = _ _webpack _require _ _ ( /*! antd */ 85731 ) ;
/* harmony import */ var antd _ _WEBPACK _IMPORTED _MODULE _17 _ _ = _ _webpack _require _ _ ( /*! antd */ 57809 ) ;
/* harmony import */ var antd _ _WEBPACK _IMPORTED _MODULE _12 _ _ = _ _webpack _require _ _ ( /*! antd */ 78241 ) ;
/* harmony import */ var antd _ _WEBPACK _IMPORTED _MODULE _13 _ _ = _ _webpack _require _ _ ( /*! antd */ 43418 ) ;
/* harmony import */ var antd _ _WEBPACK _IMPORTED _MODULE _15 _ _ = _ _webpack _require _ _ ( /*! antd */ 95237 ) ;
/* harmony import */ var antd _ _WEBPACK _IMPORTED _MODULE _16 _ _ = _ _webpack _require _ _ ( /*! antd */ 43604 ) ;
/* harmony import */ var antd _ _WEBPACK _IMPORTED _MODULE _17 _ _ = _ _webpack _require _ _ ( /*! antd */ 85731 ) ;
/* harmony import */ var antd _ _WEBPACK _IMPORTED _MODULE _18 _ _ = _ _webpack _require _ _ ( /*! antd */ 57809 ) ;
/* harmony import */ var antd _ _WEBPACK _IMPORTED _MODULE _19 _ _ = _ _webpack _require _ _ ( /*! antd */ 5112 ) ;
/* harmony import */ var _MdEditorInForm _ _WEBPACK _IMPORTED _MODULE _6 _ _ = _ _webpack _require _ _ ( /*! ./MdEditorInForm */ 627 ) ;
/* harmony import */ var umi _ _WEBPACK _IMPORTED _MODULE _7 _ _ = _ _webpack _require _ _ ( /*! umi */ 45295 ) ;
/* harmony import */ var _index _less _modules _ _WEBPACK _IMPORTED _MODULE _8 _ _ = _ _webpack _require _ _ ( /*! ./index.less?modules */ 70992 ) ;
/* harmony import */ var _Buttonloading _ _WEBPACK _IMPORTED _MODULE _9 _ _ = _ _webpack _require _ _ ( /*! ./Buttonloading */ 81525 ) ;
/* harmony import */ var _ant _design _icons _ _WEBPACK _IMPORTED _MODULE _14 _ _ = _ _webpack _require _ _ ( /*! @ant-design/icons */ 80045 ) ;
/* harmony import */ var react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ = _ _webpack _require _ _ ( /*! react/jsx-runtime */ 37712 ) ;
@ -48,6 +50,7 @@ var _excluded = ["key", "name"];
var TextArea = antd _ _WEBPACK _IMPORTED _MODULE _11 _ _ /* ["default"] */ . Z . TextArea ;
var language = [ {
title : 'C' ,
@ -72,7 +75,7 @@ var ReversedSwitch = function ReversedSwitch(_ref) {
var value = _ref . value ,
_onChange = _ref . onChange ;
//打开为false,关闭为true, 即一个特殊的Switch。
return /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsx ) ( antd _ _WEBPACK _IMPORTED _MODULE _12 _ _ /* ["default"] */ . Z , {
return /*#__PURE__*/ _jsx ( Switch , {
checked : value ,
onChange : function onChange ( checked ) {
_onChange ( checked ) ;
@ -149,7 +152,7 @@ var BProgramEditor = function BProgramEditor(_ref2) {
//新增和删除需要重新设置position, position表示填空的位置
var rewritePosition = function rewritePosition ( ) {
var preAnswerData = form . getFieldValue ( answerKey ) ;
form . setFieldsValue ( _root _workspace _ppte5yg23 _local _v9 _node _modules _babel _runtime _7 _23 _2 _babel _runtime _helpers _defineProperty _js _ _WEBPACK _IMPORTED _MODULE _2 _ _ _default ( ) ( { } , answerKey , preAnswerData . map ( function ( item , index ) {
form . setFieldsValue ( _root _workspace _ppte5yg23 _local _v9 _node _modules _babel _runtime _7 _23 _2 _babel _runtime _helpers _defineProperty _js _ _WEBPACK _IMPORTED _MODULE _2 _ _ _default ( ) ( { } , answerKey , preAnswerData === null || preAnswerData === void 0 ? void 0 : preAnswerData . map ( function ( item , index ) {
return _root _workspace _ppte5yg23 _local _v9 _node _modules _babel _runtime _7 _23 _2 _babel _runtime _helpers _objectSpread2 _js _ _WEBPACK _IMPORTED _MODULE _3 _ _ _default ( ) ( _root _workspace _ppte5yg23 _local _v9 _node _modules _babel _runtime _7 _23 _2 _babel _runtime _helpers _objectSpread2 _js _ _WEBPACK _IMPORTED _MODULE _3 _ _ _default ( ) ( { } , item ) , { } , {
position : index + 1
} ) ;
@ -170,10 +173,10 @@ var BProgramEditor = function BProgramEditor(_ref2) {
removeFnRef . current ( deleteIndex ) ;
rewritePosition ( ) ;
} ;
var standardAnswersValue = antd _ _WEBPACK _IMPORTED _MODULE _1 3 _ _ /* ["default"] */ . Z . useWatch ( answerKey , form ) ;
var standardAnswersValue = antd _ _WEBPACK _IMPORTED _MODULE _1 2 _ _ /* ["default"] */ . Z . useWatch ( answerKey , form ) ;
return /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsxs ) ( "div" , {
className : _index _less _modules _ _WEBPACK _IMPORTED _MODULE _8 _ _ /* ["default"] */ . Z . wrap ,
children : [ /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsx ) ( antd _ _WEBPACK _IMPORTED _MODULE _1 3 _ _ /* ["default"] */ . Z . Item , {
children : [ /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsx ) ( antd _ _WEBPACK _IMPORTED _MODULE _1 2 _ _ /* ["default"] */ . Z . Item , {
label : "\u8BD5\u9898\u63CF\u8FF0" ,
name : [ 'hack' , 'description' ] ,
style : {
@ -193,7 +196,7 @@ var BProgramEditor = function BProgramEditor(_ref2) {
} )
} ) , /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsx ) ( "div" , {
className : _index _less _modules _ _WEBPACK _IMPORTED _MODULE _8 _ _ /* ["default"] */ . Z . questionTitleEditorWrap ,
children : /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsx ) ( antd _ _WEBPACK _IMPORTED _MODULE _1 3 _ _ /* ["default"] */ . Z . Item , {
children : /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsx ) ( antd _ _WEBPACK _IMPORTED _MODULE _1 2 _ _ /* ["default"] */ . Z . Item , {
label : "\u7A0B\u5E8F\u4EE3\u7801" ,
name : [ 'hack_codes' , 'code' ] ,
labelCol : {
@ -206,6 +209,7 @@ var BProgramEditor = function BProgramEditor(_ref2) {
scrollId : "name" ,
watch : true ,
height : 400 ,
hidetoolBar : true ,
showNullProgramButton : true ,
onChange : function onChange ( a , b ) {
var preAnswerData = form . getFieldValue ( answerKey ) ;
@ -224,7 +228,7 @@ var BProgramEditor = function BProgramEditor(_ref2) {
}
} )
} )
} ) , /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsx ) ( antd _ _WEBPACK _IMPORTED _MODULE _1 3 _ _ /* ["default"] */ . Z . List , {
} ) , /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsx ) ( antd _ _WEBPACK _IMPORTED _MODULE _1 2 _ _ /* ["default"] */ . Z . List , {
name : answerKey ,
rules : [ {
validator : function validator ( rule , values ) {
@ -257,33 +261,72 @@ var BProgramEditor = function BProgramEditor(_ref2) {
addFnRef . current = add ;
removeFnRef . current = remove ;
return /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsxs ) ( react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . Fragment , {
children : [ /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsx ) ( antd _ _WEBPACK _IMPORTED _MODULE _13 _ _ /* ["default"] */ . Z . Item , {
label : "\u586B\u7A7A\u9879\u7B54\u6848" ,
required : true ,
labelCol : {
span : 24
}
children : [ /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsxs ) ( "div" , {
style : {
display : 'flex' ,
alignItems : 'center' ,
justifyContent : 'space-between'
} ,
children : [ /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsx ) ( antd _ _WEBPACK _IMPORTED _MODULE _12 _ _ /* ["default"] */ . Z . Item , {
label : "\u586B\u7A7A\u9879\u7B54\u6848" ,
required : true ,
labelCol : {
span : 24
}
} ) , /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsxs ) ( "div" , {
onClick : function onClick ( ) {
antd _ _WEBPACK _IMPORTED _MODULE _13 _ _ /* ["default"] */ . Z . warning ( {
title : '给分说明' ,
icon : null ,
width : 700 ,
centered : true ,
content : /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsxs ) ( "div" , {
children : [ /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsx ) ( "div" , {
children : "1.\u5B66\u751F\u586B\u5199\u7B54\u6848\u4E4B\u540E\uFF0C\u5FC5\u987B\u63D0\u4EA4\u4EE3\u7801\u8FDB\u884C\u8BC4\u6D4B\u624D\u80FD\u5F97\u5206\u3002"
} ) , /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsx ) ( "div" , {
style : {
marginTop : 10
} ,
children : "2.\u81EA\u52A8\u8BC4\u9605\u65F6\uFF0C\u7CFB\u7EDF\u5C06\u5224\u9898\u7A0B\u5E8F\u91CC\u7684\u6240\u6709\u7A7A\u66FF\u6362\u6210\u5B66\u751F\u63D0\u4EA4\u7684\u5185\u5BB9\uFF0C\u8FD0\u884C\u7A0B\u5E8F\u3002\u7A0B\u5E8F\u8BFB\u6D4B\u8BD5\u8F93\u5165\u6570\u636E\uFF0C\u4EA7\u751F\u8F93\u51FA\uFF0C\u4E0E\u6D4B\u8BD5\u8F93\u51FA\u6570\u636E\u6309\u9010\u4E2A\u6BD4\u5BF9\uFF0C\u5B8C\u5168\u6B63\u786E\u5219\u5F97\u6EE1\u5206\uFF1B\u82E5\u4E0D\u5B8C\u5168\u6B63\u786E\uFF0C\u5219\u4F9D\u6B21\u5C06\u6BCF\u4E2A\u7A7A\u6362\u6210\u5B66\u751F\u63D0\u4EA4\u7684\u5185\u5BB9\uFF0C\u540C\u65F6\u5C06\u5176\u4ED6\u7A7A\u66FF\u6362\u6210\u6807\u51C6\u7B54\u6848\uFF0C\u8FD0\u884C\u7A0B\u5E8F\u3002\u5982\u679C\u8FD9\u4E2A\u7A7A\u7684\u5B66\u751F\u63D0\u4EA4\u4E0E\u6807\u51C6\u7B54\u6848\u7ED3\u5408\u80FD\u5F97\u5230\u6B63\u786E\u8F93\u51FA\uFF0C\u5219\u8FD9\u4E2A\u7A7A\u5F97\u5230\u8BE5\u7A7A\u7684\u6EE1\u5206\u3002\u5426\u5219\u8BE5\u7A7A\u5F97 0 \u5206\u3002"
} ) ]
} )
} ) ;
} ,
style : {
minHeight : 32 ,
color : '#3061D0' ,
cursor : 'pointer'
} ,
children : [ /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsx ) ( _ant _design _icons _ _WEBPACK _IMPORTED _MODULE _14 _ _ /* ["default"] */ . Z , {
style : {
marginRight : 3 ,
color : '#3061D0'
}
} ) , /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsx ) ( "span" , {
children : " \u7ED9\u5206\u8BF4\u660E"
} ) ]
} ) ]
} ) , fields . map ( function ( _ref6 , index ) {
var _standardAnswersValue , _standardAnswersValue2 ;
var key = _ref6 . key ,
name = _ref6 . name ,
restField = _root _workspace _ppte5yg23 _local _v9 _node _modules _babel _runtime _7 _23 _2 _babel _runtime _helpers _objectWithoutProperties _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default ( ) ( _ref6 , _excluded ) ;
return /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsxs ) ( antd _ _WEBPACK _IMPORTED _MODULE _14 _ _ /* ["default"] */ . Z , {
return /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsxs ) ( antd _ _WEBPACK _IMPORTED _MODULE _1 5 _ _ /* ["default"] */ . Z , {
className : "mb20" ,
align : "middle" ,
wrap : false ,
children : [ /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsxs ) ( antd _ _WEBPACK _IMPORTED _MODULE _15 _ _ /* ["default"] */ . Z , {
children : [ /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsxs ) ( antd _ _WEBPACK _IMPORTED _MODULE _1 6 _ _ /* ["default"] */ . Z , {
flex : '0 0 auto' ,
className : "" . concat ( _index _less _modules _ _WEBPACK _IMPORTED _MODULE _8 _ _ /* ["default"] */ . Z . blankIndex ) ,
children : [ "\u586B\u7A7A\u9879" , index + 1 ]
} ) , /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsx ) ( antd _ _WEBPACK _IMPORTED _MODULE _15 _ _ /* ["default"] */ . Z , {
} ) , /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsx ) ( antd _ _WEBPACK _IMPORTED _MODULE _1 6 _ _ /* ["default"] */ . Z , {
flex : 1 ,
children : /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsxs ) ( antd _ _WEBPACK _IMPORTED _MODULE _14 _ _ /* ["default"] */ . Z , {
children : /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsxs ) ( antd _ _WEBPACK _IMPORTED _MODULE _1 5 _ _ /* ["default"] */ . Z , {
align : "top" ,
justify : "space-between" ,
wrap : false ,
children : [ /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsx ) ( antd _ _WEBPACK _IMPORTED _MODULE _15 _ _ /* ["default"] */ . Z , {
children : /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsx ) ( antd _ _WEBPACK _IMPORTED _MODULE _13 _ _ /* ["default"] */ . Z . Item , _root _workspace _ppte5yg23 _local _v9 _node _modules _babel _runtime _7 _23 _2 _babel _runtime _helpers _objectSpread2 _js _ _WEBPACK _IMPORTED _MODULE _3 _ _ _default ( ) ( _root _workspace _ppte5yg23 _local _v9 _node _modules _babel _runtime _7 _23 _2 _babel _runtime _helpers _objectSpread2 _js _ _WEBPACK _IMPORTED _MODULE _3 _ _ _default ( ) ( { } , restField ) , { } , {
children : [ /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsx ) ( antd _ _WEBPACK _IMPORTED _MODULE _1 6 _ _ /* ["default"] */ . Z , {
children : /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsx ) ( antd _ _WEBPACK _IMPORTED _MODULE _1 2 _ _ /* ["default"] */ . Z . Item , _root _workspace _ppte5yg23 _local _v9 _node _modules _babel _runtime _7 _23 _2 _babel _runtime _helpers _objectSpread2 _js _ _WEBPACK _IMPORTED _MODULE _3 _ _ _default ( ) ( _root _workspace _ppte5yg23 _local _v9 _node _modules _babel _runtime _7 _23 _2 _babel _runtime _helpers _objectSpread2 _js _ _WEBPACK _IMPORTED _MODULE _3 _ _ _default ( ) ( { } , restField ) , { } , {
name : [ name , 'answer_text' ] ,
noStyle : true ,
children : standardAnswersValue !== null && standardAnswersValue !== void 0 && ( _standardAnswersValue = standardAnswersValue [ name ] ) !== null && _standardAnswersValue !== void 0 && _standardAnswersValue . multi _line || standardAnswersValue !== null && standardAnswersValue !== void 0 && ( _standardAnswersValue2 = standardAnswersValue [ name ] ) !== null && _standardAnswersValue2 !== void 0 && _standardAnswersValue2 . multiLine ? /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsx ) ( TextArea , {
@ -305,15 +348,15 @@ var BProgramEditor = function BProgramEditor(_ref2) {
onBlur : function onBlur ( e ) { }
} )
} ) )
} ) , scoreByBlank && /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsx ) ( antd _ _WEBPACK _IMPORTED _MODULE _1 5 _ _ /* ["default"] */ . Z , {
} ) , scoreByBlank && /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsx ) ( antd _ _WEBPACK _IMPORTED _MODULE _1 6 _ _ /* ["default"] */ . Z , {
flex : '224px' ,
children : /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsx ) ( antd _ _WEBPACK _IMPORTED _MODULE _1 3 _ _ /* ["default"] */ . Z . Item , _root _workspace _ppte5yg23 _local _v9 _node _modules _babel _runtime _7 _23 _2 _babel _runtime _helpers _objectSpread2 _js _ _WEBPACK _IMPORTED _MODULE _3 _ _ _default ( ) ( _root _workspace _ppte5yg23 _local _v9 _node _modules _babel _runtime _7 _23 _2 _babel _runtime _helpers _objectSpread2 _js _ _WEBPACK _IMPORTED _MODULE _3 _ _ _default ( ) ( { } , restField ) , { } , {
children : /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsx ) ( antd _ _WEBPACK _IMPORTED _MODULE _1 2 _ _ /* ["default"] */ . Z . Item , _root _workspace _ppte5yg23 _local _v9 _node _modules _babel _runtime _7 _23 _2 _babel _runtime _helpers _objectSpread2 _js _ _WEBPACK _IMPORTED _MODULE _3 _ _ _default ( ) ( _root _workspace _ppte5yg23 _local _v9 _node _modules _babel _runtime _7 _23 _2 _babel _runtime _helpers _objectSpread2 _js _ _WEBPACK _IMPORTED _MODULE _3 _ _ _default ( ) ( { } , restField ) , { } , {
name : [ name , 'score' ] ,
label : "\u5206\u503C" ,
rules : [ {
required : true
} ] ,
children : /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsx ) ( antd _ _WEBPACK _IMPORTED _MODULE _1 6 _ _ /* ["default"] */ . Z , {
children : /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsx ) ( antd _ _WEBPACK _IMPORTED _MODULE _1 7 _ _ /* ["default"] */ . Z , {
size : "large" ,
className : _index _less _modules _ _WEBPACK _IMPORTED _MODULE _8 _ _ /* ["default"] */ . Z . blankInput ,
min : 0.1 ,
@ -322,7 +365,7 @@ var BProgramEditor = function BProgramEditor(_ref2) {
style : {
width : '100%'
} ,
placeholder : "\u 6309\u7A7A\u7ED9\u5206\u 8BF7\u8F93\u5165\u5206\u503C"
placeholder : "\u 8BF7\u8F93\u5165\u5206\u503C"
} )
} ) )
} ) ]
@ -336,7 +379,7 @@ var BProgramEditor = function BProgramEditor(_ref2) {
onClick : function onClick ( ) {
return setEditAnalysis ( true ) ;
} ,
children : /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsx ) ( antd _ _WEBPACK _IMPORTED _MODULE _1 3 _ _ /* ["default"] */ . Z . Item , {
children : /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsx ) ( antd _ _WEBPACK _IMPORTED _MODULE _1 2 _ _ /* ["default"] */ . Z . Item , {
name : [ 'hack' , 'analysis' ] ,
label : "\u9898\u76EE\u89E3\u6790" ,
labelCol : {
@ -347,7 +390,7 @@ var BProgramEditor = function BProgramEditor(_ref2) {
isEdit : editAnalysis
} )
} )
} ) , /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsx ) ( antd _ _WEBPACK _IMPORTED _MODULE _1 3 _ _ /* ["default"] */ . Z . Item , {
} ) , /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsx ) ( antd _ _WEBPACK _IMPORTED _MODULE _1 2 _ _ /* ["default"] */ . Z . Item , {
label : "\u7F16\u7A0B\u8BED\u8A00" ,
style : {
marginTop : 30
@ -360,16 +403,16 @@ var BProgramEditor = function BProgramEditor(_ref2) {
required : true ,
message : '请选择编程语言'
} ] ,
children : /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsx ) ( antd _ _WEBPACK _IMPORTED _MODULE _1 7 _ _ [ "default" ] , {
children : /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsx ) ( antd _ _WEBPACK _IMPORTED _MODULE _1 8 _ _ [ "default" ] , {
size : "large" ,
children : language . map ( function ( item ) {
return /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsxs ) ( antd _ _WEBPACK _IMPORTED _MODULE _1 7 _ _ [ "default" ] . Option , {
return /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsxs ) ( antd _ _WEBPACK _IMPORTED _MODULE _1 8 _ _ [ "default" ] . Option , {
value : item . key ,
children : [ " " , item . title ]
} , item . title ) ;
} )
} )
} ) , /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsxs ) ( antd _ _WEBPACK _IMPORTED _MODULE _1 3 _ _ /* ["default"] */ . Z . Item , {
} ) , /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsxs ) ( antd _ _WEBPACK _IMPORTED _MODULE _1 2 _ _ /* ["default"] */ . Z . Item , {
label : '最大评测时长(秒)' ,
style : {
marginTop : 30
@ -378,7 +421,7 @@ var BProgramEditor = function BProgramEditor(_ref2) {
span : 24
} ,
required : true ,
children : [ /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsx ) ( antd _ _WEBPACK _IMPORTED _MODULE _1 3 _ _ /* ["default"] */ . Z . Item , {
children : [ /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsx ) ( antd _ _WEBPACK _IMPORTED _MODULE _1 2 _ _ /* ["default"] */ . Z . Item , {
name : [ 'hack' , 'time_limit' ] ,
rules : [ {
required : true ,
@ -389,7 +432,7 @@ var BProgramEditor = function BProgramEditor(_ref2) {
message : '最小限制时间是3秒'
} ] ,
noStyle : true ,
children : /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsx ) ( antd _ _WEBPACK _IMPORTED _MODULE _1 6 _ _ /* ["default"] */ . Z , {
children : /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsx ) ( antd _ _WEBPACK _IMPORTED _MODULE _1 7 _ _ /* ["default"] */ . Z , {
precision : 0 ,
max : 10 ,
min : 3 ,
@ -402,27 +445,46 @@ var BProgramEditor = function BProgramEditor(_ref2) {
className : "ml10 font14" ,
children : "\u79D2"
} ) ]
} ) , /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsx s ) ( antd _ _WEBPACK _IMPORTED _MODULE _1 4 _ _ /* ["default"] */ . Z , {
align: "middle ",
} ) , /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsx ) ( antd _ _WEBPACK _IMPORTED _MODULE _1 2 _ _ /* ["default"] */ . Z . Item , {
label: "\u5B66\u751F\u7B54\u6848\u7684\u7A7A\u683C\u5904\u7406\u65B9\u5F0F ",
style : {
marginTop : 30
} ,
children : [ /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsx ) ( antd _ _WEBPACK _IMPORTED _MODULE _13 _ _ /* ["default"] */ . Z . Item , {
name : [ 'hack' , 'allow_student_debug' ] ,
children : /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsx ) ( ReversedSwitch , { } )
} ) , /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsx ) ( antd _ _WEBPACK _IMPORTED _MODULE _15 _ _ /* ["default"] */ . Z , {
className : "ml10" ,
children : "\u5141\u8BB8\u5B66\u751F\u7B54\u9898\u65F6\u8FDB\u884C\u4EE3\u7801\u8C03\u8BD5"
} ) ]
} ) , /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsx ) ( antd _ _WEBPACK _IMPORTED _MODULE _13 _ _ /* ["default"] */ . Z . Item , {
name : [ 'hack' , 'submit_rule' ] ,
labelCol : {
span : 24
} ,
rules : [ {
required : true ,
message : '请选择学生答案的空格处理方式'
} ] ,
children : /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsxs ) ( antd _ _WEBPACK _IMPORTED _MODULE _19 _ _ /* ["default"].Group */ . ZP . Group , {
style : {
marginTop : - 10
} ,
children : [ /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsx ) ( antd _ _WEBPACK _IMPORTED _MODULE _19 _ _ /* ["default"] */ . ZP , {
value : 0 ,
children : "\u4E0D\u5FFD\u7565\u7A7A\u683C"
} ) , /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsx ) ( antd _ _WEBPACK _IMPORTED _MODULE _19 _ _ /* ["default"] */ . ZP , {
value : 1 ,
children : "\u5FFD\u7565\u9996\u5C3E\u7A7A\u683C"
} ) , /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsx ) ( antd _ _WEBPACK _IMPORTED _MODULE _19 _ _ /* ["default"] */ . ZP , {
value : 2 ,
children : "\u5FFD\u7565\u6240\u6709\u7A7A\u683C"
} ) ]
} )
} ) , /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsx ) ( antd _ _WEBPACK _IMPORTED _MODULE _12 _ _ /* ["default"] */ . Z . Item , {
label : "\u6D4B\u8BD5\u7528\u4F8B" ,
required : true
required : true ,
style : {
marginTop : 30
}
} ) , /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsxs ) ( "div" , {
style : {
background : '#F6F7F9' ,
padding : 15
} ,
children : [ /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsx ) ( antd _ _WEBPACK _IMPORTED _MODULE _13 _ _ /* ["default"] */ . Z . Item , {
children : [ /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsx ) ( antd _ _WEBPACK _IMPORTED _MODULE _1 2 _ _ /* ["default"] */ . Z . Item , {
label : "\u8F93\u5165" ,
labelCol : {
span : 24
@ -431,7 +493,7 @@ var BProgramEditor = function BProgramEditor(_ref2) {
children : /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsx ) ( TextArea , {
rows : 4
} )
} ) , /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsx ) ( antd _ _WEBPACK _IMPORTED _MODULE _1 3 _ _ /* ["default"] */ . Z . Item , {
} ) , /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _10 _ _ . jsx ) ( antd _ _WEBPACK _IMPORTED _MODULE _1 2 _ _ /* ["default"] */ . Z . Item , {
label : "\u8F93\u51FA" ,
labelCol : {
span : 24
@ -610,7 +672,10 @@ var ButtonLoading = function ButtonLoading(_ref) {
_context4 . next = 15 ;
return ( 0 , _pages _MyProblem _service _ _WEBPACK _IMPORTED _MODULE _8 _ _ /* .updateCode */ . n4 ) ( id , re ? re : {
code : js _base64 _ _WEBPACK _IMPORTED _MODULE _6 _ _ . Base64 . encode ( codes ) ,
language : code . language
language : code . language ,
answers : stats === null || stats === void 0 ? void 0 : stats . map ( function ( item ) {
return item . answer _text ;
} )
} ) ;
case 15 :
response = _context4 . sent ;
@ -628,23 +693,15 @@ var ButtonLoading = function ButtonLoading(_ref) {
}
function _onUpdateCodes ( ) {
_onUpdateCodes = _root _workspace _ppte5yg23 _local _v9 _node _modules _babel _runtime _7 _23 _2 _babel _runtime _helpers _asyncToGenerator _js _ _WEBPACK _IMPORTED _MODULE _2 _ _ _default ( ) ( /*#__PURE__*/ _root _workspace _ppte5yg23 _local _v9 _node _modules _babel _runtime _7 _23 _2 _babel _runtime _helpers _regeneratorRuntime _js _ _WEBPACK _IMPORTED _MODULE _1 _ _ _default ( ) ( ) . mark ( function _callee5 ( re , id ) {
var _stats$filter2 ;
var stats , codes , response ;
return _root _workspace _ppte5yg23 _local _v9 _node _modules _babel _runtime _7 _23 _2 _babel _runtime _helpers _regeneratorRuntime _js _ _WEBPACK _IMPORTED _MODULE _1 _ _ _default ( ) ( ) . wrap ( function _callee5$ ( _context5 ) {
while ( 1 ) switch ( _context5 . prev = _context5 . next ) {
case 0 :
stats = items . userAnswer ;
codes = js _base64 _ _WEBPACK _IMPORTED _MODULE _6 _ _ . Base64 . decode ( items . code ) ;
debugger ;
if ( ! ( stats . length > 0 && ( ( _stats$filter2 = stats . filter ( function ( item ) {
return ! item . value ;
} ) ) === null || _stats$filter2 === void 0 ? void 0 : _stats$filter2 . length ) > 0 ) ) {
_context5 . next = 6 ;
break ;
}
antd _ _WEBPACK _IMPORTED _MODULE _12 _ _ /* ["default"] */ . ZP . info ( '填空项不能为空!' ) ;
return _context5 . abrupt ( "return" ) ;
case 6 :
codes = js _base64 _ _WEBPACK _IMPORTED _MODULE _6 _ _ . Base64 . decode ( items . code ) ; // if (stats.length > 0 && stats.filter((item) => !item.value)?.length > 0) {
// message.info('填空项不能为空!')
// return
// }
if ( stats . length > 0 ) {
stats === null || stats === void 0 || stats . map ( function ( item ) {
if ( item . multi _line ) {
@ -654,15 +711,18 @@ var ButtonLoading = function ButtonLoading(_ref) {
}
} ) ;
}
_context5 . next = 9 ;
_context5 . next = 5 ;
return ( 0 , _pages _MyProblem _service _ _WEBPACK _IMPORTED _MODULE _8 _ _ /* .updateCode */ . n4 ) ( id , re ? re : {
code : js _base64 _ _WEBPACK _IMPORTED _MODULE _6 _ _ . Base64 . encode ( codes ) ,
language : items . language
language : items . language ,
answers : stats === null || stats === void 0 ? void 0 : stats . map ( function ( item ) {
return item . value ;
} )
} ) ;
case 9 :
case 5 :
response = _context5 . sent ;
return _context5 . abrupt ( "return" , response ) ;
case 11 :
case 7 :
case "end" :
return _context5 . stop ( ) ;
}
@ -682,7 +742,7 @@ var ButtonLoading = function ButtonLoading(_ref) {
return _root _workspace _ppte5yg23 _local _v9 _node _modules _babel _runtime _7 _23 _2 _babel _runtime _helpers _regeneratorRuntime _js _ _WEBPACK _IMPORTED _MODULE _1 _ _ _default ( ) ( ) . wrap ( function _callee3$ ( _context3 ) {
while ( 1 ) switch ( _context3 . prev = _context3 . next ) {
case 0 :
if ( ! ( ButtonText === ' 运行调试 ') ) {
if ( ! ( ButtonText === ' 提交代码 ') ) {
_context3 . next = 20 ;
break ;
}
@ -709,6 +769,7 @@ var ButtonLoading = function ButtonLoading(_ref) {
}
executeCode = /*#__PURE__*/ function ( ) {
var _ref3 = _root _workspace _ppte5yg23 _local _v9 _node _modules _babel _runtime _7 _23 _2 _babel _runtime _helpers _asyncToGenerator _js _ _WEBPACK _IMPORTED _MODULE _2 _ _ _default ( ) ( /*#__PURE__*/ _root _workspace _ppte5yg23 _local _v9 _node _modules _babel _runtime _7 _23 _2 _babel _runtime _helpers _regeneratorRuntime _js _ _WEBPACK _IMPORTED _MODULE _1 _ _ _default ( ) ( ) . mark ( function _callee ( ) {
var _items$userAnswer ;
var _yield$getOperationRe , status , message , data , executeTime , isTimeOut ;
return _root _workspace _ppte5yg23 _local _v9 _node _modules _babel _runtime _7 _23 _2 _babel _runtime _helpers _regeneratorRuntime _js _ _WEBPACK _IMPORTED _MODULE _1 _ _ _default ( ) ( ) . wrap ( function _callee$ ( _context ) {
while ( 1 ) switch ( _context . prev = _context . next ) {
@ -721,7 +782,7 @@ var ButtonLoading = function ButtonLoading(_ref) {
message = _yield$getOperationRe . message ;
data = _yield$getOperationRe . data ;
executeTime = getTimeStamp ( ) ;
isTimeOut = executeTime - startTime > 6 * 1000 ;
isTimeOut = executeTime - startTime > 10 * 1000 * ( items === null || items === void 0 || ( _items$userAnswer = items . userAnswer ) === null || _items$userAnswer === void 0 ? void 0 : _items$userAnswer . length ) ;
if ( status !== 0 && ! isTimeOut ) {
setTimeout ( executeCode , 1000 ) ;
}
@ -877,6 +938,7 @@ var ButtonLoading = function ButtonLoading(_ref) {
}
_executeCode = /*#__PURE__*/ function ( ) {
var _ref4 = _root _workspace _ppte5yg23 _local _v9 _node _modules _babel _runtime _7 _23 _2 _babel _runtime _helpers _asyncToGenerator _js _ _WEBPACK _IMPORTED _MODULE _2 _ _ _default ( ) ( /*#__PURE__*/ _root _workspace _ppte5yg23 _local _v9 _node _modules _babel _runtime _7 _23 _2 _babel _runtime _helpers _regeneratorRuntime _js _ _WEBPACK _IMPORTED _MODULE _1 _ _ _default ( ) ( ) . mark ( function _callee2 ( ) {
var _formValues$standard _ ;
var _yield$getOperationRe2 , status , message , data , executeTime , isTimeOut ;
return _root _workspace _ppte5yg23 _local _v9 _node _modules _babel _runtime _7 _23 _2 _babel _runtime _helpers _regeneratorRuntime _js _ _WEBPACK _IMPORTED _MODULE _1 _ _ _default ( ) ( ) . wrap ( function _callee2$ ( _context2 ) {
while ( 1 ) switch ( _context2 . prev = _context2 . next ) {
@ -889,7 +951,7 @@ var ButtonLoading = function ButtonLoading(_ref) {
message = _yield$getOperationRe2 . message ;
data = _yield$getOperationRe2 . data ;
executeTime = getTimeStamp ( ) ;
isTimeOut = executeTime - _startTime > ( formValues . hack . time _limit + 3 ) * 1000 ;
isTimeOut = executeTime - _startTime > ( formValues . hack . time _limit + 3 ) * 1000 * ( formValues === null || formValues === void 0 || ( _formValues$standard _ = formValues . standard _answers ) === null || _formValues$standard _ === void 0 ? void 0 : _formValues$standard _ . length ) ;
if ( status !== 0 && ! isTimeOut ) {
setTimeout ( _executeCode , 1000 ) ;
}
@ -2038,7 +2100,7 @@ var MdEditorInForm = function MdEditorInForm(_ref) {
return /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _6 _ _ . jsx ) ( "div" , {
id : scrollId || '' ,
children : /*#__PURE__*/ ( 0 , react _jsx _runtime _ _WEBPACK _IMPORTED _MODULE _6 _ _ . jsx ) ( _components _markdown _editor _ _WEBPACK _IMPORTED _MODULE _2 _ _ /* ["default"] */ . Z , _root _workspace _ppte5yg23 _local _v9 _node _modules _babel _runtime _7 _23 _2 _babel _runtime _helpers _objectSpread2 _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default ( ) ( _root _workspace _ppte5yg23 _local _v9 _node _modules _babel _runtime _7 _23 _2 _babel _runtime _helpers _objectSpread2 _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default ( ) ( { } , props ) , { } , {
hidetoolBar : true ,
// hidetoolBar
defaultValue : value ,
onChange : function onChange ( a , b ) {
console . log ( "a:" , a , b ) ;