题库优化

dev_new_shixunsrepository
杨树林 5 years ago
parent 3324ca4b52
commit d513e7a5fd

@ -930,6 +930,7 @@ class NewMyShixunModel extends Component {
{/*头部*/}
<Contentpart {...this.state} {...this.props}
exam_id={this.props.exam_id}
Isitapopup={"true"}
getitem_basketss={(id)=>this.getitem_basketss(id)}
selectallquestionsonthispage={()=>this.selectallquestionsonthispage()}
getitem_baskets={(e)=>this.getitem_baskets(e)}

@ -907,6 +907,7 @@ class Question extends Component {
/>
{/*头部*/}
<Contentpart {...this.state} {...this.props}
Isitapopup={"false"}
chakanjiexiboolindex={this.state.chakanjiexiboolindex}
chakanjiexibool={(e)=>this.chakanjiexibool(e)}
getitem_basketss={(id)=>this.getitem_basketss(id)}

@ -214,11 +214,14 @@ class Contentpart extends Component {
{
defaultActiveKey===0||defaultActiveKey==="0"?
isysladmins===true||(is_teacher===true&&professional_certification===true)?
<a onClick={(e)=>this.xinzenw(e)}>
<div className="newbutoon">
<p className="newbutoontes" >新增</p>
</div>
</a>
this.props.Isitapopup&&this.props.Isitapopup==="true"?
""
:
<a onClick={(e)=>this.xinzenw(e)}>
<div className="newbutoon">
<p className="newbutoontes" >新增</p>
</div>
</a>
:""
:""
}
@ -241,6 +244,16 @@ class Contentpart extends Component {
{
defaultActiveKey===0||defaultActiveKey==="0"?
this.props.Isitapopup&&this.props.Isitapopup==="true"?
<Search
style={isysladmins===true||(is_teacher===true&&professional_certification)?{ marginRight:"0px"}:{marginRight:"0px"}}
className={"xaxisreverseorder searchwidth"}
placeholder="请输入题目名称、内容"
enterButton
size="large"
onInput={(e)=>this.props.setdatafunsval(e)}
onSearch={ (value)=>this.props.setdatafuns(value)} />
:
<Search
style={isysladmins===true||(is_teacher===true&&professional_certification)?{ marginRight:"30px"}:{marginRight:"0px"}}
className={"xaxisreverseorder searchwidth"}
@ -296,6 +309,7 @@ class Contentpart extends Component {
: this.props.Contentdata.items.map((object, index) => {
return (
<Listjihe {...this.state} {...this.props}
Isitapopup={this.props.Isitapopup}
chakanjiexiboolindex={this.props.chakanjiexiboolindex}
chakanjiexibool={(keindex)=>this.chakanjiexibool(keindex)}
listjihe={index+1}

@ -13,7 +13,7 @@ import {
Input,
Select,
Cascader,
Col, Row, InputNumber, DatePicker, AutoComplete, Button, Tag
Col, Row, InputNumber, DatePicker, AutoComplete, Button, Tag,Tooltip
} from "antd";
import './../questioncss/questioncom.css';
import Newknledpots from './Newknledpots'
@ -57,6 +57,7 @@ class Itembankstop extends Component {
options: [],
NewknTypedel:false,
boolred:false,
boolnews:false,
}
}
@ -71,6 +72,23 @@ class Itembankstop extends Component {
//初始化
componentDidMount() {
const params = this.props && this.props.match && this.props.match.params;
if (JSON.stringify(params) === "{}") {
// "新增"
this.setState({
boolnews:false,
})
} else {
if(params){
if( params.id){
this.setState({
boolnews:true,
})
}
}
}
try {
this.props.getcontentMdRef(this);
@ -754,6 +772,8 @@ class Itembankstop extends Component {
}
<Form.Item
label="题型"
>
@ -762,18 +782,16 @@ class Itembankstop extends Component {
rules: [{required: true, message: '请选择题型'}],
}
)(
<Select style={{width: '270px'}} onChange={this.handleFormtixing}
<Select style={{width: '270px'}} disabled={this.state.boolnews} onChange={this.handleFormtixing}
placeholder="请选择...">
<Option value="PROGRAM">编程题</Option>
<Option value="SINGLE">单选题</Option>
<Option value="MULTIPLE">多选题</Option>
<Option value="JUDGMENT">判断题</Option>
</Select>
)}
</Form.Item>
<style>
{
`

@ -352,6 +352,9 @@ class Listjihe extends Component {
</p>
{
items.item_type === "PROGRAM" ?
this.props.Isitapopup&&this.props.Isitapopup==="true"?
""
:
<a href={`/problems/${items.program_attr.identifier}/edit`}>
<p className="viewparsings xiaoshou mr25">
<i className="iconfont icon-bianji2 font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
@ -359,6 +362,9 @@ class Listjihe extends Component {
</p>
</a>
:
this.props.Isitapopup&&this.props.Isitapopup==="true"?
""
:
<a href={`/question/edit/${items.id}`}>
<p className="viewparsings xiaoshou mr25">
<i className="iconfont icon-bianji2 font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>

@ -443,6 +443,7 @@ class Testpaperlibrary extends Component {
<Contentpart
{...this.props}
{...this.state}
Isitapopup={"false"}
Testpapereditor={(e)=>this.Testpapereditor(e)}
setdifficulty={(e)=>this.setdifficulty(e)}
showmodels={(e)=>this.showmodels(e)}

@ -221,6 +221,7 @@ class Contentpart extends Component {
Testpapereditor={(e)=>this.props.Testpapereditor(e)}
showmodels={(e)=>this.props.showmodels(e)}
showmodelysl={(e)=>this.props.showmodelysl(e)}
Isitapopup={this.props.Isitapopup}
>
</Listjihe>

@ -114,12 +114,18 @@ class Listjihe extends Component {
<i className="iconfont icon-shanchu1 font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
<span>删除</span>
</p>
<a >
<p className="viewparsings xiaoshou mr25 " onClick={()=>this.props.Testpapereditor(items.id)}>
<i className="iconfont icon-bianji2 font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
<span>编辑</span>
</p>
</a>
{
this.props.Isitapopup&&this.props.Isitapopup==="true"?
""
:
<a >
<p className="viewparsings xiaoshou mr25 " onClick={()=>this.props.Testpapereditor(items.id)}>
<i className="iconfont icon-bianji2 font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
<span>编辑</span>
</p>
</a>
}
{
items.public === false ?
<p className="viewparsings xiaoshou mr25 " onClick={() => this.props.showmodels(items.id)}>

Loading…
Cancel
Save