From 0b6416d64e54061e875377b9af7a494438b74b55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Fri, 21 Feb 2020 21:05:15 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/question/Paperreview_item.js | 54 ++++++++++++++++--- 1 file changed, 46 insertions(+), 8 deletions(-) diff --git a/public/react/src/modules/question/Paperreview_item.js b/public/react/src/modules/question/Paperreview_item.js index 09dddcfb6..8f3ca4f28 100644 --- a/public/react/src/modules/question/Paperreview_item.js +++ b/public/react/src/modules/question/Paperreview_item.js @@ -85,9 +85,17 @@ class Paperreview_item extends Component { const positions = this.props.single_questions.questions[result.destination.index].position; const url = `/item_baskets/${ids}/adjust_position.json` - var data = { - position: positions + if(this.props.match.params.type==="Intelligence") { + var data = { + position: positions, + exam_setting_id:this.props.match.params.id, + } + }else { + var data = { + position: positions + } } + axios.post(url, data) .then((result) => { if (result.data.status == 0) { @@ -104,8 +112,18 @@ class Paperreview_item extends Component { const ids = this.props.multiple_questions.questions[result.source.index].id; const positions = this.props.multiple_questions.questions[result.destination.index].position; const url = `/item_baskets/${ids}/adjust_position.json` - var data = { - position: positions + + if(this.props.match.params.type==="Intelligence") { + var data = { + position: positions, + exam_setting_id:this.props.match.params.id, + } + + }else { + var data = { + position: positions + } + } axios.post(url, data) .then((result) => { @@ -125,8 +143,18 @@ class Paperreview_item extends Component { const ids = this.props.judgement_questions.questions[result.source.index].id; const positions = this.props.judgement_questions.questions[result.destination.index].position; const url = `/item_baskets/${ids}/adjust_position.json` - var data = { - position: positions + + + if(this.props.match.params.type==="Intelligence") { + var data = { + position: positions, + exam_setting_id:this.props.match.params.id, + } + + }else { + var data = { + position: positions + } } axios.post(url, data) .then((result) => { @@ -145,8 +173,18 @@ class Paperreview_item extends Component { const ids = this.props.program_questions.questions[result.source.index].id; const positions = this.props.program_questions.questions[result.destination.index].position; const url = `/item_baskets/${ids}/adjust_position.json` - var data = { - position: positions + + + + if(this.props.match.params.type==="Intelligence") { + var data = { + position: positions, + exam_setting_id:this.props.match.params.id, + } + }else { + var data = { + position: positions + } } axios.post(url, data) .then((result) => {