-
{jupyter_folder_name}
-
{jupyter_folder_name}
+
{
jsCopy("jupyter_folder_name")
}}>复制地址
diff --git a/public/react/src/modules/tpm/jupyter/index.scss b/public/react/src/modules/tpm/jupyter/index.scss
index 1808e4bb6..2428b93fd 100644
--- a/public/react/src/modules/tpm/jupyter/index.scss
+++ b/public/react/src/modules/tpm/jupyter/index.scss
@@ -237,4 +237,9 @@ line-height: 50px !important;
white-space: nowrap;
cursor: default;
width: 181px;
+}
+
+.height45lineheight45{
+ height: 45px;
+ line-height: 45px !important;
}
\ No newline at end of file
diff --git a/public/react/src/redux/actions/ojForm.js b/public/react/src/redux/actions/ojForm.js
index 094257f42..4e9173a3e 100644
--- a/public/react/src/redux/actions/ojForm.js
+++ b/public/react/src/redux/actions/ojForm.js
@@ -4,7 +4,7 @@
* @Github:
* @Date: 2019-11-20 16:35:46
* @LastEditors : tangjiang
- * @LastEditTime : 2019-12-27 18:50:22
+ * @LastEditTime : 2019-12-27 20:03:12
*/
import types from './actionTypes';
import CONST from '../../constants';
@@ -286,20 +286,22 @@ export const validateOjForm = (props, type, cb) => {
} else if (type === 'challenge') {
cb && cb();
} else {
+ const {identifier} = res.data;
+ // if (paramsObj['submitType'] === 'add' && identifier) {
+ // dispatch(validateOjForm(props, 'update'));
+ // props.history.push(`/problems/${identifier}/edit`);
+ // return;
+ // };
// message.success(paramsObj['submitType'] === 'update' ? '更新成功' : '保存成功');
notification.success({
message: '提示',
description: paramsObj['submitType'] === 'update' ? '更新成功' : '保存成功'
});
- const {identifier} = res.data;
// 保存成功后的identifier
identifier && dispatch({
type: types.SAVE_OJ_FORM_ID,
payload: identifier
});
- if (paramsObj['submitType'] === 'add' && identifier) {
- props.history.push(`/problems/${identifier}/edit`)
- };
}
// 保存或更新后,调用start接口
// linkToDev(dispatch, props);
@@ -502,7 +504,7 @@ export const deleteTestCase = (obj) => {
export const getOJFormById = (id) => {
return (dispatch) => {
fetchGetOjById(id).then(res => {
- console.log('获取OJ表单信息成功: ', res);
+ // console.log('获取OJ表单信息成功: ', res);
dispatch({
type: types.SAVE_EDIT_OJ_FORM_AND_TEST_CASE,
payload: res.data
diff --git a/public/react/src/redux/reducers/ojForUserReducer.js b/public/react/src/redux/reducers/ojForUserReducer.js
index cbf0a04f3..e95adf0ec 100644
--- a/public/react/src/redux/reducers/ojForUserReducer.js
+++ b/public/react/src/redux/reducers/ojForUserReducer.js
@@ -4,7 +4,7 @@
* @Github:
* @Date: 2019-11-27 13:41:48
* @LastEditors : tangjiang
- * @LastEditTime : 2019-12-27 16:52:30
+ * @LastEditTime : 2019-12-27 19:56:06
*/
import types from "../actions/actionTypes";
import { Base64 } from 'js-base64';
@@ -179,7 +179,7 @@ const ojForUserReducer = (state = initialState, action) => {
commitTestRecordDetail: {}, // 调试代码执行结果
commitRecordDetail: {}, // 提交成功后记录提交的详情
commitRecord: [], // 提交记录
- userCode: '', // 保存当前用户输入的代码
+ // userCode: '', // 保存当前用户输入的代码
isUpdateCode: false, // 是否更新了代码内容
userCodeTab: 'task', // 学员测评tab位置: task | record | comment
userTestInput: '', // 用户自定义输入值
diff --git a/public/react/src/redux/reducers/ojFormReducer.js b/public/react/src/redux/reducers/ojFormReducer.js
index b214eb3bc..952919aca 100644
--- a/public/react/src/redux/reducers/ojFormReducer.js
+++ b/public/react/src/redux/reducers/ojFormReducer.js
@@ -4,7 +4,7 @@
* @Github:
* @Date: 2019-11-20 16:40:32
* @LastEditors : tangjiang
- * @LastEditTime : 2019-12-27 10:35:06
+ * @LastEditTime : 2019-12-27 20:00:26
*/
import { Base64 } from 'js-base64';
import types from '../actions/actionTypes';
@@ -61,6 +61,7 @@ const init = {
position: 1, // TODO 每次加载信息时同步指定positio值
score: 200, // 分值: 选择难易度后自动计算分值 200 | 500 | 1000
code: '', // 提交的代码
+ showCode: '', // 编辑器显示的代码
identifier: '', // OJ表单id
loading: false, // 僵尸loading标志
testCodeStatus: 'default', // 调试代码状态 default(默认值) | loading(加载中) | loaded(加载完成) | userCase(用户自定义测试用例) | finish(测试完成)
@@ -216,7 +217,8 @@ const ojFormReducer = (state = initialState, action) => {
testCases: curTestCases,
testCasesValidate: curTcValidates,
testCodeStatus: hack_sets.length > 0 ? 'userCase' : 'default',
- isPublish: status
+ isPublish: status,
+ showCode: cbcode
}
case types.CHANGE_PUBLISH_VALUE:
return {