Merge branch 'dev_item_bank' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_new_shixunsrepository

dev_new_shixunsrepository
杨树林 5 years ago
commit e1a204855d

@ -930,6 +930,7 @@ class NewMyShixunModel extends Component {
{/*头部*/} {/*头部*/}
<Contentpart {...this.state} {...this.props} <Contentpart {...this.state} {...this.props}
exam_id={this.props.exam_id} exam_id={this.props.exam_id}
Isitapopup={"true"}
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)}

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

@ -214,6 +214,9 @@ class Contentpart extends Component {
{ {
defaultActiveKey===0||defaultActiveKey==="0"? defaultActiveKey===0||defaultActiveKey==="0"?
isysladmins===true||(is_teacher===true&&professional_certification===true)? isysladmins===true||(is_teacher===true&&professional_certification===true)?
this.props.Isitapopup&&this.props.Isitapopup==="true"?
""
:
<a onClick={(e)=>this.xinzenw(e)}> <a onClick={(e)=>this.xinzenw(e)}>
<div className="newbutoon"> <div className="newbutoon">
<p className="newbutoontes" >新增</p> <p className="newbutoontes" >新增</p>
@ -241,6 +244,16 @@ class Contentpart extends Component {
{ {
defaultActiveKey===0||defaultActiveKey==="0"? 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 <Search
style={isysladmins===true||(is_teacher===true&&professional_certification)?{ marginRight:"30px"}:{marginRight:"0px"}} style={isysladmins===true||(is_teacher===true&&professional_certification)?{ marginRight:"30px"}:{marginRight:"0px"}}
className={"xaxisreverseorder searchwidth"} className={"xaxisreverseorder searchwidth"}
@ -296,6 +309,7 @@ class Contentpart extends Component {
: this.props.Contentdata.items.map((object, index) => { : this.props.Contentdata.items.map((object, index) => {
return ( return (
<Listjihe {...this.state} {...this.props} <Listjihe {...this.state} {...this.props}
Isitapopup={this.props.Isitapopup}
chakanjiexiboolindex={this.props.chakanjiexiboolindex} chakanjiexiboolindex={this.props.chakanjiexiboolindex}
chakanjiexibool={(keindex)=>this.chakanjiexibool(keindex)} chakanjiexibool={(keindex)=>this.chakanjiexibool(keindex)}
listjihe={index+1} listjihe={index+1}

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

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

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

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

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

Loading…
Cancel
Save