修改样式

dev_aliyun_beta
杨树林 6 years ago
parent dcf3a58cb8
commit 6c5ede1764

@ -389,7 +389,12 @@ class PollNewQuestbank extends Component {
} }
//添加单选题目 //添加单选题目
addmysingles = () => { addmysingles = () => {
if (this.state.q_countst > 0) {
this.scrollToAnchor("publishtimeid");
this.props.showNotification(`不能同时编辑两题`);
return;
}
if (this.state.newoption === true) { if (this.state.newoption === true) {
this.setState({ this.setState({
newoption: false newoption: false
@ -407,12 +412,17 @@ class PollNewQuestbank extends Component {
} }
this.addMytopic(1, this.state.pollid, Insertposition, false, 0); this.addMytopic(1, this.state.pollid, Insertposition, false, 0);
this.scrollToAnchor("publishtimeid"); this.scrollToAnchor("publishtimeids");
} }
//添加多选题目 //添加多选题目
addmydoubles = () => { addmydoubles = () => {
// console.log("addmymainsint 70") if (this.state.q_countst > 0) {
this.scrollToAnchor("publishtimeid");
this.props.showNotification(`不能同时编辑两题`);
return;
}
if (this.state.newoption === true) { if (this.state.newoption === true) {
this.setState({ this.setState({
newoption: false newoption: false
@ -431,13 +441,18 @@ class PollNewQuestbank extends Component {
} }
this.addMytopic(2, this.state.pollid, Insertposition, false, 0); this.addMytopic(2, this.state.pollid, Insertposition, false, 0);
this.scrollToAnchor("publishtimeid"); this.scrollToAnchor("publishtimeids");
// } // }
} }
//添加主观题目 //添加主观题目
addmymainsint = () => { addmymainsint = () => {
if (this.state.q_countst > 0) {
this.scrollToAnchor("publishtimeid");
this.props.showNotification(`不能同时编辑两题`);
return;
}
this.setState({ this.setState({
Newdisplay: true, Newdisplay: true,
}) })
@ -452,15 +467,14 @@ class PollNewQuestbank extends Component {
} }
this.addMytopic(3, this.state.pollid, Insertposition, false, 0); this.addMytopic(3, this.state.pollid, Insertposition, false, 0);
this.scrollToAnchor("publishtimeid"); this.scrollToAnchor("publishtimeids");
} }
//编辑方法 //编辑方法
adddomedit = (object) => { adddomedit = (object) => {
// console.log("adddomedit 76");
if (this.state.q_countst > 0) { if (this.state.q_countst > 0) {
this.props.showNotification(`不能同时编辑两题`); this.props.showNotification(`不能同时编辑两题`);
this.scrollToAnchor("publishtimeids");
return; return;
} }
var anserbool = false; var anserbool = false;
@ -630,8 +644,10 @@ class PollNewQuestbank extends Component {
console.log("addMytopic"); console.log("addMytopic");
console.log(id); console.log(id);
if (this.state.q_countst > 0) { if (this.state.q_countst > 0) {
if(Whether===true){
this.scrollToAnchor("publishtimeids");
}
this.props.showNotification(`不能同时编辑两题`); this.props.showNotification(`不能同时编辑两题`);
return; return;
} }
this.state.Insertposition = Insertposition; this.state.Insertposition = Insertposition;
@ -3098,13 +3114,13 @@ class PollNewQuestbank extends Component {
{ {
this.state.bindingid && this.state.bindingid === item.question.id ? this.state.bindingid && this.state.bindingid === item.question.id ?
(this.state.Newdisplay === false ? (this.state.Newdisplay === false ?
<div className="problemShow bor-bottom-greyE"> <div className="problemShow bor-bottom-greyE" >
<div> <div>
{this.state.adddom === undefined ? "" : this.state.adddom === undefined ? "" : this.state.adddom.length === 0 ? "" : item.question.id === this.state.adddom[0].question.id && this.state.adddom.map((itemo, indexo) => { {this.state.adddom === undefined ? "" : this.state.adddom === undefined ? "" : this.state.adddom.length === 0 ? "" : item.question.id === this.state.adddom[0].question.id && this.state.adddom.map((itemo, indexo) => {
let arrid = itemo.question.id; let arrid = itemo.question.id;
let resultDomtwo; let resultDomtwo;
resultDomtwo = resultDomtwo =
<div> <div id={"publishtimeid"}>
<span className="color-grey-6">{itemo&&itemo.question&&itemo.question.question_number}</span> <span className="color-grey-6">{itemo&&itemo.question&&itemo.question.question_number}</span>
<span <span
id={"ceshiyong3"} id={"ceshiyong3"}
@ -3410,7 +3426,7 @@ class PollNewQuestbank extends Component {
</div> </div>
</div> : "") </div> : "")
: :
<div className="bor-bottom-greyE problemShow"> <div className="bor-bottom-greyE problemShow" id={"publishtimeid"}>
{resultDom} {resultDom}
{this.state.Newdisplay === false ? {this.state.Newdisplay === false ?
@ -3419,7 +3435,7 @@ class PollNewQuestbank extends Component {
let arrid = itemo.question.id; let arrid = itemo.question.id;
let resultDomtwo; let resultDomtwo;
resultDomtwo = resultDomtwo =
<div> <div id={"publishtimeid"}>
<span className="color-grey-6">{itemo&&itemo.question&&itemo.question.question_number}</span> <span className="color-grey-6">{itemo&&itemo.question&&itemo.question.question_number}</span>
<span <span
@ -3746,7 +3762,7 @@ class PollNewQuestbank extends Component {
{/*新建单选多选2*/} {/*新建单选多选2*/}
<div className="myyslwidth" id={"publishtimeid"}> <div className="myyslwidth" >
{ {
this.state.Newdisplay === true ? this.state.Newdisplay === true ?
<div> <div>
@ -3756,7 +3772,7 @@ class PollNewQuestbank extends Component {
let arrid = itemo.question.id; let arrid = itemo.question.id;
let resultDomtwo; let resultDomtwo;
resultDomtwo = resultDomtwo =
<div className="problemShow" > <div className="problemShow" id={"publishtimeids"} >
<span className="color-grey-6">{itemo&&itemo.question&&itemo.question.question_number}</span> <span className="color-grey-6">{itemo&&itemo.question&&itemo.question.question_number}</span>
<span <span
id={"ceshiyong2"} id={"ceshiyong2"}

Loading…
Cancel
Save