diff --git a/public/react/build.zip b/public/react/build.zip new file mode 100644 index 000000000..bcc9974cf Binary files /dev/null and b/public/react/build.zip differ diff --git a/public/react/src/modules/developer/studentStudy/index.scss b/public/react/src/modules/developer/studentStudy/index.scss index 68835f2ce..aaebee9af 100644 --- a/public/react/src/modules/developer/studentStudy/index.scss +++ b/public/react/src/modules/developer/studentStudy/index.scss @@ -1,6 +1,52 @@ @import '../split_pane_resizer.scss'; .split-pane-area{ height: calc(100vh - 65px); + + .right_pane_code_wrap{ + position: relative; + + .editor_nodte_area, + .student_notes{ + position: absolute; + z-index: 100; + } + .student_notes{ + right: 0px; + top: 50%; + width: 36px; + height: 36px; + margin-top: -18px; + border-radius: 50%; + background: #5091FF; + color: #fff; + font-size: 18px; + text-align: center; + transform: translateX(18px); + cursor: pointer; + opacity: 0.5; + transition: all .3s; + &:hover{ + opacity: 1; + transform: translateX(-10px); + } + } + .editor_nodte_area{ + right: 10px; + top: 50%; + width: 450px; + height: 200px; + margin-top: -100px; + background: #fff; + border-radius: 5px; + padding: 14px 10px 0; + // opacity: ; + transform: translateX(500px); + transition: all .3s; + &.active{ + transform: translateX(0px); + } + } + } } .right_pane_code_wrap{ diff --git a/public/react/src/modules/developer/studentStudy/rightpane/index.js b/public/react/src/modules/developer/studentStudy/rightpane/index.js index 054997359..cf264c67b 100644 --- a/public/react/src/modules/developer/studentStudy/rightpane/index.js +++ b/public/react/src/modules/developer/studentStudy/rightpane/index.js @@ -3,15 +3,20 @@ * @Author: tangjiang * @Github: * @Date: 2019-11-27 14:59:51 - * @LastEditors: tangjiang - * @LastEditTime: 2019-12-20 14:01:57 + * @LastEditors : tangjiang + * @LastEditTime : 2019-12-26 17:56:51 */ import React, { useState, useEffect } from 'react'; import {connect} from 'react-redux'; import MyMonacoEditor from '../../components/myMonacoEditor'; import ControlSetting from '../../components/controlSetting'; import actions from '../../../../redux/actions'; - +// import QuillForEditor from '../../../../common/quillForEditor'; +// import TextArea from 'antd/lib/input/TextArea'; +import { Input, Form, Button } from 'antd'; +// import FormItem from 'antd/lib/form/FormItem'; +const { TextArea } = Input; +const FormItem = Form.Item; const RightPane = (props) => { const { @@ -20,6 +25,7 @@ const RightPane = (props) => { submitUserCode, input, hack, + loading, notice, updateCode, hadCodeUpdate, @@ -27,12 +33,15 @@ const RightPane = (props) => { updateNotice, saveUserInputCode, restoreInitialCode, - saveOpacityType, - saveUserCodeForInterval + // saveOpacityType, + saveUserCodeForInterval, + addNotes, + changeLoadingState } = props; const [editorCode, setEditorCode] = useState(''); - + const [noteClazz, setNoteClazz] = useState('editor_nodte_area'); + const [noteCount] = useState(5000); let initFlag = true; useEffect(() => { if (editor_code) { @@ -86,6 +95,28 @@ const RightPane = (props) => { updateNotice && updateNotice(); }; + const handleClickNote = () => { + setNoteClazz('editor_nodte_area active'); + } + + const handleCancelNote = () => { + props.form.resetFields(); + setNoteClazz('editor_nodte_area'); + } + + const handleSubmitNote = () => { + props.form.validateFields((err, values) => { + if (!err) { + changeLoadingState(true); + addNotes(identifier, values, function () { + setNoteClazz('editor_nodte_area'); + props.form.resetFields(); + }); + } + }); + } + + const { getFieldDecorator } = props.form; return (
{ onUpdateNotice={handleUpdateNotice} onRestoreInitialCode={handleRestoreInitialCode} /> + + + + {/*
+