diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index f59fba784..cfa2e2bf0 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -624,9 +624,17 @@ class IssuesController < ApplicationController @project_sort = 'issues.updated_on asc' end end - + # 搜索结果 @issues_filter = @query.issues(:order => @project_sort) + # if params[:type] == 1 || params[:type].nil? + # @results = @issues_filter + # elsif params[:type] == "2" + # @results = @issues_filter.collect{|result| result.status_id !=5 } + # elsif params[:type] == "3" + # @results = @issues_filter.collect{|result| result.status_id !=5 } + # end + #统计 @results = {} diff --git a/app/views/issues/_statistics.html.erb b/app/views/issues/_statistics.html.erb index a015a12fd..b144b8e6b 100644 --- a/app/views/issues/_statistics.html.erb +++ b/app/views/issues/_statistics.html.erb @@ -1,164 +1,36 @@ -
-

issue统计

-
-
-
- - -
- 新建 -
-
- - - - - - - - - - - - - - <% @results.each do |k,v|%> - - - - - - - - - - <% end %> - - - - - - - - - - -
指派给所有需求任务缺陷支持周报
<%= v[0] %><%= v[2] %><%= v[4] %><%= v[1] %><%= v[3] %><%= v[5] %>
<%= @alltotal[0] %><%= @alltotal[2] %><%= @alltotal[4] %><%= @alltotal[1] %><%= @alltotal[3] %><%= @alltotal[5] %>
-
+
+

issue统计

+
+
+
+ +
+ 新建 +
+
+ <%= render "issues/statistics_all" %> +
+
+ <%= render "issues/statistics_open" %> +
+
+ <%= render "issues/statistics_lock" %> +
- + + diff --git a/app/views/issues/_statistics_all.html.erb b/app/views/issues/_statistics_all.html.erb new file mode 100644 index 000000000..0ef85057a --- /dev/null +++ b/app/views/issues/_statistics_all.html.erb @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + <% @results.each do |k,v|%> + + + + + + + + + + <% end %> + + + + + + + + + + +
指派给所有需求任务缺陷支持周报
<%= v[0] %><%= v[2] %><%= v[4] %><%= v[1] %><%= v[3] %><%= v[5] %>
<%= @alltotal[0] %><%= @alltotal[2] %><%= @alltotal[4] %><%= @alltotal[1] %><%= @alltotal[3] %><%= @alltotal[5] %>
\ No newline at end of file diff --git a/app/views/issues/_statistics_lock.html.erb b/app/views/issues/_statistics_lock.html.erb new file mode 100644 index 000000000..f8628144e --- /dev/null +++ b/app/views/issues/_statistics_lock.html.erb @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + <% @results.each do |k,v|%> + <% if v[12] > 0 %> + + + + + + + + + + <% end %> + <% end %> + + + + + + + + + + +
指派给所有需求任务缺陷支持周报
<%= v[12] %><%= v[14] %><%= v[16] %><%= v[13] %><%= v[15] %><%= v[17] %>
<%= @closetotal[0] %><%= @closetotal[2] %><%= @closetotal[4] %><%= @closetotal[1] %><%= @closetotal[3] %><%= @closetotal[5] %>
\ No newline at end of file diff --git a/app/views/issues/_statistics_open.html.erb b/app/views/issues/_statistics_open.html.erb new file mode 100644 index 000000000..d5eb843f7 --- /dev/null +++ b/app/views/issues/_statistics_open.html.erb @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + <% @results.each do |k,v|%> + <% if v[6] > 0 %> + + + + + + + + + + <% end %> + <% end %> + + + + + + + + + + +
指派给所有需求任务缺陷支持周报
<%= v[6] %><%= v[8] %><%= v[10] %><%= v[7] %><%= v[9] %><%= v[11] %>
<%= @opentotal[0] %><%= @opentotal[2] %><%= @opentotal[4] %><%= @opentotal[1] %><%= @opentotal[3] %><%= @opentotal[5] %>
\ No newline at end of file diff --git a/app/views/issues/index.html.erb b/app/views/issues/index.html.erb index 7a899f87b..a9f70f999 100644 --- a/app/views/issues/index.html.erb +++ b/app/views/issues/index.html.erb @@ -203,7 +203,7 @@ -
+