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

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

@ -7,6 +7,7 @@ import {
} from "antd";
import './../questioncss/questioncom.css';
import QuillForEditor from "../../../common/quillForEditor";
import Certifiedprofessional from "../../modals/Certifiedprofessional";
const tagArray = [
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
@ -26,7 +27,9 @@ class Listjihe extends Component {
page: 1,
name: "单选题",
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() {
let {page, name, nd,url} = this.state;
let {page, name, nd,url,mydisplay} = this.state;
let {defaultActiveKey, items, listjihe, chakanjiexiboolindex, keindex} = this.props;
// 编程答案
@ -207,6 +229,27 @@ class Listjihe extends Component {
<div key={keindex}
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>
{
`
@ -258,7 +301,7 @@ class Listjihe extends Component {
</div>
{
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>
</a>
:
@ -433,7 +476,7 @@ class Listjihe extends Component {
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">
<i className="iconfont icon-bianji2 font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
<span>编辑</span>
@ -443,7 +486,7 @@ class Listjihe extends Component {
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">
<i className="iconfont icon-bianji2 font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
<span>编辑</span>
@ -505,7 +548,7 @@ class Listjihe extends Component {
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>
查看解析</p>
}

Loading…
Cancel
Save