From 9ca81b06b03a4fe5a5941fbe302737ab654c2f5f Mon Sep 17 00:00:00 2001 From: kingChan <281221230@qq.com> Date: Wed, 12 Jun 2024 17:04:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9EGLCC=20PR=E6=A3=80=E6=B5=8B?= =?UTF-8?q?=E5=85=A8=E9=83=A8=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/queries/admins/glcc_examine_material.rb | 8 +++----- app/views/admins/glcc_pr_check/index.html.erb | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/app/queries/admins/glcc_examine_material.rb b/app/queries/admins/glcc_examine_material.rb index 4e8f2bea7..024dd20af 100644 --- a/app/queries/admins/glcc_examine_material.rb +++ b/app/queries/admins/glcc_examine_material.rb @@ -13,11 +13,9 @@ class Admins::GlccExamineMaterial < ApplicationQuery materials = GlccMediumTermExamineMaterial.all # term - term = params[:term] || [1,2] - if term.present? - materials = materials.where(term: term) - end - #year + term = params[:term].zero ? [1, 2] : params[:term] + materials = materials.where(term: term) if term.present? + #year year = if params[:date] params[:date][:year] end diff --git a/app/views/admins/glcc_pr_check/index.html.erb b/app/views/admins/glcc_pr_check/index.html.erb index a70a09f6e..8a453f87c 100644 --- a/app/views/admins/glcc_pr_check/index.html.erb +++ b/app/views/admins/glcc_pr_check/index.html.erb @@ -2,7 +2,7 @@ <%= form_tag(admins_glcc_pr_check_index_path, method: :get, class: 'form-inline search-form flex-1', remote: true) do %>
- <% status_options = [['中期考核',1], ['结项考核', 2]] %> + <% status_options = [['全部',0]['中期考核',1], ['结项考核', 2]] %> <%= select_tag(:term, options_for_select(status_options), class: 'form-control') %>