导出调整

dev_cxt
cxt 5 years ago
parent 83dcb61732
commit 2092e2a187

@ -33,8 +33,8 @@ class ExportShixunReportService
base_css = %w(app/templates/shared/main.css app/templates/shixun_work/shixun_work.css app/templates/shared/codemirror.css) base_css = %w(app/templates/shared/main.css app/templates/shixun_work/shixun_work.css app/templates/shared/codemirror.css)
base_css.each { |css| kit.stylesheets << Rails.root.join(css) } base_css.each { |css| kit.stylesheets << Rails.root.join(css) }
file = Tempfile.new(filename) file_name = "#{Rails.root}/files/archiveZip/#{filename}"
kit.to_pdf(file.path) kit.to_pdf(file_name)
file file
end end

@ -1,7 +1,7 @@
# 执行示例 bundle exec rake zip_pack:shixun_pack args=123,2323 # 执行示例 bundle exec rake zip_pack:shixun_pack args=123,2323
namespace :zip_pack do namespace :zip_pack do
desc "手工打包作品" desc "手工打包作品"
OUTPUT_FOLDER = "/tmp" OUTPUT_FOLDER = "#{Rails.root}/files/archiveZip"
task :shixun_pack => :environment do task :shixun_pack => :environment do

Loading…
Cancel
Save