dev_aliyun2
杨树林 6 years ago committed by harry
parent f16eed64d4
commit 76d86f7398

@ -50,9 +50,43 @@ class Contentpart extends Component {
}) })
} }
chakanjiexibool = (index) => { chakanjiexibool=(index)=>{
this.props.chakanjiexibool(index); if(this.props.current_user.professional_certification===false){
this.HideAddcoursestypess(2);
return
}
this.props.chakanjiexibool(index);
}
showmodels=(e)=>{
if(this.props.current_user.professional_certification===false){
this.HideAddcoursestypess(2);
return
}
this.props.showmodels(e)
} }
showmodelsInaudit=(e)=>{
if(this.props.current_user.professional_certification===false){
this.HideAddcoursestypess(2);
return
}
this.props.showmodelsInaudit(e)
}
showmodelysl=(e)=>{
if(this.props.current_user.professional_certification===false){
this.HideAddcoursestypess(2);
return
}
this.props.showmodelysl(e)
}
componentDidUpdate(prevProps) { componentDidUpdate(prevProps) {
if(prevProps.current_user !== this.props.current_user) { if(prevProps.current_user !== this.props.current_user) {
@ -248,7 +282,7 @@ class Contentpart extends Component {
{ {
isysladmins===true||(is_teacher===true&&professional_certification===true)? isysladmins===true||is_teacher===true?
<Tabs activeKey={defaultActiveKeys} onChange={(e)=>this.props.callback(e)}> <Tabs activeKey={defaultActiveKeys} onChange={(e)=>this.props.callback(e)}>
<TabPane tab="公共" key="1"> <TabPane tab="公共" key="1">
</TabPane> </TabPane>
@ -293,69 +327,69 @@ class Contentpart extends Component {
` `
} }
</style> </style>
<div className="xaxisreverseorder"> <div className="xaxisreverseorder">
{ {
defaultActiveKey === 0 || defaultActiveKey === "0" ? defaultActiveKey===0||defaultActiveKey==="0"?
isysladmins === true || (is_teacher === true && professional_certification === true) ? isysladmins===true||is_teacher===true?
this.props.Isitapopup && this.props.Isitapopup === "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>
</div> </div>
</a> </a>
: "" :""
: "" :""
} }
{item_type === "PROGRAM" ? {item_type==="PROGRAM"?
defaultActiveKey === 0 || defaultActiveKey === "0" ? defaultActiveKey===0||defaultActiveKey==="0"?
<Popover getPopupContainer={trigger => trigger.parentNode} placement="bottom" trigger="hover" content={contents} onVisibleChange={() => this.props.handleVisibleChange(true)}> <Popover getPopupContainer={trigger => trigger.parentNode} placement="bottom" trigger="hover" content={contents} onVisibleChange={()=>this.props.handleVisibleChange(true)}>
<div className=" sortinxdirection mr30"> <div className=" sortinxdirection mr30">
<div className="subjecttit"> <div className="subjecttit">
全部 全部
</div>
<i className="iconfont icon-sanjiaoxing-down font-12 lg ml7 icondowncolor"></i>
</div> </div>
</Popover> <i className="iconfont icon-sanjiaoxing-down font-12 lg ml7 icondowncolor"></i>
: </div>
"" : "" </Popover>
} :
"":""
}
{
defaultActiveKey === 0 || defaultActiveKey === "0" ?
this.props.Isitapopup && this.props.Isitapopup === "true" ? {
<Search defaultActiveKey===0||defaultActiveKey==="0"?
style={isysladmins === true || (is_teacher === true && professional_certification) ? { marginRight: "0px" } : { marginRight: "0px" }} this.props.Isitapopup&&this.props.Isitapopup==="true"?
className={"xaxisreverseorder searchwidth"} <Search
placeholder="请输入题目名称、内容" style={isysladmins===true||is_teacher===true?{ marginRight:"0px"}:{marginRight:"0px"}}
enterButton className={"xaxisreverseorder searchwidth"}
size="large" placeholder="请输入题目名称、内容"
onInput={(e) => this.props.setdatafunsval(e)} enterButton
onSearch={(value) => this.props.setdatafuns(value)} /> size="large"
: onInput={(e)=>this.props.setdatafunsval(e)}
<Search onSearch={ (value)=>this.props.setdatafuns(value)} />
style={{ marginRight: "30px" }} :
className={"xaxisreverseorder searchwidth"} <Search
placeholder="请输入题目名称、内容" style={isysladmins===true||is_teacher===true?{ marginRight:"30px"}:{marginRight:"0px"}}
enterButton className={"xaxisreverseorder searchwidth"}
size="large" placeholder="请输入题目名称、内容"
onInput={(e) => this.props.setdatafunsval(e)} enterButton
onSearch={(value) => this.props.setdatafuns(value)} /> size="large"
: onInput={(e)=>this.props.setdatafunsval(e)}
<Search onSearch={ (value)=>this.props.setdatafuns(value)} />
className={"xaxisreverseorder searchwidth"} :
placeholder="请输入题目名称、内容" <Search
enterButton className={"xaxisreverseorder searchwidth"}
size="large" placeholder="请输入题目名称、内容"
onInput={(e) => this.props.setdatafunsval(e)} enterButton
onSearch={(value) => this.props.setdatafuns(value)} /> size="large"
} onInput={(e)=>this.props.setdatafunsval(e)}
onSearch={ (value)=>this.props.setdatafuns(value)} />
</div> }
</div>
</div> </div>
</div> </div>
@ -402,9 +436,9 @@ class Contentpart extends Component {
pages={this.props.pages} pages={this.props.pages}
getitem_basketss={(id)=>this.props.getitem_basketss(id)} getitem_basketss={(id)=>this.props.getitem_basketss(id)}
getitem_baskets={(e)=>this.props.getitem_baskets(e)} getitem_baskets={(e)=>this.props.getitem_baskets(e)}
showmodels={(e)=>this.props.showmodels(e)} showmodels={(e)=>this.showmodels(e)}
showmodelysl={(e)=>this.props.showmodelysl(e)} showmodelysl={(e)=>this.showmodelysl(e)}
showmodelsInaudit={(e)=>this.props.showmodelsInaudit(e)} showmodelsInaudit={(e)=>this.showmodelsInaudit(e)}
handleShowUploadImage={(e)=>this.handleShowUploadImage(e)} handleShowUploadImage={(e)=>this.handleShowUploadImage(e)}
handleClose={()=>this.handleClose()} handleClose={()=>this.handleClose()}

@ -7,6 +7,7 @@ import {
} from "antd"; } from "antd";
import './../questioncss/questioncom.css'; import './../questioncss/questioncom.css';
import QuillForEditor from "../../../common/quillForEditor"; import QuillForEditor from "../../../common/quillForEditor";
import Certifiedprofessional from "../../modals/Certifiedprofessional";
const tagArray = [ const tagArray = [
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
@ -26,7 +27,9 @@ class Listjihe extends Component {
page: 1, page: 1,
name: "单选题", name: "单选题",
nd: "简单", nd: "简单",
url: "" url: "",
mydisplay:false,
occupation:2,
} }
} }
@ -73,10 +76,29 @@ class Listjihe extends Component {
} }
seturls(url){
if(this.props.current_user.professional_certification===false){
this.HideAddcoursestypess(2);
return
}
this.props.history.replace(url);
}
HideAddcoursestypess=(i)=>{
console.log("调用了");
this.setState({
mydisplay:true,
occupation:i,
})
}
mydisplayHidedel=()=>{
this.setState({
mydisplay:false,
})
}
render() { render() {
let {page, name, nd,url} = this.state; let {page, name, nd,url,mydisplay} = this.state;
let {defaultActiveKey, items, listjihe, chakanjiexiboolindex, keindex} = this.props; let {defaultActiveKey, items, listjihe, chakanjiexiboolindex, keindex} = this.props;
// 编程答案 // 编程答案
@ -207,6 +229,27 @@ class Listjihe extends Component {
<div key={keindex} <div key={keindex}
className={chakanjiexiboolindex === keindex ? "w100s borderwds283 pd20 mb20 listjihecolors" : "w100s borderwds pd20 mb20 listjihecolors"}> className={chakanjiexiboolindex === keindex ? "w100s borderwds283 pd20 mb20 listjihecolors" : "w100s borderwds pd20 mb20 listjihecolors"}>
{/*顶部*/} {/*顶部*/}
{
mydisplay===true?
<Certifiedprofessional {...this.props} {...this.state} ModalCancelsy={this.mydisplayHidedel} />
:""
}
{
mydisplay===true?
<style>
{
`
body{
overflow:hidden!important;
}
`
}
</style>
:""
}
<style> <style>
{ {
` `
@ -258,7 +301,7 @@ class Listjihe extends Component {
</div> </div>
{ {
items.item_type==="PROGRAM"? items.item_type==="PROGRAM"?
<a href={`/problems/${items.program_attr.identifier}/edit`}> <a onClick={()=>this.seturls(`/problems/${items.program_attr.identifier}/edit`)} >
<div className="ml10 w100s " style={{wordBreak: "break-word",fontWeight:"bold"}} dangerouslySetInnerHTML={{__html: markdownToHTML(items&&items.name).replace(/▁/g, "▁▁▁")}}></div> <div className="ml10 w100s " style={{wordBreak: "break-word",fontWeight:"bold"}} dangerouslySetInnerHTML={{__html: markdownToHTML(items&&items.name).replace(/▁/g, "▁▁▁")}}></div>
</a> </a>
: :
@ -433,7 +476,7 @@ class Listjihe extends Component {
this.props.Isitapopup&&this.props.Isitapopup==="true"? this.props.Isitapopup&&this.props.Isitapopup==="true"?
"" ""
: :
<a href={`/problems/${items.program_attr.identifier}/edit?editoj=1&pages=`+this.props.pages}> <a onClick={()=>this.seturls(`/problems/${items.program_attr.identifier}/edit?editoj=1&pages=`+this.props.pages)}>
<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>
<span>编辑</span> <span>编辑</span>
@ -443,7 +486,7 @@ class Listjihe extends Component {
this.props.Isitapopup&&this.props.Isitapopup==="true"? this.props.Isitapopup&&this.props.Isitapopup==="true"?
"" ""
: :
<a href={`/question/edit/${items.id}`}> <a onClick={()=>this.seturls(`/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>
<span>编辑</span> <span>编辑</span>
@ -505,7 +548,7 @@ class Listjihe extends Component {
items.item_type === "PROGRAM" ? items.item_type === "PROGRAM" ?
"" ""
: :
<p className="viewparsings mr25" onClick={() => this.props.chakanjiexibool(keindex)}> <p className="viewparsings xiaoshou mr25" onClick={() => this.props.chakanjiexibool(keindex)}>
<i className="iconfont icon-jiexi font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i> <i className="iconfont icon-jiexi font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
查看解析</p> 查看解析</p>
} }

Loading…
Cancel
Save