From cbeeb84a74c4d180fb5aeb3e88a5abc8787c8d20 Mon Sep 17 00:00:00 2001 From: p31729568 Date: Thu, 19 Sep 2019 16:17:37 +0800 Subject: [PATCH 1/3] ecs: fix graduation subitem api order --- app/controllers/ecs/graduation_subitems_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/ecs/graduation_subitems_controller.rb b/app/controllers/ecs/graduation_subitems_controller.rb index b2570891d..03cf379bb 100644 --- a/app/controllers/ecs/graduation_subitems_controller.rb +++ b/app/controllers/ecs/graduation_subitems_controller.rb @@ -1,5 +1,6 @@ class Ecs::GraduationSubitemsController < Ecs::BaseController def index - @graduation_subitems = current_year.ec_graduation_subitems#.reorder('ec_graduation_requirements.position ASC, ec_graduation_subitems.position ASC') + subitems = current_year.ec_graduation_subitems.reorder('ec_graduation_requirements.position ASC, ec_graduation_subitems.position ASC') + @graduation_subitems = subitems.includes(:ec_graduation_requirement) end end \ No newline at end of file From 8b80e360c6bbf89337d7a62796a87b225fbe3c9a Mon Sep 17 00:00:00 2001 From: p31729568 Date: Thu, 19 Sep 2019 16:23:52 +0800 Subject: [PATCH 2/3] fix --- .../shared/_ec_graduation_subitem.json.jbuilder | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/ecs/graduation_course_supports/shared/_ec_graduation_subitem.json.jbuilder b/app/views/ecs/graduation_course_supports/shared/_ec_graduation_subitem.json.jbuilder index aee77c5b7..ced8a5c72 100644 --- a/app/views/ecs/graduation_course_supports/shared/_ec_graduation_subitem.json.jbuilder +++ b/app/views/ecs/graduation_course_supports/shared/_ec_graduation_subitem.json.jbuilder @@ -2,5 +2,5 @@ json.extract! ec_graduation_subitem, :id, :position, :content, :ec_graduation_re json.graduation_requirement_position ec_graduation_subitem.ec_graduation_requirement.position -json.course_supports ec_graduation_subitem.ec_course_supports, partial: 'ec_course_support', as: :ec_course_support +json.course_supports ec_graduation_subitem.ec_course_supports, partial: 'ecs/graduation_course_supports/shared/ec_course_support', as: :ec_course_support json.weights_total ec_graduation_subitem.ec_course_supports.to_a.sum(&:weights) From 9279b0d6e9e9c611dc17df9f38d39c9d46d0f6c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Thu, 19 Sep 2019 16:32:01 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/tpm/TPMIndexHOC.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/tpm/TPMIndexHOC.js b/public/react/src/modules/tpm/TPMIndexHOC.js index 581aef930..0f753b96c 100644 --- a/public/react/src/modules/tpm/TPMIndexHOC.js +++ b/public/react/src/modules/tpm/TPMIndexHOC.js @@ -301,9 +301,8 @@ export function TPMIndexHOC(WrappedComponent) { chinaoocKey:this.state.dataquerys.chinaoocKey, } } - axios.get(url,{params:{ + axios.get(url,{params: datay - } }, { // withCredentials: true @@ -366,9 +365,8 @@ export function TPMIndexHOC(WrappedComponent) { chinaoocKey:yslurlobject.chinaoocKey, } } - axios.get(url,{params:{ + axios.get(url,{params: datay - } }, { // withCredentials: true