From 0cf1734f3c9c4a58ad2fe0112bf327951659a015 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, 30 Aug 2019 11:34:07 +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 --- .../modules/courses/poll/PollNewQuestbank.js | 72 ++++++++++--------- 1 file changed, 38 insertions(+), 34 deletions(-) diff --git a/public/react/src/modules/courses/poll/PollNewQuestbank.js b/public/react/src/modules/courses/poll/PollNewQuestbank.js index 1935fb625..de9d461dc 100644 --- a/public/react/src/modules/courses/poll/PollNewQuestbank.js +++ b/public/react/src/modules/courses/poll/PollNewQuestbank.js @@ -297,28 +297,29 @@ class PollNewQuestbank extends Component { return } - const url = `/polls/${pollidsy}/edit.json`; + const url = `/exercise_banks/${pollidsy}.json`; axios.get(url).then((result) => { - if (result !== undefined) + if (result !== undefined){ + + } // console.log("有问卷~~~") - // if (result.status === 200) { - // console.log(JSON.stringify(result.data)) - this.setState({ - projects: result.data, - pollid: pollidsy, - polls_status: result.data.poll.polls_status, - polls_name: result.data.poll.polls_name, - polls_description: result.data.poll.polls_description, - poll_questions: result.data.poll_questions, - question_types: result.data.question_types, - mysingles: result.data.question_types.q_singles, - mydoubles: result.data.question_types.q_doubles, - mymainsint: result.data.question_types.q_mains, - polls_nametest: result.data.poll.polls_name, - polls_descriptiontest: result.data.poll.polls_description, - questionnair: true, - }) + + // this.setState({ + // projects: result.data, + // pollid: pollidsy, + // polls_status: result.data.poll.polls_status, + // polls_name: result.data.poll.polls_name, + // polls_description: result.data.poll.polls_description, + // poll_questions: result.data.poll_questions, + // question_types: result.data.question_types, + // mysingles: result.data.question_types.q_singles, + // mydoubles: result.data.question_types.q_doubles, + // mymainsint: result.data.question_types.q_mains, + // polls_nametest: result.data.poll.polls_name, + // polls_descriptiontest: result.data.poll.polls_description, + // questionnair: true, + // }) // } }).catch((error) => { @@ -2492,7 +2493,7 @@ class PollNewQuestbank extends Component { {/*
*/} { this.state.mysave === false ? -
+
{this.state.polls_nametest} @@ -2637,6 +2638,21 @@ class PollNewQuestbank extends Component { }

+ + {polls_status === undefined || polls_status === 1 ? +
+
+
+ this.addmysingles()}>单选题 + this.addmydoubles()}>多选题 + this.addmymainsint()}>主观题 +
+
+ :
} +
{/*自动生成修改好的获取到的*/} @@ -3468,19 +3484,7 @@ class PollNewQuestbank extends Component { - {polls_status === undefined || polls_status === 1 ? -
-
-
- this.addmysingles()}>单选题 - this.addmydoubles()}>多选题 - this.addmymainsint()}>主观题 -
-
- :
} +
-
  • +
  • this.props.history.goBack()}>取消 this.submitQuestionnaire()}>提交