From 935932cf5f17d6bd16cce541bc27fb843aadc974 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Tue, 31 Dec 2019 18:03:29 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E9=A2=98=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/tag_disciplines_controller.rb | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 app/controllers/tag_disciplines_controller.rb diff --git a/app/controllers/tag_disciplines_controller.rb b/app/controllers/tag_disciplines_controller.rb new file mode 100644 index 000000000..b527e455d --- /dev/null +++ b/app/controllers/tag_disciplines_controller.rb @@ -0,0 +1,7 @@ +class TagDisciplinesController < ApplicationController + before_action :require_login + + def create + + end +end \ No newline at end of file From 827d8b568c624bf4d4d835adcfc607e63f92e64e Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 2 Jan 2020 09:56:42 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E6=96=87=E4=BB=B6=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/shixuns_controller.rb | 15 +++++++++++++-- config/routes.rb | 1 + 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb index 4f2a19536..c641231a6 100644 --- a/app/controllers/shixuns_controller.rb +++ b/app/controllers/shixuns_controller.rb @@ -19,7 +19,7 @@ class ShixunsController < ApplicationController :add_file, :jupyter_exec] before_action :allowed, only: [:update, :close, :update_propaedeutics, :settings, :publish, :apply_public, - :shixun_members_added, :change_manager, :collaborators_delete, + :shixun_members_added, :change_manager, :collaborators_delete, :upload_git_file, :cancel_apply_public, :cancel_publish, :add_collaborators, :add_file] before_action :portion_allowed, only: [:copy] @@ -883,7 +883,18 @@ class ShixunsController < ApplicationController author_name = current_user.real_name author_email = current_user.git_mail @content = update_file_content content, @repo_path, @path, author_email, author_name, "Edit by browser" - end + end + + def upload_git_file + upload_file = params["file"] + uid_logger("#########################file_params####{params["#{params[:file]}"]}") + raise "未上传文件" unless upload_file + content = upload_file.tempfile.read + author_name = current_user.real_name + author_email = current_user.git_mail + update_file_content(content, @repo_path, author_email, author_name, "upload by browser") + render_ok + end def add_collaborators member_ids = "(" + @shixun.shixun_members.map(&:user_id).join(',') + ")" diff --git a/config/routes.rb b/config/routes.rb index b61b2e608..69d6d9377 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -279,6 +279,7 @@ Rails.application.routes.draw do post :set_secret_dir post :commits post :file_content + post :upload_git_file post :update_file post :close post :add_file From 54474ccbb5706bcaaf51115baf719d0ba93a71f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Thu, 2 Jan 2020 10:12:36 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/busyWork/CommonWorkList.js | 40 +++++++++++-------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/CommonWorkList.js b/public/react/src/modules/courses/busyWork/CommonWorkList.js index d60f68b22..35b2a1ee8 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkList.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkList.js @@ -403,7 +403,8 @@ class CommonWorkList extends Component{ left_time: {}, category: {}, b_order: 'desc', - searchtypes:false + searchtypes:false, + loadingstate:false } } onTablePagination = (page) => { @@ -420,9 +421,11 @@ class CommonWorkList extends Component{ }) }else{ this.setState({ - searchtypes:true + searchtypes:true, + loadingstate:true }) } + this.fetchList() } onSearchValueInput = (e) => { @@ -482,7 +485,8 @@ class CommonWorkList extends Component{ if (response.data) { this.setState({ ...response.data, - isSpin:false + isSpin:false, + loadingstate:false }) this.props.initWorkDetailCommonState && this.props.initWorkDetailCommonState( Object.assign({...response.data}, { @@ -492,7 +496,8 @@ class CommonWorkList extends Component{ }).catch((error)=>{ console.log(error) this.setState({ - isSpin:false + isSpin:false, + loadingstate:false }) }) @@ -850,9 +855,9 @@ class CommonWorkList extends Component{