dev_new_shixunsrepository
杨树明 5 years ago
parent bf4ba80a6b
commit 1036126607

@ -82,8 +82,8 @@ export function initAxiosInterceptors(props) {
// proxy = "https://testeduplus2.educoder.net" // proxy = "https://testeduplus2.educoder.net"
//proxy="http://47.96.87.25:48080" //proxy="http://47.96.87.25:48080"
proxy="https://pre-newweb.educoder.net" proxy="https://pre-newweb.educoder.net"
// proxy="https://test-newweb.educoder.net" proxy="https://test-newweb.educoder.net"
proxy="https://test-jupyterweb.educoder.net" // proxy="https://test-jupyterweb.educoder.net"
//proxy="http://192.168.2.63:3001" //proxy="http://192.168.2.63:3001"
// 在这里使用requestMap控制避免用户通过双击等操作发出重复的请求 // 在这里使用requestMap控制避免用户通过双击等操作发出重复的请求

@ -91,7 +91,7 @@ class NewMyShixunModel extends Component {
page: this.state.page, page: this.state.page,
per_page:10, per_page:10,
oj_status:null, oj_status:null,
exam_id:this.props.exam_id item_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id),
}; };
this.getdata(data); this.getdata(data);
@ -117,7 +117,7 @@ class NewMyShixunModel extends Component {
page: 1, page: 1,
per_page:10, per_page:10,
oj_status:null, oj_status:null,
exam_id:this.props.exam_id item_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id),
}; };
this.getdata(data); this.getdata(data);
} }
@ -141,7 +141,7 @@ class NewMyShixunModel extends Component {
page: 1, page: 1,
per_page:10, per_page:10,
oj_status:null, oj_status:null,
exam_id:this.props.exam_id item_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id),
}; };
this.getdata(data); this.getdata(data);
} }
@ -156,7 +156,7 @@ class NewMyShixunModel extends Component {
public: defaultActiveKey, public: defaultActiveKey,
page:1, page:1,
per_page:10, per_page:10,
exam_id:this.props.exam_id item_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id),
}; };
this.getdata(data); this.getdata(data);
@ -209,7 +209,7 @@ class NewMyShixunModel extends Component {
page: 1, page: 1,
per_page:10, per_page:10,
oj_status:null, oj_status:null,
exam_id:this.props.exam_id item_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id),
}; };
this.getdata(data); this.getdata(data);
@ -342,7 +342,7 @@ class NewMyShixunModel extends Component {
page: pageNumber, page: pageNumber,
per_page:10, per_page:10,
oj_status:this.state.oj_status, oj_status:this.state.oj_status,
exam_id:this.props.exam_id item_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id),
}; };
this.getdata(data); this.getdata(data);
@ -461,7 +461,7 @@ class NewMyShixunModel extends Component {
page:1, page:1,
per_page:10, per_page:10,
oj_status:null, oj_status:null,
exam_id:this.props.exam_id item_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id),
}; };
this.getdata(data); this.getdata(data);
@ -488,7 +488,7 @@ class NewMyShixunModel extends Component {
per_page:10, per_page:10,
keywords:null, keywords:null,
oj_status:null, oj_status:null,
exam_id:this.props.exam_id item_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id),
}; };
this.getdata(data); this.getdata(data);
@ -543,7 +543,7 @@ class NewMyShixunModel extends Component {
page: this.state.page, page: this.state.page,
per_page:10, per_page:10,
oj_status:this.state.oj_status, oj_status:this.state.oj_status,
exam_id:this.props.exam_id item_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id),
}; };
this.getdata(data); this.getdata(data);
@ -567,7 +567,7 @@ class NewMyShixunModel extends Component {
keywords: this.state.keywords, keywords: this.state.keywords,
page: this.state.page, page: this.state.page,
per_page:10, per_page:10,
exam_id:this.props.exam_id item_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id),
}; };
this.getdata(data); this.getdata(data);
} }
@ -593,7 +593,7 @@ class NewMyShixunModel extends Component {
keywords: this.state.keywords, keywords: this.state.keywords,
page: this.state.page, page: this.state.page,
per_page:10, per_page:10,
exam_id:this.props.exam_id item_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id),
}; };
this.getdata(data); this.getdata(data);
@ -639,7 +639,13 @@ class NewMyShixunModel extends Component {
//选用 //选用
getitem_baskets=(data)=>{ getitem_baskets=(data)=>{
//选用题型可以上传单个 或者多个题型 //选用题型可以上传单个 或者多个题型
let url="/examination_items.json"; let url="";
if(this.props.exam_id===undefined){
url="/item_baskets.json";
}else{
url="/examination_items.json";
}
axios.post(url, data) axios.post(url, data)
.then((result) => { .then((result) => {
@ -655,7 +661,7 @@ class NewMyShixunModel extends Component {
keywords: this.state.keywords, keywords: this.state.keywords,
page: this.state.page, page: this.state.page,
per_page:10, per_page:10,
exam_id:this.props.exam_id item_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id),
}; };
this.getdatasy(data); this.getdatasy(data);
this.getbasket_listdata(); this.getbasket_listdata();
@ -669,11 +675,15 @@ class NewMyShixunModel extends Component {
} }
// 撤销 // 撤销
getitem_basketss=(id)=>{ getitem_basketss=(id)=>{
//选用题型可以上传单个 或者多个题型 let url="";
let url=`/examination_banks/${id}/revoke_item.json`; if(this.props.exam_id===undefined){
url=`/item_baskets/${id}.json`;
}else{
url=`/examination_banks/${id}/revoke_item.json`;
}
axios.delete(url,{ data: { axios.delete(url,{ data: {
item_id:this.props.exam_id item_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id),
}}) }})
.then((result) => { .then((result) => {
if (result.data.status == 0) { if (result.data.status == 0) {
@ -688,7 +698,7 @@ class NewMyShixunModel extends Component {
keywords: this.state.keywords, keywords: this.state.keywords,
page: this.state.page, page: this.state.page,
per_page:10, per_page:10,
exam_id:this.props.exam_id item_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id),
}; };
this.getdatasy(data); this.getdatasy(data);
this.getbasket_listdata(); this.getbasket_listdata();
@ -729,7 +739,7 @@ class NewMyShixunModel extends Component {
} }
const data={ const data={
item_ids:item_idsdata, item_ids:item_idsdata,
exam_id:this.props.exam_id item_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id),
} }
this.getitem_baskets(data); this.getitem_baskets(data);
this.setState({ this.setState({
@ -758,7 +768,7 @@ class NewMyShixunModel extends Component {
keywords: this.state.keywords, keywords: this.state.keywords,
page: this.state.page, page: this.state.page,
per_page:10, per_page:10,
exam_id:this.props.exam_id item_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id),
}; };
this.getdata(data); this.getdata(data);
this.getbasket_listdata(); this.getbasket_listdata();
@ -796,7 +806,7 @@ class NewMyShixunModel extends Component {
page: this.state.page, page: this.state.page,
per_page:10, per_page:10,
oj_status:oj_status, oj_status:oj_status,
exam_id:this.props.exam_id item_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id),
}; };
this.getdata(data); this.getdata(data);
} }

@ -24,6 +24,7 @@ import JudquestionEditor from "./component/JudquestionEditor";
import Paperreview_item from "./Paperreview_item" import Paperreview_item from "./Paperreview_item"
import Bottomsubmit from "../../modules/modals/Bottomsubmit"; import Bottomsubmit from "../../modules/modals/Bottomsubmit";
import Comthetestpaperst from "./comthetestpaper/Comthetestpaperst"; import Comthetestpaperst from "./comthetestpaper/Comthetestpaperst";
import NewMyShixunModel from "../question/NewMyShixunModel";
//人工组卷预览 //人工组卷预览
class Paperreview extends Component { class Paperreview extends Component {
constructor(props) { constructor(props) {
@ -49,7 +50,7 @@ class Paperreview extends Component {
difficulty:null, difficulty:null,
name:null, name:null,
duration:null, duration:null,
newmyshixunmodelbool:false,
} }
// single_questions:null, 单选题 // single_questions:null, 单选题
@ -245,14 +246,50 @@ class Paperreview extends Component {
getcontentMdRef = (Ref) => { getcontentMdRef = (Ref) => {
this.contentMdRef = Ref; this.contentMdRef = Ref;
} }
setnewmyshixunmodelbool=(bool)=>{
if(bool===true){
let scrollToTop = window.setInterval(function() {
let pos = window.pageYOffset;
if ( pos > 0 ) {
window.scrollTo( 0, pos - 20 ); // how far to scroll on each step
} else {
window.clearInterval( scrollToTop );
}
}, 2);
}
this.setState({
newmyshixunmodelbool:bool
})
var data = {}
this.getdata(data);
}
render() { render() {
let {page, limit, count, Headertop, visible, placement, modalsType, item_type,Cohetepaperbool} = this.state; let {page, limit, count, Headertop, visible, placement, modalsType, item_type,Cohetepaperbool,newmyshixunmodelbool} = this.state;
const params = this.props && this.props.match && this.props.match.params; const params = this.props && this.props.match && this.props.match.params;
// //console.log(params); // //console.log(params);
return ( return (
<div> <div>
<div id={"Itembankstopid"} className="newMain clearfix intermediatecenter " <div id={"Itembankstopid"} className="newMain clearfix intermediatecenter "
> >
{
newmyshixunmodelbool===true?
<style>{
`
body{ overflow: hidden !important; }
`
}</style>
:""
}
{
newmyshixunmodelbool===true?
<div className="fangdatwo">
<NewMyShixunModel exam_id={this.props.match.params.id} setnewmyshixunmodelbool={(e)=>this.setnewmyshixunmodelbool(e)}></NewMyShixunModel>
</div>
:
""
}
<style> <style>
{ {
@ -284,7 +321,7 @@ class Paperreview extends Component {
{ {
Cohetepaperbool===false? Cohetepaperbool===false?
<Paperreview_item {...this.state} {...this.props} getdata={(data)=>this.getdata(data)}> <Paperreview_item {...this.state} {...this.props} getdata={(data)=>this.getdata(data)} setnewmyshixunmodelbool={(e)=>this.setnewmyshixunmodelbool(e)}>
</Paperreview_item> </Paperreview_item>
: :

@ -430,7 +430,7 @@ class Paperreview_item extends Component {
<p className="ml58 questionstotal lh34">总分{this.props.all_questions_count}</p> <p className="ml58 questionstotal lh34">总分{this.props.all_questions_count}</p>
</div> </div>
<div className="w30s xaxisreverseorder"> <div className="w30s xaxisreverseorder">
<div className="jixuxuanti xiaoshou" onClick={() => this.jixuxuantioncli()}> <div className="jixuxuanti xiaoshou" onClick={() => this.props.setnewmyshixunmodelbool(true)}>
继续选题 继续选题
</div> </div>
</div> </div>

@ -882,7 +882,6 @@ class Question extends Component {
/> />
{/*头部*/} {/*头部*/}
<Contentpart {...this.state} {...this.props} <Contentpart {...this.state} {...this.props}
getitem_basketss={(id)=>this.getitem_basketss(id)} getitem_basketss={(id)=>this.getitem_basketss(id)}
selectallquestionsonthispage={()=>this.selectallquestionsonthispage()} selectallquestionsonthispage={()=>this.selectallquestionsonthispage()}
getitem_baskets={(e)=>this.getitem_baskets(e)} getitem_baskets={(e)=>this.getitem_baskets(e)}

@ -309,7 +309,7 @@ class ChoquesEditor extends Component{
{/* 点击设置答案 */} {/* 点击设置答案 */}
{/* TODO 加了tooltip后会丢失掉span的class */} {/* TODO 加了tooltip后会丢失掉span的class */}
{/* <Tooltip title={standard_answers[index] ? '点击取消标准答案设置' : '点击设置为标准答案'}> */} {/* <Tooltip title={standard_answers[index] ? '点击取消标准答案设置' : '点击设置为标准答案'}> */}
<span class={`option-item fr mr10 color-grey select-choice ${bg} `} <span className={`option-item fr mr10 color-grey select-choice ${bg} `}
name="option_span" onClick={() => this.onOptionClick(index)} style={{flex: '0 0 38px'}}> name="option_span" onClick={() => this.onOptionClick(index)} style={{flex: '0 0 38px'}}>
<ConditionToolTip title={standard_answers[index] ? '点击取消标准答案设置' : '点击设置为标准答案'} placement="left" condition={true}> <ConditionToolTip title={standard_answers[index] ? '点击取消标准答案设置' : '点击设置为标准答案'} placement="left" condition={true}>
<div style={{width: '100%', height: '100%'}}>{tagArray[index]}</div> <div style={{width: '100%', height: '100%'}}>{tagArray[index]}</div>

@ -176,7 +176,8 @@ class Contentpart extends Component {
{ {
defaultActiveKey===0||defaultActiveKey==="0"? defaultActiveKey===0||defaultActiveKey==="0"?
<Search <Search
style={{ width: "347px",marginRight:"30px"}} style={{ marginRight:"30px"}}
className={"xaxisreverseorder searchwidth"}
placeholder="请输入题目名称、内容" placeholder="请输入题目名称、内容"
enterButton enterButton
size="large" size="large"
@ -184,7 +185,7 @@ class Contentpart extends Component {
onSearch={ (value)=>this.props.setdatafuns(value)} /> onSearch={ (value)=>this.props.setdatafuns(value)} />
: :
<Search <Search
style={{ width: "347px"}} className={"xaxisreverseorder searchwidth"}
placeholder="请输入题目名称、内容" placeholder="请输入题目名称、内容"
enterButton enterButton
size="large" size="large"

@ -519,31 +519,28 @@ class Itembankstop extends Component {
} }
<Form onSubmit={this.handleSubmit}> <Form onSubmit={this.handleSubmit}>
<div className="sortinxdirection">
<Form.Item <Form.Item
label="课程" label="课程"
> >
{getFieldDecorator("rbkc", {getFieldDecorator("rbkc",
{ {initialValue: this.state.rbkc,
rules: [{required: true, message: '请选择课程'}], rules: [{required: true, message: '请选择课程'}],
} }
)( )(
<div className="sortinxdirection">
<InputGroup > <Cascader style={{width: '270px'}} options={options} onChange={this.handleFormzhishidian}
<Cascader style={{width: '270px'}} value={this.state.rbkc} options={options} onChange={this.handleFormzhishidian}
placeholder="请选择..."/> placeholder="请选择..."/>
</InputGroup>
</div>
)} )}
</Form.Item> </Form.Item>
</div>
<Form.Item <Form.Item
label="知识点" label="知识点"
> >
{getFieldDecorator("rbzsd" {getFieldDecorator("rbzsd"
)( )(
<div className="sortinxdirection"> <div className="sortinxdirection">
<InputGroup >
<Select style={{width: '270px'}} value={undefined} onChange={this.handleFormkechen} <Select style={{width: '270px'}} value={undefined} onChange={this.handleFormkechen}
placeholder="请选择..."> placeholder="请选择...">
{knowledgepoints2 && knowledgepoints2.map((object, index) => { {knowledgepoints2 && knowledgepoints2.map((object, index) => {
@ -552,11 +549,10 @@ class Itembankstop extends Component {
) )
})} })}
</Select> </Select>
</InputGroup>
<img className=" ml22 zjzsdian xiaoshou" src={getImageUrl("/images/educoder/zjzsd.png")} onClick={()=>this.NewknTypedeldel(true)}/> <img className=" ml22 zjzsdian xiaoshou" src={getImageUrl("images/educoder/zjzsd.png")} onClick={()=>this.NewknTypedeldel(true)}/>
<div className="sortinxdirection" style={{ <div className="sortinxdirection" style={{
@ -572,7 +568,7 @@ class Itembankstop extends Component {
}}> }}>
<p className="w100s stestcen lh32">{object.name}</p> <p className="w100s stestcen lh32">{object.name}</p>
<img className=" ml7 zjzsdian xiaoshou icondowncolorssy" onClick={() => this.deletesobject(object, index)} src={getImageUrl("/images/educoder/bzucha.png")}/> <img className=" ml7 zjzsdian xiaoshou icondowncolorssy" onClick={() => this.deletesobject(object, index)} src={getImageUrl("images/educoder/bzucha.png")}/>
</div> </div>
) )
@ -590,19 +586,18 @@ class Itembankstop extends Component {
label="题型" label="题型"
> >
{getFieldDecorator("rbtx", {getFieldDecorator("rbtx",
{ {initialValue: this.state.rbtx,
rules: [{required: true, message: '请选择题型'}], rules: [{required: true, message: '请选择题型'}],
} }
)( )(
<InputGroup > <Select style={{width: '270px'}} onChange={this.handleFormtixing}
<Select style={{width: '270px'}} value={this.state.rbtx} onChange={this.handleFormtixing}
placeholder="请选择..."> placeholder="请选择...">
<Option value="PROGRAM">编程题</Option>
<Option value="SINGLE">单选题</Option> <Option value="SINGLE">单选题</Option>
<Option value="MULTIPLE">多选题</Option> <Option value="MULTIPLE">多选题</Option>
<Option value="JUDGMENT">判断题</Option> <Option value="JUDGMENT">判断题</Option>
<Option value="PROGRAM">编程题</Option>
</Select> </Select>
</InputGroup>
)} )}
</Form.Item> </Form.Item>
@ -663,11 +658,11 @@ class Itembankstop extends Component {
<div className="rbndclass"> <div className="rbndclass">
<Form.Item label="难度"> <Form.Item label="难度">
{getFieldDecorator('rbnd', {getFieldDecorator('rbnd',
{ {initialValue: this.state.rbnd,
rules: [{required: true, message: '请选择难度'}], rules: [{required: true, message: '请选择难度'}],
} }
)( )(
<Radio.Group initialValue={this.state.rbnd} onChange={this.handleFormLayoutChange}> <Radio.Group onChange={this.handleFormLayoutChange}>
<Radio.Button value="1">简单</Radio.Button> <Radio.Button value="1">简单</Radio.Button>
<Radio.Button value="2">适中</Radio.Button> <Radio.Button value="2">适中</Radio.Button>
<Radio.Button value="3">困难</Radio.Button> <Radio.Button value="3">困难</Radio.Button>

@ -37,9 +37,18 @@ class Listjihe extends Component {
//选用 //选用
Selectingpracticaltraining=(id)=>{ Selectingpracticaltraining=(id)=>{
let data={ let data={}
item_ids:[id] if(this.props.exam_id===undefined){
} data={
item_ids:[id]
}
}else{
data={
item_ids:[id],
exam_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id),
}
}
this.props.getitem_baskets(data); this.props.getitem_baskets(data);
} }
//撤销 //撤销
@ -184,8 +193,8 @@ class Listjihe extends Component {
{ {
items.choosed===true? items.choosed===true?
<p className="selectionss xiaoshou" onClick={()=>this.Selectingpracticaltrainings(items.id)}> <p className="selectionss xiaoshou" onClick={()=>this.Selectingpracticaltrainings(items.id)}>
<i className="iconfont icon-jianhao font-12 lg ml7 lh30 icontianjiadaohangcolor mr10"></i> <i className="iconfont icon-jianhao font-12 lg ml7 lh30 icontianjiadaohangcolor mr5"></i>
<span>撤销</span></p> <span className="mr15 lh30">撤销</span></p>
: :
items.item_type==="PROGRAM"? items.item_type==="PROGRAM"?
items.program_attr.status===0? items.program_attr.status===0?

@ -393,7 +393,23 @@ class Comthetestpapers extends Component {
.ant-select-selection{ .ant-select-selection{
height: 33px !important; height: 33px !important;
} }
.ant-input-group{ .kechen .ant-input-group{
width:258px !important;
}
.zsdd .ant-input-group{
width:258px !important;
}
.sjmc .ant-input-group{
width:258px !important;
}
.kssc .ant-input-group{
width:258px !important;
}
.rbndclass .ant-input-group{
width:258px !important; width:258px !important;
} }
.ant-input { .ant-input {

@ -575,7 +575,23 @@ class Comthetestpaperst extends Component {
.ant-select-selection{ .ant-select-selection{
height: 33px !important; height: 33px !important;
} }
.ant-input-group{ .kechen .ant-input-group{
width:258px !important;
}
.zsdd .ant-input-group{
width:258px !important;
}
.sjmc .ant-input-group{
width:258px !important;
}
.kssc .ant-input-group{
width:258px !important;
}
.rbndclass .ant-input-group{
width:258px !important; width:258px !important;
} }
.ant-input { .ant-input {
@ -600,24 +616,24 @@ class Comthetestpaperst extends Component {
} }
<Form onSubmit={this.handleSubmit}> <Form onSubmit={this.handleSubmit}>
<div className="kechen">
<div className="sortinxdirection">
<Form.Item <Form.Item
label="课程" label="课程"
> >
{getFieldDecorator("rbkc", {getFieldDecorator("rbkc"
{ ,
{initialValue: this.state.rbkc,
rules: [{required: true, message: '请选择课程'}], rules: [{required: true, message: '请选择课程'}],
} }
)( )(
<div className="sortinxdirection"> <Cascader style={{width: '258px'}} options={options} onChange={this.handleFormzhishidian}
<InputGroup compact>
<Cascader style={{width: '258px'}} value={this.state.rbkc} options={options} onChange={this.handleFormzhishidian}
placeholder="请选择..."/> placeholder="请选择..."/>
</InputGroup>
</div>
)} )}
</Form.Item> </Form.Item>
</div>
</div>
<div className="zsdd">
<Form.Item <Form.Item
label="知识点" label="知识点"
> >
@ -666,7 +682,7 @@ class Comthetestpaperst extends Component {
</div> </div>
)} )}
</Form.Item> </Form.Item>
</div>
<style> <style>
{ {
` `
@ -791,12 +807,13 @@ class Comthetestpaperst extends Component {
</style> </style>
<div className="rbndclass"> <div className="rbndclass">
<Form.Item label="难度"> <Form.Item label="难度">
{getFieldDecorator('rbnd', {getFieldDecorator('rbnd'
{ ,
{initialValue: this.state.rbnd,
rules: [{required: true, message: '请选择难度'}], rules: [{required: true, message: '请选择难度'}],
} }
)( )(
<Radio.Group initialValue={this.state.rbnd} onChange={this.handleFormLayoutChange}> <Radio.Group onChange={this.handleFormLayoutChange}>
<Radio.Button value="1">简单</Radio.Button> <Radio.Button value="1">简单</Radio.Button>
<Radio.Button value="2">适中</Radio.Button> <Radio.Button value="2">适中</Radio.Button>
<Radio.Button value="3">困难</Radio.Button> <Radio.Button value="3">困难</Radio.Button>

@ -928,7 +928,6 @@
height: 100%; height: 100%;
overflow-y: scroll !important; overflow-y: scroll !important;
width: 100%; width: 100%;
margin-top: 60px !important;
position: fixed; position: fixed;
top:0px; top:0px;
bottom: 0px; bottom: 0px;
@ -936,3 +935,7 @@
z-index: 999999; z-index: 999999;
right: 0px; right: 0px;
} }
.searchwidth{
width: 347px !important;
}

@ -22,8 +22,10 @@ import Paperlibraryseeid_item from './component/Paperlibraryseeid_item';
import Comthetestpaperst from '../question/comthetestpaper/Comthetestpaperst'; import Comthetestpaperst from '../question/comthetestpaper/Comthetestpaperst';
import Paperlibraryseeid_itemss from './component/Paperlibraryseeid_itemss'; import Paperlibraryseeid_itemss from './component/Paperlibraryseeid_itemss';
import JudquestionEditor from "../question/component/JudquestionEditor"; import JudquestionEditor from "../question/component/JudquestionEditor";
import NewMyShixunModel from "../question/NewMyShixunModel" import NewMyShixunModel from "../question/NewMyShixunModel";
//人工组卷预览
//试卷编辑
class Paperlibraryeditid extends Component { class Paperlibraryeditid extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
@ -187,9 +189,20 @@ class Paperlibraryeditid extends Component {
} }
setnewmyshixunmodelbool=(bool)=>{ setnewmyshixunmodelbool=(bool)=>{
if(bool===true){
let scrollToTop = window.setInterval(function() {
let pos = window.pageYOffset;
if ( pos > 0 ) {
window.scrollTo( 0, pos - 20 ); // how far to scroll on each step
} else {
window.clearInterval( scrollToTop );
}
}, 2);
}
this.setState({ this.setState({
newmyshixunmodelbool:bool newmyshixunmodelbool:bool
}) })
this.getdata();
} }
render() { render() {

Loading…
Cancel
Save