Merge branch 'develop' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

courseware
杨树林 5 years ago
commit b4391a012f

@ -44,7 +44,7 @@ if (isDev) {
// 超管
debugType = "admin";
// 老师
// debugType="teacher";
debugType="teacher";
// 学生
// debugType="student";

@ -269,6 +269,23 @@ class Listjihe extends Component {
}
const types = questionType.filter(item=>item.type === items.item_type);
let Periofters = false;
let Perioftersbols=false;
if (this.props) {
if (this.props.current_user) {
if (this.props.current_user.admin) {
Periofters = true;
}
else if (this.props.current_user.business) {
Perioftersbols = true;
}
}
}
// console.log(this.props);
// console.log("PerioftersPerioftersbols");
// console.log(Periofters);
// console.log(Perioftersbols);
return (
<div key={keindex}
className={chakanjiexiboolindex === keindex ? "w100s borderwds283 pd20 mb20 listjihecolors" : "borderwds pd20 mb20 listjihecolors"}>
@ -595,7 +612,65 @@ class Listjihe extends Component {
}
</div>
: ""
:
//公开需要权限
Periofters===true?
//管理员
<div className="xaxisreverseorder">
<p className="viewparsings xiaoshou mr25" onClick={() => this.props.showmodelysl(items.id)}>
<i className="iconfont icon-shanchu1 font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
<span>删除</span>
</p>
{
items.item_type === "PROGRAM" ?
this.props.Isitapopup&&this.props.Isitapopup==="true"?
""
:
<a onClick={()=>this.seturls(`/problems/${items.program_attr.identifier}/edit`)}>
<p className="viewparsings xiaoshou mr25">
<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 onClick={()=>this.seturls(`/problemset/edit/${items.id}`)}>
<p className="viewparsings xiaoshou mr25">
<i className="iconfont icon-bianji2 font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
<span>编辑</span>
</p>
</a>
}
</div>
//运营人员
:Perioftersbols===true?
<div className="xaxisreverseorder">
{
items.item_type === "PROGRAM" ?
this.props.Isitapopup&&this.props.Isitapopup==="true"?
""
:
<a onClick={()=>this.seturls(`/problems/${items.program_attr.identifier}/edit`)}>
<p className="viewparsings xiaoshou mr25">
<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 onClick={()=>this.seturls(`/problemset/edit/${items.id}`)}>
<p className="viewparsings xiaoshou mr25">
<i className="iconfont icon-bianji2 font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
<span>编辑</span>
</p>
</a>
}
</div>
:""
}
{
items.item_type === "PROGRAM" ?

@ -106,7 +106,18 @@ class Listjihe extends Component {
const quotess =items&&items.quotes&&items.quotes;
const authors=items&&items.author&&items.author.name;
let Periofters = false;
let Perioftersbols=false;
if (this.props) {
if (this.props.current_user) {
if (this.props.current_user.admin) {
Periofters = true;
}
else if (this.props.current_user.business) {
Perioftersbols = true;
}
}
}
return (
<div className={" borderwdsst pd20 mb20 intermediatecenter listjihecolor "} >
{
@ -206,7 +217,43 @@ class Listjihe extends Component {
</p>
}
</div>
:""}
:Periofters===true?
<div className="w35s xaxisreverseorder">
<p className="viewparsings xiaoshou mr25 " onClick={()=>this.props.showmodelysl(items.id)}>
<i className="iconfont icon-shanchu1 font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
<span>删除</span>
</p>
{
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>
}
</div>
:Perioftersbols===true?
<div className="w35s xaxisreverseorder">
{
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>
}
</div>
:
""
}

Loading…
Cancel
Save