diff --git a/public/react/src/modules/developer/components/myMonacoEditor/index.js b/public/react/src/modules/developer/components/myMonacoEditor/index.js index a7419899a..1ef918c59 100644 --- a/public/react/src/modules/developer/components/myMonacoEditor/index.js +++ b/public/react/src/modules/developer/components/myMonacoEditor/index.js @@ -4,11 +4,11 @@ * @Github: * @Date: 2019-11-27 15:02:52 * @LastEditors: tangjiang - * @LastEditTime: 2019-12-20 17:33:21 + * @LastEditTime: 2019-12-20 19:06:48 */ import './index.scss'; import React, { useState, useRef, useEffect } from 'react'; -import { Drawer, Modal, Icon, Badge } from 'antd'; +import { Drawer, Tooltip, Badge } from 'antd'; import { fromStore, CNotificationHOC } from 'educoder'; import { connect } from 'react-redux'; import MonacoEditor from '@monaco-editor/react'; @@ -138,16 +138,44 @@ function MyMonacoEditor (props, ref) { {/* 未保存时 ? '学员初始代码文件' : main.x */} {identifier ? language ? maps[language.toLowerCase()] : '' : '学员初始代码文件'} {hadCodeUpdate ? '已保存' : ''} - */} + - - - {renderRestore} - + + {/* */} + + + + + + {/* {renderRestore} */} + + + + { // 根据id获取记录详情 - console.log('提交记录详情', recordDetail); - getUserCommitRecordDetail(id, 'detail'); + getUserCommitRecordDetail(id, 'detail'); }, []); useEffect(() => { diff --git a/public/react/src/modules/developer/studentStudy/leftpane/commitRecord/index.js b/public/react/src/modules/developer/studentStudy/leftpane/commitRecord/index.js index 90c486cca..da51d524d 100644 --- a/public/react/src/modules/developer/studentStudy/leftpane/commitRecord/index.js +++ b/public/react/src/modules/developer/studentStudy/leftpane/commitRecord/index.js @@ -4,7 +4,7 @@ * @Github: * @Date: 2019-11-27 09:49:33 * @LastEditors: tangjiang - * @LastEditTime: 2019-12-20 13:55:07 + * @LastEditTime: 2019-12-20 19:35:01 */ import './index.scss'; import React, { useState, useEffect } from 'react'; @@ -113,7 +113,9 @@ const CommitRecord = (props) => { 执行结果: {reviewResult[status]} - + 复制错误信息 @@ -155,7 +157,7 @@ const CommitRecord = (props) => { let count = 0; useEffect(() => { clipboard = new ClipboardJS('.copy_error'); - clipboard.on('success', (e) => { + clipboard && clipboard.on('success', (e) => { e.clearSelection(); if (count > 0) return; count++; @@ -165,7 +167,10 @@ const CommitRecord = (props) => { }, 300); }); }, []); - + + const clickCopyErrInfo = () => { + count = 0; + } // if (commitRecordDetail.status !== 0) { // clipboard.on('success', (e) => { // console.log('成功=====》》》》》'); diff --git a/public/react/src/modules/tpm/jupyter/index.js b/public/react/src/modules/tpm/jupyter/index.js index 9d3ec50ec..0e209523f 100644 --- a/public/react/src/modules/tpm/jupyter/index.js +++ b/public/react/src/modules/tpm/jupyter/index.js @@ -319,7 +319,7 @@ function JupyterTPI (props) { visible={drawervisible} className={"RightPaneDrawer"} > - + {/**/} {/**/} diff --git a/public/react/src/redux/actions/ojForUser.js b/public/react/src/redux/actions/ojForUser.js index 89d826e69..8a44677ef 100644 --- a/public/react/src/redux/actions/ojForUser.js +++ b/public/react/src/redux/actions/ojForUser.js @@ -4,7 +4,7 @@ * @Github: * @Date: 2019-11-27 13:42:11 * @LastEditors: tangjiang - * @LastEditTime: 2019-12-20 14:47:26 + * @LastEditTime: 2019-12-20 19:30:30 */ import types from "./actionTypes"; import { Base64 } from 'js-base64'; @@ -338,6 +338,10 @@ export const getUserCommitRecordDetail = (identifier) => { type: types.GET_COMMIT_RECORD_DETAIL_BY_ID, payload: data }); + dispatch({ + type: types.CLICK_OPERATE_TYPE, + payload: '' + }); }); } } diff --git a/public/react/src/redux/actions/ojForm.js b/public/react/src/redux/actions/ojForm.js index cf36ee635..56c7a60bb 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-20 16:40:42 + * @LastEditTime: 2019-12-20 18:46:00 */ import types from './actionTypes'; import CONST from '../../constants'; @@ -142,15 +142,15 @@ export const validateOjForm = (props, type) => { } }); - if (bool) { - hasSuccess = false; - validateResult = { - [key]: { - validateStatus: 'error', - errMsg: key === 'input' ? '输入值必须是唯一的' : '输出值必须是唯一的' - } - }; - } + // if (bool) { + // hasSuccess = false; + // validateResult = { + // [key]: { + // validateStatus: 'error', + // errMsg: key === 'input' ? '输入值必须是唯一的' : '输出值必须是唯一的' + // } + // }; + // } } Object.assign(tempObj, validateResult); }); @@ -496,12 +496,12 @@ export const testCaseOutputChange = (value, index) => { if (!validate.errMsg) { // 唯一性校验 const {testCases} = getState().ojFormReducer; - let _errMsg = ''; + let _errMsg = '输出值不能为空'; const bool = testCases.some((item, i) => { if (i !== index) { - if (item['output'] === value) { - _errMsg=`与测试用例${index}的输入值重复了,请重新填写`; - } + // if (item['output'] === value) { + // _errMsg=`与测试用例${index}的输入值重复了,请重新填写`; + // } return item['output'] === value; } else { return false; diff --git a/public/react/src/services/jupyterServer.js b/public/react/src/services/jupyterServer.js index 6ee5ec828..059aace5e 100644 --- a/public/react/src/services/jupyterServer.js +++ b/public/react/src/services/jupyterServer.js @@ -32,4 +32,10 @@ export async function fetchSyncJupyterCode (identifier) { export async function fetchSaveJupyterTpi (params) { const url = `/jupyters/save_with_tpi.json`; return axios.get(url, { params }); -} \ No newline at end of file +} + +// 重置jupyter 保存 +// export async function reset_with_tpi (params) { +// const url = `/jupyters/reset_with_tpi.json`; +// return axios.get(url, { params }); +// } \ No newline at end of file
执行结果: {reviewResult[status]}
+
复制错误信息 @@ -155,7 +157,7 @@ const CommitRecord = (props) => { let count = 0; useEffect(() => { clipboard = new ClipboardJS('.copy_error'); - clipboard.on('success', (e) => { + clipboard && clipboard.on('success', (e) => { e.clearSelection(); if (count > 0) return; count++; @@ -165,7 +167,10 @@ const CommitRecord = (props) => { }, 300); }); }, []); - + + const clickCopyErrInfo = () => { + count = 0; + } // if (commitRecordDetail.status !== 0) { // clipboard.on('success', (e) => { // console.log('成功=====》》》》》'); diff --git a/public/react/src/modules/tpm/jupyter/index.js b/public/react/src/modules/tpm/jupyter/index.js index 9d3ec50ec..0e209523f 100644 --- a/public/react/src/modules/tpm/jupyter/index.js +++ b/public/react/src/modules/tpm/jupyter/index.js @@ -319,7 +319,7 @@ function JupyterTPI (props) { visible={drawervisible} className={"RightPaneDrawer"} > -