diff --git a/public/react/src/App.js b/public/react/src/App.js index 0d24db7c2..7b276c9eb 100644 --- a/public/react/src/App.js +++ b/public/react/src/App.js @@ -316,6 +316,11 @@ const RecordDetail = Loadable({ loader: () => import('./modules/developer/recordDetail'), loading: Loading }); +// jupyter tpi +const JupyterTPI = Loadable({ + loader: () => import('./modules/tpm/jupyter'), + loading: Loading +}); // //个人竞赛报名 // const PersonalCompetit = Loadable({ // loader: () => import('./modules/competition/personal/PersonalCompetit.js'), @@ -697,6 +702,10 @@ class App extends Component { (props) => () }/> + + ( - - - + + ), } @@ -222,6 +240,22 @@ class DeveloperHome extends React.PureComponent { this.props.history.push(`/problems/${identifier}/edit`) } } + + // 删除 + handleClickDelete = (record) => { + const { deleteItem } = this.props; + Modal.confirm({ + title: '删除', + content: `确定要删除${record.name}吗?`, + okText: '确定', + cancelText: '取消', + onOk () { + // 调用删除接口 + console.log(record.identifier); + deleteItem(record.identifier); + } + }); + } // table条件变化时 handleTableChange = (pagination, filters, sorter) => { const {field, order} = sorter; @@ -374,7 +408,7 @@ class DeveloperHome extends React.PureComponent { // console.log('name has click', record); // 先调用start接口获取返回的 identifier, 再跳转到开启编辑 if (this.isLogin()) { - // console.log(record); + toStore('hack_identifier', record.identifier); // 保存当前编辑的id号 this.props.startProgramQuestion(record.identifier, this.props); } } @@ -499,7 +533,8 @@ const mapDispatchToProps = (dispatch) => ({ handleClick: () => dispatch(actions.toggleTodo()), fetchOJList: (params) => dispatch(actions.getOJList(params)), changePaginationInfo: (obj) => dispatch(actions.changePaginationInfo(obj)), - startProgramQuestion: (id, props) => dispatch(actions.startProgramQuestion(id, props)) + startProgramQuestion: (id, props) => dispatch(actions.startProgramQuestion(id, props)), + deleteItem: (identifier) => dispatch(actions.deleteItem(identifier)) }); export default withRouter(connect( diff --git a/public/react/src/modules/developer/components/controlSetting/index.js b/public/react/src/modules/developer/components/controlSetting/index.js index b6ab66c10..690bbad36 100644 --- a/public/react/src/modules/developer/components/controlSetting/index.js +++ b/public/react/src/modules/developer/components/controlSetting/index.js @@ -4,7 +4,7 @@ * @Github: * @Date: 2019-11-27 16:02:36 * @LastEditors: tangjiang - * @LastEditTime: 2019-12-03 09:19:54 + * @LastEditTime: 2019-12-10 09:30:27 */ import './index.scss'; import React, { useState, useRef } from 'react'; diff --git a/public/react/src/modules/developer/components/execResult/index.js b/public/react/src/modules/developer/components/execResult/index.js index 5f8526ca4..32bbbee91 100644 --- a/public/react/src/modules/developer/components/execResult/index.js +++ b/public/react/src/modules/developer/components/execResult/index.js @@ -4,7 +4,7 @@ * @Github: * @Date: 2019-11-28 08:44:54 * @LastEditors: tangjiang - * @LastEditTime: 2019-12-03 12:38:27 + * @LastEditTime: 2019-12-10 09:24:02 */ import './index.scss'; import React, { useState, useEffect } from 'react'; @@ -19,7 +19,7 @@ function ExecResult (props) { // 指定渲染初始, 加载中, 加载完成页面内容 const renderInit = () => (
- 请先点击“调试代码”运行您的代码 + 请填写测试用例的输入值,点击“调试代码”
); const renderLoading = () => ( diff --git a/public/react/src/modules/developer/components/initTabCtx/index.js b/public/react/src/modules/developer/components/initTabCtx/index.js index 221558cdc..19f4230b1 100644 --- a/public/react/src/modules/developer/components/initTabCtx/index.js +++ b/public/react/src/modules/developer/components/initTabCtx/index.js @@ -4,7 +4,7 @@ * @Github: * @Date: 2019-11-27 19:46:14 * @LastEditors: tangjiang - * @LastEditTime: 2019-12-03 09:14:59 + * @LastEditTime: 2019-12-10 09:31:00 */ import './index.scss'; import React, { useState, useEffect, useRef, useImperativeHandle, forwardRef } from 'react'; @@ -42,7 +42,6 @@ function InitTabCtx (props, ref) {
{ getFieldDecorator('input', { @@ -50,7 +49,10 @@ function InitTabCtx (props, ref) { { required: true, message: '输入值不能为空'} ], initialValue: inputValue - })(