|
|
@ -22,20 +22,17 @@ const FormItem = Form.Item;
|
|
|
|
const { Option } = Select;
|
|
|
|
const { Option } = Select;
|
|
|
|
const maps = {
|
|
|
|
const maps = {
|
|
|
|
language: [
|
|
|
|
language: [
|
|
|
|
{ title: (<span style={{ color: 'rgba(0, 0, 0, 0.35)' }}>请选择</span>), key: '' },
|
|
|
|
|
|
|
|
{ title: 'C', key: 'C' },
|
|
|
|
{ title: 'C', key: 'C' },
|
|
|
|
{ title: 'C++', key: 'C++' },
|
|
|
|
{ title: 'C++', key: 'C++' },
|
|
|
|
{ title: 'Python', key: 'Python' },
|
|
|
|
{ title: 'Python', key: 'Python' },
|
|
|
|
{ title: 'Java', key: 'Java' }
|
|
|
|
{ title: 'Java', key: 'Java' }
|
|
|
|
],
|
|
|
|
],
|
|
|
|
difficult: [
|
|
|
|
difficult: [
|
|
|
|
{ title: (<span style={{ color: 'rgba(0, 0, 0, 0.35)' }}>请选择</span>), key: '' },
|
|
|
|
|
|
|
|
{ title: '简单', key: '1' },
|
|
|
|
{ title: '简单', key: '1' },
|
|
|
|
{ title: '中等', key: '2' },
|
|
|
|
{ title: '中等', key: '2' },
|
|
|
|
{ title: '困难', key: '3' }
|
|
|
|
{ title: '困难', key: '3' }
|
|
|
|
],
|
|
|
|
],
|
|
|
|
category: [
|
|
|
|
category: [
|
|
|
|
{ title: (<span style={{ color: 'rgba(0, 0, 0, 0.35)' }}>请选择</span>), key: '' },
|
|
|
|
|
|
|
|
{ title: '程序设计', key: '1' },
|
|
|
|
{ title: '程序设计', key: '1' },
|
|
|
|
{ title: '算法', key: '2' }
|
|
|
|
{ title: '算法', key: '2' }
|
|
|
|
],
|
|
|
|
],
|
|
|
@ -100,7 +97,7 @@ class EditTab extends React.Component {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// this.scrollRef.current.scrollTo(1000);
|
|
|
|
// this.scrollRef.current.scrollTo(1000);
|
|
|
|
this.props.addTestCase({testCase: obj, tcValidate: validateObj});
|
|
|
|
this.props.addTestCase({ testCase: obj, tcValidate: validateObj });
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// componentDidUpdate (nextProp) {
|
|
|
|
// componentDidUpdate (nextProp) {
|
|
|
@ -440,7 +437,7 @@ class EditTab extends React.Component {
|
|
|
|
help={ojFormValidate.language.errMsg}
|
|
|
|
help={ojFormValidate.language.errMsg}
|
|
|
|
colon={false}
|
|
|
|
colon={false}
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<Select onChange={this.handleLanguageChange} value={`${ojForm.language}`}>
|
|
|
|
<Select onChange={this.handleLanguageChange} defaultValue={'C'} value={`${ojForm.language}`}>
|
|
|
|
{getOptions('language')}
|
|
|
|
{getOptions('language')}
|
|
|
|
</Select>
|
|
|
|
</Select>
|
|
|
|
</FormItem>
|
|
|
|
</FormItem>
|
|
|
@ -478,7 +475,6 @@ class EditTab extends React.Component {
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</FormItem>
|
|
|
|
</FormItem>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</Form>
|
|
|
|
</Form>
|
|
|
|
|
|
|
|
|
|
|
|
{/* 添加测试用例 */}
|
|
|
|
{/* 添加测试用例 */}
|
|
|
|