From 7359854e288c7232b8a1bd0e566a61aa31a83768 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Wed, 8 May 2019 10:38:56 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B6=85=E7=BA=A7=E7=AE=A1=E7=90=86=E5=91=98?= =?UTF-8?q?=20=E5=B7=B2=E5=8F=91=E5=B8=83=E5=AE=9E=E8=AE=AD=E8=B7=AF?= =?UTF-8?q?=E5=BE=84=E7=9A=84excel=E5=AF=BC=E5=87=BA=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E7=9A=84=E5=AE=9E=E8=AE=AD=E5=8F=91=E5=B8=83?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E5=92=8C=E8=AF=BE=E7=A8=8B=E7=AD=89=E7=BA=A7?= =?UTF-8?q?=E5=88=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/managements_controller.rb | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/app/controllers/managements_controller.rb b/app/controllers/managements_controller.rb index 8abb6c2b..dc5f41fa 100644 --- a/app/controllers/managements_controller.rb +++ b/app/controllers/managements_controller.rb @@ -4391,7 +4391,7 @@ end book = Spreadsheet::Workbook.new sheet1 = book.create_worksheet :name => "已发布实训课程" count_row = 2 - sheet1.row(1).concat(["", "地址", "实训课程名称","章节名称", "实训组成", "关卡数", "状态", "课程等级", "更新时间", "发布时间", ]) + sheet1.row(1).concat(["", "地址", "实训课程名称","章节名称", "实训组成", "关卡数", "状态", "实训发布时间", "课程等级", "更新时间", "发布时间", ]) Rails.logger.warn("##########subjects:#{subjects.count}") subjects.each do |subject| sheet1[count_row,1] = "paths/"+subject.id.to_s @@ -4404,26 +4404,27 @@ end sheet1[count_row,4] = "#{s_index + 1}-#{index + 1} #{shixun.name}" sheet1[count_row,5] = shixun.challenges.count sheet1[count_row,6] = shixun.shixun_status + sheet1[count_row,7] = shixun.publish_time if s_index == 0 && index == 0 - sheet1[count_row,7] = subject.subject_level_system.try(:name) || "--" - sheet1[count_row,8] = format_time subject.updated_at - sheet1[count_row,9] = format_time subject.publish_time + sheet1[count_row,8] = subject.subject_level_system.try(:name) || "--" + sheet1[count_row,9] = format_time subject.updated_at + sheet1[count_row,10] = format_time subject.publish_time end count_row += 1 end else if s_index == 0 - sheet1[count_row,7] = subject.subject_level_system.try(:name) || "--" - sheet1[count_row,8] = format_time subject.updated_at - sheet1[count_row,9] = format_time subject.publish_time + sheet1[count_row,8] = subject.subject_level_system.try(:name) || "--" + sheet1[count_row,9] = format_time subject.updated_at + sheet1[count_row,10] = format_time subject.publish_time end count_row += 1 end end else - sheet1[count_row,7] = subject.subject_level_system.try(:name) || "--" - sheet1[count_row,8] = format_time subject.updated_at - sheet1[count_row,9] = format_time subject.publish_time + sheet1[count_row,8] = subject.subject_level_system.try(:name) || "--" + sheet1[count_row,9] = format_time subject.updated_at + sheet1[count_row,10] = format_time subject.publish_time count_row += 1 end end