From 5369dcd0d0d90d7e3d6c80b4fb4b17b9e9bdee26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Thu, 26 Dec 2019 09:09:09 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=98=E5=BA=93=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/question/Question.js | 38 ++++++++++++- .../modules/question/Questionitem_banks.js | 55 +++++++++++++------ .../modules/question/component/Contentpart.js | 4 +- public/react/src/modules/tpm/NewHeader.js | 49 +++++++++++++++-- public/react/src/modules/tpm/TPMIndex.css | 2 +- 5 files changed, 122 insertions(+), 26 deletions(-) diff --git a/public/react/src/modules/question/Question.js b/public/react/src/modules/question/Question.js index 799b5afef..1beb16c3a 100644 --- a/public/react/src/modules/question/Question.js +++ b/public/react/src/modules/question/Question.js @@ -392,6 +392,33 @@ class Question extends Component { + subjective_questions_count; return ( <div className="newMain clearfix" ref={this.saveContainer}> + { + visible===true? + <style> + { + ` + .newHeaders{ + position: fixed; + top: 0px; + z-index: 9999999 ; + } + .newFooter{ + position: relative; + z-index: 9999999 ; + } + ` + } + </style> + :"" + } + { + visible===true? + <div + style={{ + marginTop: "60px" + }}></div> + :""} + <QuestionModal {...this.props}{...this.state} modalsType={modalsType} modalCancel={() => this.modalCancel()} setDownload={() => this.setDownload()}></QuestionModal> <SiderBar @@ -428,22 +455,27 @@ class Question extends Component { <style> { ` - .ant-drawer-content-wrapper{ + .ant-drawer-content-wrapper{ width: 235px; + overflow:hidden; + margin-top: 62px; } - .ant-drawer-body{ + .ant-drawer-body{ height: 100%; background:rgba(234,234,234,1); } ` } </style> + <Drawer - getContainer={this.getContainer} + className="drawercontainer" placement={placement} closable={false} onClose={() => this.onClose()} visible={visible} + mask={false} + closable={true} > {Datacount && Datacount > 0 ? diff --git a/public/react/src/modules/question/Questionitem_banks.js b/public/react/src/modules/question/Questionitem_banks.js index 8900d7a6f..ba26074cc 100644 --- a/public/react/src/modules/question/Questionitem_banks.js +++ b/public/react/src/modules/question/Questionitem_banks.js @@ -16,10 +16,12 @@ import {TPMIndexHOC} from "../tpm/TPMIndexHOC"; import Itembankstop from "./component/Itembankstop"; import NoneData from './component/NoneData'; import './questioncss/questioncom.css'; +import '../tpm/newshixuns/css/Newshixuns.css'; import Choicequestion from './component/Choicequestion'; import SingleEditor from "./component/SingleEditor"; import ChoquesEditor from "./component/ChoquesEditor" import JudquestionEditor from "./component/JudquestionEditor"; +import Bottomsubmit from "../../modules/modals/Bottomsubmit"; // var itembankstop=null; // var singleEditor=null; // var Judquestio=null; @@ -208,6 +210,7 @@ class Questionitem_banks extends Component { .then((result) => { if (result.data.status == 0) { this.props.showNotification(`新增单选题成功`); + this.props.history.replace('/question'); } }).catch((error) => { @@ -218,6 +221,8 @@ class Questionitem_banks extends Component { .then((result) => { if (result.data.status == 0) { this.props.showNotification(`编辑单选题成功`); + this.props.history.replace('/question'); + } }).catch((error) => { @@ -274,6 +279,8 @@ class Questionitem_banks extends Component { .then((result) => { if (result.data.status == 0) { this.props.showNotification(`新增多选题成功`); + this.props.history.replace('/question'); + } }).catch((error) => { @@ -285,6 +292,8 @@ class Questionitem_banks extends Component { .then((result) => { if (result.data.status == 0) { this.props.showNotification(`编辑多选题成功`); + this.props.history.replace('/question'); + } }).catch((error) => { @@ -337,6 +346,8 @@ class Questionitem_banks extends Component { .then((result) => { if (result.data.status == 0) { this.props.showNotification(`新增判断题成功`); + this.props.history.replace('/question'); + } }).catch((error) => { console.log(error); @@ -347,6 +358,8 @@ class Questionitem_banks extends Component { .then((result) => { if (result.data.status == 0) { this.props.showNotification(`编辑判断题成功`); + this.props.history.replace('/question'); + } }).catch((error) => { console.log(error); @@ -392,6 +405,7 @@ class Questionitem_banks extends Component { const params= this.props&&this.props.match&&this.props.match.params; // console.log(params); return ( + <div> <div className="newMain clearfix intermediatecenter " style={{ @@ -401,6 +415,7 @@ class Questionitem_banks extends Component { <style> { ` + .newFooter{ display: none; } @@ -472,28 +487,20 @@ class Questionitem_banks extends Component { </div> - { - item_type===null? - "" - : - <div className=" clearfix edu-back-white orderingbox newshixunbottombtn bottomdivs sortinxdirection intermediatecenter mt50" style={{ - position:"absolute", - bottom: "0px", - }} > - <a href={'/question'}> - <div className="divquxiao mr20 xiaoshou"> - <p className="divquxiaotest" >取消</p> - </div> - </a> - <div className="divbaocun xiaoshou"><p className="divbaocuntests" onClick={()=>this.preservation()}>保存</p></div> - </div> - } + + </div> + { + item_type===null? + "" + : + <Bottomsubmit bottomvalue={"保存"} onSubmits={() => this.preservation()} url={'/question'}></Bottomsubmit> + } </div> ) @@ -504,3 +511,19 @@ class Questionitem_banks extends Component { } export default SnackbarHOC() (TPMIndexHOC ( Questionitem_banks )); +// { +// item_type===null? +// "" +// : +// <div className=" clearfix edu-back-white orderingbox newshixunbottombtn bottomdivs sortinxdirection intermediatecenter mt50" style={{ +// position:"absolute", +// bottom: "0px", +// }} > +// <a href={'/question'}> +// <div className="divquxiao mr20 xiaoshou"> +// <p className="divquxiaotest" >取消</p> +// </div> +// </a> +// <div className="divbaocun xiaoshou"><p className="divbaocuntests" onClick={()=>this.preservation()}>保存</p></div> +// </div> +// } diff --git a/public/react/src/modules/question/component/Contentpart.js b/public/react/src/modules/question/component/Contentpart.js index eacb49b65..c88e0f25d 100644 --- a/public/react/src/modules/question/component/Contentpart.js +++ b/public/react/src/modules/question/component/Contentpart.js @@ -111,12 +111,12 @@ class Contentpart extends Component { .xaxisreverseorder .ant-input-lg { height: 41px;} - .ant-popover{ + .xaxisreverseorder .ant-popover{ top: 348px !important; } - .ant-popover-inner-content { + .ant-popover-inner-content { padding:0px !important; } diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index 5ca377563..903728c72 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -13,7 +13,7 @@ import { getImageUrl, toPath ,trigger,broadcastChannelPostMessage} from 'educode import axios from 'axios'; -import { Modal,Checkbox ,Radio,Input,message,notification } from 'antd'; +import { Modal,Checkbox ,Radio,Input,message,notification,Popover} from 'antd'; import Addcourses from '../courses/coursesPublic/Addcourses'; @@ -69,6 +69,7 @@ class NewHeader extends Component { headtypesonClickbool:false, headtypess:"/", mygetHelmetapi2: null, + visiblemyss:false, } console.log("176") // console.log(props); @@ -699,6 +700,15 @@ submittojoinclass=(value)=>{ document.head.appendChild(link); } + + handleVisibleChanges = (boll) => { + this.setState({ + visiblemyss: boll, + }) + + } + + getAppdata=()=>{ let url = "/setting.json"; axios.get(url).then((response) => { @@ -868,7 +878,17 @@ submittojoinclass=(value)=>{ }) } - + const contents = ( + <div className="questiontypes" style={{ + width:'93px', + height:'100px', + }}> + <Link to={'/question'}>试题库</Link> + <p className="questiontypeheng"></p> + <Link to={'/question'}>试卷库</Link> + <p className="questiontypeheng"></p> + </div> + ); return ( <div className="newHeaders" id="nHeader" > @@ -942,8 +962,29 @@ submittojoinclass=(value)=>{ ) }) } - <li className={`pr`}> - <Link to={'/question'}>题库</Link> + <style> + { + ` + .queyppors { + top: 63px !important; + } + + .ant-popover-inner-content { + padding:0px !important; + } + ` + } + </style> + <li className={`pr `}> + <Popover placement="bottom" content={contents} trigger="click" > + <div className=" sortinxdirection mr10"> + <div style={{ + color:"#fff" + }}> + 题库 + </div> + </div> + </Popover> </li> {/*<li><a href={this.props.Headertop===undefined?"":'/courses'}>课堂</a></li>*/} diff --git a/public/react/src/modules/tpm/TPMIndex.css b/public/react/src/modules/tpm/TPMIndex.css index 085a1c07d..aab7ae00e 100644 --- a/public/react/src/modules/tpm/TPMIndex.css +++ b/public/react/src/modules/tpm/TPMIndex.css @@ -232,7 +232,7 @@ body>.-task-title { } .myrigthsiderbar{ - right: 340px !important; + right: 15% !important; } .feedbackdivcolor{