修改样式

dev_aliyun_beta
杨树林 6 years ago
parent 63daead267
commit a02e492e00

@ -75,7 +75,7 @@ class Completetaskpage extends Component {
const menuData={
tab:'0',//tab选中的index
menuArray:[//tab以及tab路由
{to:`/banks/gtask/${workids}/${this.props.match.params.type}/details`,content:'内容详情'},
{to:`/banks/gtask/${workids}/${this.props.match.params.type}`,content:'内容详情'},
],
category:'gtask',//毕设选题
tos:`/banks/gtask/${workids}/edit/${this.props.match.params.type}`,

@ -70,7 +70,7 @@ class CompletetopicdePage extends Component {
const menuData={
tab:'0',//tab选中的index
menuArray:[//tab以及tab路由
{to:`/banks/gtopic/${workids}/${this.props.match.params.type}/details`,content:'内容详情'},
{to:`/banks/gtopic/${workids}/${this.props.match.params.type}`,content:'内容详情'},
],
category:'gtopic',//毕设选题
tos:`/banks/gtopic/${workids}/edit/${this.props.match.params.type}`,

@ -147,19 +147,18 @@ class GroupjobbankPage extends Component {
></BanksMenu>
}
<Switch {...this.props}>
<Route path={`/banks/group/:workid/${this.props.match.params.type}/details`}
<Route path={`/banks/group/:workid/${this.props.match.params.type}/answer`}
render={
(props) => {
return (<Groupjobbandetails {...this.props} {...props} {...this.state} datas={datas} />)
return (<Groupjobquesanswer {...this.props} {...props} {...this.state} datas={datas} />)
}
}></Route>
<Route path={`/banks/group/:workid/${this.props.match.params.type}/answer`}
<Route path={`/banks/group/:workid/${this.props.match.params.type}`}
render={
(props) => {
return (<Groupjobquesanswer {...this.props} {...props} {...this.state} datas={datas} />)
return (<Groupjobbandetails {...this.props} {...props} {...this.state} datas={datas} />)
}
}></Route>
</Switch>
</React.Fragment>
)

@ -539,6 +539,14 @@ class PollNewQuestbank extends Component {
}
answers.push(answerstwo);
}
if(anserbool===false){
let answersysltwo = {
"answer_id": parseInt(object.question.answers[object.question.answers.length-1].answer_id)+1,
"answer_position": parseInt(object.question.answers[object.question.answers.length-1].answer_position)+1,
"answer_text": "其他"
}
answers.push(answersysltwo);
}
questiontwo = {
"id": object.question.id,
"is_necessary": object.question.is_necessary,
@ -2116,14 +2124,14 @@ class PollNewQuestbank extends Component {
if(result.data){
if (result.data.status === 0) {
this.props.showNotification(`上移成功`);
let arr = this.state.poll_questions;
let newarr = [...arr];
let temp = newarr[index - 1];
newarr[index - 1] = newarr[index];
newarr[index] = temp;
this.setState({
poll_questions: newarr,
});
// let arr = this.state.poll_questions;
// let newarr = [...arr];
// let temp = newarr[index - 1];
// newarr[index - 1] = newarr[index];
// newarr[index] = temp;
// this.setState({
// poll_questions: newarr,
// });
thiss.thisinitializationdatanew();
}else{
this.props.showNotification(`上移失败`);
@ -2150,14 +2158,14 @@ class PollNewQuestbank extends Component {
if (result.data.status === 0) {
// message.success("下移题目成功", 1)
this.props.showNotification(`下移成功`);
let arr = this.state.poll_questions;
let newarr = [...arr];
let temp = newarr[index + 1];
newarr[index + 1] = newarr[index];
newarr[index] = temp;
this.setState({
poll_questions: newarr,
});
// let arr = this.state.poll_questions;
// let newarr = [...arr];
// let temp = newarr[index + 1];
// newarr[index + 1] = newarr[index];
// newarr[index] = temp;
// this.setState({
// poll_questions: newarr,
// });
thiss.thisinitializationdatanew();
}else {
this.props.showNotification(`下移失败`);
@ -3188,7 +3196,17 @@ class PollNewQuestbank extends Component {
}}
onInput={(e) => this.HandleInputChanges(e, indexo, indext)}></TextArea>
{this.state.polls_status === undefined || this.state.polls_status === 1 ?
indext > 1 ?
(itemo.question.question_type === 2 && itemo.question.answers.length === 3 ?
(indext ===1?
<a className="lineh-40" id="bianjibianji1"
onClick={() => this.Ewoption(itemo.question.id, itemo)}><Tooltip
title="新增" placement={"bottom"}><i
className="color-green font-18 iconfont icon-roundaddfill"></i></Tooltip></a>
:
""
)
:
itemo.question.answers.length > 2 &&indext>1?
<span>
<a className="lineh-40 mr10"
onClick={() => this.Deleteentrys(arrid, indext, false)}><Tooltip
@ -3210,11 +3228,14 @@ class PollNewQuestbank extends Component {
></a>
}
</span>
: indext === 1 && itemo.question.answers.length === 2 || indext === 1 && itemo.question.answers.length === 3 ?
<a className="lineh-40"
:itemo.question.answers.length === 2?
(indext ===1?
<a className="lineh-40" id="bianjibianji1"
onClick={() => this.Ewoption(itemo.question.id, itemo)}><Tooltip
title="新增" placement={"bottom"}><i
className="color-green font-18 iconfont icon-roundaddfill"></i></Tooltip></a> : ""
className="color-green font-18 iconfont icon-roundaddfill"></i></Tooltip></a>
:"")
: "")
: ""}
</p>)}
</div>
@ -3441,6 +3462,10 @@ class PollNewQuestbank extends Component {
{itemo.question.answers === undefined ? "" : itemo.question.answers.map((itemt, indext) => {
console.log("chishiyong1");
console.log(itemo.question.answers[itemo.question.answers.length - 1]);
// var bools=true;
// if(){
//
// }
return (
<div>
{itemt.answer_text === undefined ? (
@ -3497,7 +3522,15 @@ class PollNewQuestbank extends Component {
}}
onInput={(e) => this.HandleInputChanges(e, indexo, indext)}></TextArea>
{this.state.polls_status === undefined || this.state.polls_status === 1 ?
indext > 1 ?
( itemo.question.question_type === 2 && itemo.question.answers.length === 3 ?
(indext ===1?
<a className="lineh-40 " id="bianjibianji2"
onClick={() => this.Ewoption(itemo.question.id, itemo)}><Tooltip
title="新增" placement={"bottom"}><i
className="color-green font-18 iconfont icon-roundaddfill"></i></Tooltip></a>
:"")
:
itemo.question.answers.length > 2 && indext>1 ?
<span>
<a className="lineh-40 mr10"
onClick={() => this.Deleteentrys(arrid, indext, false)}><Tooltip
@ -3519,11 +3552,14 @@ class PollNewQuestbank extends Component {
></a>
}
</span>
: indext === 1 && itemo.question.answers.length === 2 || indext === 1 && itemo.question.answers.length === 3 ?
<a className="lineh-40 "
:itemo.question.answers.length === 2 && indext ===1 ?
(indext ===1?
<a className="lineh-40 " id="bianjibianji2"
onClick={() => this.Ewoption(itemo.question.id, itemo)}><Tooltip
title="新增" placement={"bottom"}><i
className="color-green font-18 iconfont icon-roundaddfill"></i></Tooltip></a> : ""
className="color-green font-18 iconfont icon-roundaddfill"></i></Tooltip></a>
:"")
: "")
: ""}
</p>)}
</div>
@ -3810,7 +3846,16 @@ class PollNewQuestbank extends Component {
}}
onInput={(e) => this.HandleInputChanges(e, indexo, indext)}></TextArea>
{polls_status === undefined || polls_status === 1 ?
(indext > 1 ?
(itemo.question.question_type === 2&& itemo.question.answers.length === 3 ?
(indext ===1?
<a className="lineh-40" id="bianjibianji3"
onClick={() => this.Ewoption(itemo.question.id, itemo)}><Tooltip
title="新增"
placement={"bottom"}><i
className="color-green font-18 iconfont icon-roundaddfill"></i></Tooltip></a>
:"")
:
itemo.question.answers.length > 2 && indext>1 ?
<span>
<a className="lineh-40 mr10"
onClick={() => this.Deleteentrys(arrid, indext, false)}><Tooltip
@ -3836,12 +3881,16 @@ class PollNewQuestbank extends Component {
></a>
}
</span>
: indext === 1 && itemo.question.answers.length === 2 || indext === 1 && itemo.question.answers.length === 3 ?
<a className="lineh-40"
: itemo.question.answers.length === 2?
(indext ===1?
<a className="lineh-40" id="bianjibianji3"
onClick={() => this.Ewoption(itemo.question.id, itemo)}><Tooltip
title="新增"
placement={"bottom"}><i
className="color-green font-18 iconfont icon-roundaddfill"></i></Tooltip></a> : "")
className="color-green font-18 iconfont icon-roundaddfill"></i></Tooltip></a>
:"")
: "")
: ""}
</p>)}
</div>

@ -144,16 +144,16 @@ class Generaljobbankdetails extends Component {
></BanksMenu>
}
<Switch {...this.props}>
<Route path={`/banks/normal/:workid/${this.props.match.params.type}/details`}
<Route path={`/banks/normal/:workid/${this.props.match.params.type}/answer`}
render={
(props) => {
return (<Generaljobdetails {...this.props} {...props} {...this.state} datas={datas} />)
return (<Generaljobanswer {...this.props} {...props} {...this.state} datas={datas} />)
}
}></Route>
<Route path={`/banks/normal/:workid/${this.props.match.params.type}/answer`}
<Route path={`/banks/normal/:workid/${this.props.match.params.type}`}
render={
(props) => {
return (<Generaljobanswer {...this.props} {...props} {...this.state} datas={datas} />)
return (<Generaljobdetails {...this.props} {...props} {...this.state} datas={datas} />)
}
}></Route>

@ -26,7 +26,7 @@ class HomeworkBanksEdit extends Component {
title:'编辑',
is_public:result && result.data && result.data.is_public,
crumbArray:[
{to:`/banks/${this.getModuleName()}/${workId}/${this.props.match.params.type}?tab=0`,content:'详情'},
{to:`/banks/${this.getModuleName()}/${workId}/${this.props.match.params.type}`,content:'详情'},
{content:'编辑'}
]
}
@ -64,7 +64,7 @@ class HomeworkBanksEdit extends Component {
return this.props.isGroup ? 'group' : 'normal'
}
toWorkDetail = () => {
this.props.history.push(`/banks/${this.getModuleName()}/${this.props.match.params.workId}/${this.props.match.params.type}?tab=0`)
this.props.history.push(`/banks/${this.getModuleName()}/${this.props.match.params.workId}/${this.props.match.params.type}`)
this.props.initPublic(undefined);
}
onCancel = () => {

Loading…
Cancel
Save