From e5252fa87ea18d48816cc300b1a0ed6a2741d1f8 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 12 Mar 2019 19:26:51 +0800 Subject: [PATCH 01/14] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/ecloud_controller.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/controllers/ecloud_controller.rb b/app/controllers/ecloud_controller.rb index bd0170f9..47b0ca52 100644 --- a/app/controllers/ecloud_controller.rb +++ b/app/controllers/ecloud_controller.rb @@ -101,6 +101,9 @@ class EcloudController < ApplicationController def ecloud_login_callback #获取code logger.info "oauth2 login_callback: #{params}" + + raise "没有code" unless params[:code] + url = "#{SERVER_URL}/oauth2/authorization?grant_type=authorization_code" + "&client_id=#{CLIENT_ID}&scope=&redirect_uri=&code=#{params[:code]}" From c1741913365ac3dd19375b9d512a41f9676facc3 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Tue, 12 Mar 2019 19:30:06 +0800 Subject: [PATCH 02/14] real_value_total --- .../ec/graduatesRequirement/GraduatesRequirement.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/ec/graduatesRequirement/GraduatesRequirement.js b/public/react/src/modules/ec/graduatesRequirement/GraduatesRequirement.js index e68a0527..827144b5 100644 --- a/public/react/src/modules/ec/graduatesRequirement/GraduatesRequirement.js +++ b/public/react/src/modules/ec/graduatesRequirement/GraduatesRequirement.js @@ -236,10 +236,15 @@ function getTableData(data_args) { targetValueRowData[`c${courseIndex + 1}`] = course.target_value && course.target_value.toFixed ? course.target_value.toFixed(3) : course.target_value ; - target_value_total = target_value_total + targetValueRowData[`c${courseIndex + 1}`] + if (course.target_value) { + target_value_total = target_value_total + course.target_value + } + realValueRowData[`c${courseIndex + 1}`] = course.real_value && course.real_value.toFixed ? course.real_value.toFixed(3) : course.real_value ; - real_value_total = real_value_total + realValueRowData[`c${courseIndex + 1}`] + if (course.real_value) { + real_value_total = real_value_total + course.real_value + } }) if (real_value_total >= target_value_total && real_value_total != 0) { nameRowData.status = true From fc4bcca5de764c5c231d4baafdb6831ec3e5e834 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Tue, 12 Mar 2019 19:34:09 +0800 Subject: [PATCH 03/14] is_manager --- .../ecCourseSupportSetting/ShowTableCourseSupportSetting.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/ec/ecCourseSupportSetting/ShowTableCourseSupportSetting.js b/public/react/src/modules/ec/ecCourseSupportSetting/ShowTableCourseSupportSetting.js index 1b3eea40..92ab8e15 100644 --- a/public/react/src/modules/ec/ecCourseSupportSetting/ShowTableCourseSupportSetting.js +++ b/public/react/src/modules/ec/ecCourseSupportSetting/ShowTableCourseSupportSetting.js @@ -33,6 +33,7 @@ class ShowTableCourseSupportSetting extends Component { render() { const course_targets = this.props.course_targets; + const is_manager = this.props.is_manager; return (
@@ -46,11 +47,11 @@ class ShowTableCourseSupportSetting extends Component { */} - { this.props.setEditableMode(true)} } class="color-green EditCourse" data-id="5" data-tip-down="编辑"> - + }