forked from Gitlink/forgeplus
Merge remote-tracking branch 'origin/dev_osredm_server' into dev_osredm_server
# Conflicts: # config/harmonious_dictionary/harmonious.hash
This commit is contained in:
commit
4b0d12ad59
|
@ -138,7 +138,7 @@ class CompetitionInfosController < ApplicationController
|
|||
next if target_index.nil?
|
||||
send_data[value] = row[target_index]
|
||||
end
|
||||
members_keys = column_names - enroll_fields.keys
|
||||
members_keys = column_names - enroll_fields.keys - ["*用户标识"]
|
||||
if EduSetting.get("is_local") == "true"
|
||||
members_keys = members_keys.each_slice(3).to_a
|
||||
else
|
||||
|
@ -163,7 +163,7 @@ class CompetitionInfosController < ApplicationController
|
|||
member_array << member
|
||||
end
|
||||
send_data["members"] = member_array
|
||||
login_index = column_names.index("用户标识*")
|
||||
login_index = column_names.index("*用户标识")
|
||||
user = User.find_by(login:row[login_index]) || User.find_by(phone: send_data['phone'])
|
||||
if user.present?
|
||||
begin
|
||||
|
@ -191,11 +191,11 @@ class CompetitionInfosController < ApplicationController
|
|||
format.xlsx {
|
||||
set_export_cookies
|
||||
enroll_fields = @competition_info.enroll_fields.except("ID")
|
||||
@table_columns = ["用户标识*"] | enroll_fields.keys
|
||||
@table_columns = ["*用户标识"] | enroll_fields.keys
|
||||
if EduSetting.get("is_local") == "true"
|
||||
@table_columns = @table_columns + ["成员姓名", "成员单位", "成员手机号"]
|
||||
@table_columns = @table_columns + ["*成员姓名", "*成员单位", "*成员手机号"]
|
||||
else
|
||||
@table_columns = @table_columns + ["成员姓名", "成员单位", "成员手机号", "职务", "jx"]
|
||||
@table_columns = @table_columns + ["*成员姓名", "*成员单位", "*成员手机号", "*职务", "*jx"]
|
||||
end
|
||||
render xlsx: "竞赛报名导入模板", template: "competition_infos/import_template.xlsx.axlsx", locals: { table_columns: @table_columns }
|
||||
}
|
||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue