forked from Open-CT/openscore
fix:self problem arbitration in group
This commit is contained in:
parent
1830168a9e
commit
7ff4b16300
|
@ -1 +1 @@
|
||||||
{"C:\\Users\\chen\\go\\src\\open-ct\\controllers":1632587620127206100}
|
{"C:\\Users\\yang\\Desktop\\阅卷系统\\controllers":1632588181225521900}
|
|
@ -17,7 +17,8 @@ export default class index extends Component {
|
||||||
state = {
|
state = {
|
||||||
questionList: [],
|
questionList: [],
|
||||||
tableData: [],
|
tableData: [],
|
||||||
count: undefined
|
count: 0,
|
||||||
|
questionIndex:0
|
||||||
}
|
}
|
||||||
|
|
||||||
questionList = () => {
|
questionList = () => {
|
||||||
|
@ -137,12 +138,15 @@ export default class index extends Component {
|
||||||
index = i
|
index = i
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.setState({
|
||||||
|
questionIndex:index
|
||||||
|
})
|
||||||
this.tableData(this.state.questionList[index].QuestionId)
|
this.tableData(this.state.questionList[index].QuestionId)
|
||||||
}
|
}
|
||||||
// 选择区
|
// 选择区
|
||||||
|
|
||||||
paperMark =() => {
|
paperMark =() => {
|
||||||
this.props.history.push('/home/group/markTasks/1')
|
this.props.history.push('/home/group/markTasks/1/'+this.state.questionList[this.state.questionIndex].QuestionId)
|
||||||
}
|
}
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -25,10 +25,15 @@ export default class index extends Component {
|
||||||
markScore: [],
|
markScore: [],
|
||||||
keyTest: [],
|
keyTest: [],
|
||||||
sampleList: [],
|
sampleList: [],
|
||||||
samplePaper: []
|
samplePaper: [],
|
||||||
|
QuestionId: undefined,
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
|
console.log(this.props.match.params)
|
||||||
|
this.setState({
|
||||||
|
QuestionId: parseInt(this.props.match.params.QuestionId)
|
||||||
|
})
|
||||||
if (this.props.match.params.type === "1") {
|
if (this.props.match.params.type === "1") {
|
||||||
this.setState({
|
this.setState({
|
||||||
type: '仲裁卷'
|
type: '仲裁卷'
|
||||||
|
@ -49,7 +54,7 @@ export default class index extends Component {
|
||||||
|
|
||||||
// 仲裁卷
|
// 仲裁卷
|
||||||
getArbitrationTestId = () => {
|
getArbitrationTestId = () => {
|
||||||
group.arbitrationTestId({ supervisorId: "2" })
|
group.arbitrationTestId({ supervisorId: "2",questionId:parseInt(this.props.match.params.QuestionId) })
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.data.status == "10000") {
|
if (res.data.status == "10000") {
|
||||||
let currentTestId = res.data.data.arbitramentUnmarkListVOList[0].TestId
|
let currentTestId = res.data.data.arbitramentUnmarkListVOList[0].TestId
|
||||||
|
@ -67,7 +72,7 @@ export default class index extends Component {
|
||||||
|
|
||||||
// 问题卷
|
// 问题卷
|
||||||
getProblemTestId = () => {
|
getProblemTestId = () => {
|
||||||
group.problemTestId({ supervisorId: "2" })
|
group.problemTestId({ supervisorId: "2",questionId:parseInt(this.props.match.params.QuestionId) })
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.data.status == "10000") {
|
if (res.data.status == "10000") {
|
||||||
let currentTestId = res.data.data.ProblemUnmarkVOList[0].TestId
|
let currentTestId = res.data.data.ProblemUnmarkVOList[0].TestId
|
||||||
|
@ -85,12 +90,12 @@ export default class index extends Component {
|
||||||
|
|
||||||
// 自评卷
|
// 自评卷
|
||||||
getSelfTestId = () => {
|
getSelfTestId = () => {
|
||||||
group.selfTestId({ supervisorId: "2" })
|
group.selfTestId({ supervisorId: "2",questionId:parseInt(this.props.match.params.QuestionId) })
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.data.status == "10000") {
|
if (res.data.status == "10000") {
|
||||||
let currentTestId = res.data.data.ProblemUnmarkVOList[0].TestId
|
let currentTestId = res.data.data.selfUnmarkVOList[0].TestId
|
||||||
this.setState({
|
this.setState({
|
||||||
count: res.data.data.ProblemUnmarkVOList.length,
|
count: res.data.data.selfUnmarkVOList.length,
|
||||||
currentTestId
|
currentTestId
|
||||||
})
|
})
|
||||||
this.getCurrentPaper();
|
this.getCurrentPaper();
|
||||||
|
|
|
@ -17,7 +17,8 @@ export default class index extends Component {
|
||||||
state = {
|
state = {
|
||||||
questionList: [],
|
questionList: [],
|
||||||
tableData: [],
|
tableData: [],
|
||||||
count: 0
|
count: 0,
|
||||||
|
questionIndex:0
|
||||||
}
|
}
|
||||||
|
|
||||||
questionList = () => {
|
questionList = () => {
|
||||||
|
@ -102,12 +103,15 @@ export default class index extends Component {
|
||||||
index = i
|
index = i
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.setState({
|
||||||
|
questionIndex:index
|
||||||
|
})
|
||||||
this.tableData(this.state.questionList[index].QuestionId)
|
this.tableData(this.state.questionList[index].QuestionId)
|
||||||
}
|
}
|
||||||
// 选择区
|
// 选择区
|
||||||
|
|
||||||
paperMark =() => {
|
paperMark =() => {
|
||||||
this.props.history.push('/home/group/markTasks/3')
|
this.props.history.push('/home/group/markTasks/3/'+this.state.questionList[this.state.questionIndex].QuestionId)
|
||||||
}
|
}
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -38,7 +38,8 @@ export default class index extends Component {
|
||||||
state = {
|
state = {
|
||||||
questionList: [],
|
questionList: [],
|
||||||
tableData: [],
|
tableData: [],
|
||||||
count: undefined
|
count: 0,
|
||||||
|
questionIndex:0
|
||||||
}
|
}
|
||||||
|
|
||||||
questionList = () => {
|
questionList = () => {
|
||||||
|
@ -107,12 +108,15 @@ export default class index extends Component {
|
||||||
index = i
|
index = i
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.setState({
|
||||||
|
questionIndex:index
|
||||||
|
})
|
||||||
this.tableData(this.state.questionList[index].QuestionId)
|
this.tableData(this.state.questionList[index].QuestionId)
|
||||||
}
|
}
|
||||||
// 选择区
|
// 选择区
|
||||||
|
|
||||||
paperMark =() => {
|
paperMark =() => {
|
||||||
this.props.history.push('/home/group/markTasks/2')
|
this.props.history.push('/home/group/markTasks/2/'+this.state.questionList[this.state.questionIndex].QuestionId)
|
||||||
}
|
}
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -273,7 +273,7 @@ export default class index extends Component {
|
||||||
<Route path="/home/group/arbitration" component={arbitration} exact></Route>
|
<Route path="/home/group/arbitration" component={arbitration} exact></Route>
|
||||||
<Route path="/home/group/marking" component={marking}></Route>
|
<Route path="/home/group/marking" component={marking}></Route>
|
||||||
<Route path="/home/group/problem" component={problem} exact></Route>
|
<Route path="/home/group/problem" component={problem} exact></Route>
|
||||||
<Route path="/home/group/markTasks/:type" component={markTasks} exact></Route>
|
<Route path="/home/group/markTasks/:type/:QuestionId" component={markTasks} exact></Route>
|
||||||
|
|
||||||
<Route path="/home/management/question" component={question} exact></Route>
|
<Route path="/home/management/question" component={question} exact></Route>
|
||||||
<Route path="/home/management/paper" component={paper}></Route>
|
<Route path="/home/management/paper" component={paper}></Route>
|
||||||
|
|
Loading…
Reference in New Issue