修改样式

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

@ -75,7 +75,7 @@ class Completetaskpage extends Component {
const menuData={ const menuData={
tab:'0',//tab选中的index tab:'0',//tab选中的index
menuArray:[//tab以及tab路由 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',//毕设选题 category:'gtask',//毕设选题
tos:`/banks/gtask/${workids}/edit/${this.props.match.params.type}`, tos:`/banks/gtask/${workids}/edit/${this.props.match.params.type}`,

@ -70,7 +70,7 @@ class CompletetopicdePage extends Component {
const menuData={ const menuData={
tab:'0',//tab选中的index tab:'0',//tab选中的index
menuArray:[//tab以及tab路由 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',//毕设选题 category:'gtopic',//毕设选题
tos:`/banks/gtopic/${workids}/edit/${this.props.match.params.type}`, tos:`/banks/gtopic/${workids}/edit/${this.props.match.params.type}`,

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

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

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

@ -26,7 +26,7 @@ class HomeworkBanksEdit extends Component {
title:'编辑', title:'编辑',
is_public:result && result.data && result.data.is_public, is_public:result && result.data && result.data.is_public,
crumbArray:[ 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:'编辑'} {content:'编辑'}
] ]
} }
@ -64,7 +64,7 @@ class HomeworkBanksEdit extends Component {
return this.props.isGroup ? 'group' : 'normal' return this.props.isGroup ? 'group' : 'normal'
} }
toWorkDetail = () => { 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); this.props.initPublic(undefined);
} }
onCancel = () => { onCancel = () => {

Loading…
Cancel
Save