From e8c9e6d9c0fa335758981345ca5e9afde0527a47 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Thu, 31 Oct 2019 09:41:00 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B6=85=E7=BA=A7=E7=AE=A1=E7=90=86=E5=91=98-?= =?UTF-8?q?=E6=8E=92=E8=A1=8C=E6=A6=9C=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admins/competition_settings/index.js | 106 +++++++++--------- .../admins/competition_settings.scss | 25 +++++ .../competition_settings/index.html.erb | 96 +++++++++------- 3 files changed, 132 insertions(+), 95 deletions(-) diff --git a/app/assets/javascripts/admins/competition_settings/index.js b/app/assets/javascripts/admins/competition_settings/index.js index 81fbf7519..92ecf2440 100644 --- a/app/assets/javascripts/admins/competition_settings/index.js +++ b/app/assets/javascripts/admins/competition_settings/index.js @@ -471,45 +471,45 @@ $(document).on('turbolinks:load', function(){ ' \n' + '
\n' + '
\n' + - ' 第1阶段\n' + + ' 第1阶段\n' + '
\n' + '
\n' + - ' 有效时间:\n' + - '
\n' + + '
有效时间:\n' + + '
\n' + ' \n' + '
\n' + ' ~\n' + - '
\n' + + '
\n' + ' \n' + - '
\n' + - ' 总任务数:\n' + - '
\n' + + '
\n' + + '
总任务数:\n' + + '
\n' + ' \n' + - '
\n' + - ' 成绩来源:\n' + - '
\n' + + '
\n' + + '
成绩来源:\n' + + '
\n' + ' \n' + - '
\n' + + '
\n' + '
\n' + '
\n' + '
\n' + - ' 任务1\n' + - '
\n' + + ' 任务1\n' + + '
\n' + ' \n' + '
\n' + '
\n' + '
\n' + - ' 任务2\n' + - '
\n' + + ' 任务2\n' + + '
\n' + ' \n' + '
\n' + '
\n' + '
\n' + - ' 任务3\n' + - '
\n' + + ' 任务3\n' + + '
\n' + ' \n' + '
\n' + '
\n' + @@ -547,45 +547,45 @@ $(document).on('turbolinks:load', function(){ var html='
\n' + - ' 第'+showCount+'阶段\n' + + ' 第'+showCount+'阶段\n' + '
\n' + '
\n' + - ' 有效时间:\n' + - '
\n' + + '
有效时间:\n' + + '
\n' + ' \n' + '
\n' + ' ~\n' + - '
\n' + + '
\n' + ' \n' + - '
\n' + - ' 总任务数:\n' + - '
\n' + + '
\n' + + '
总任务数:\n' + + '
\n' + ' \n' + - '
\n' + - ' 成绩来源:\n' + - '
\n' + + '
\n' + + '
成绩来源:\n' + + '
\n' + ' \n' + - '
\n' + + '
\n' + '
\n' + '
\n'+ '
\n' + - ' 任务1\n' + - '
\n' + + ' 任务1\n' + + '
\n' + ' \n' + '
\n' + '
\n' + '
\n' + - ' 任务2\n' + - '
\n' + + ' 任务2\n' + + '
\n' + ' \n' + '
\n' + '
\n' + '
\n' + - ' 任务3\n' + - '
\n' + + ' 任务3\n' + + '
\n' + ' \n' + '
\n' + '
\n' + @@ -633,8 +633,8 @@ function change_total(item) { var html = ""; if(count > divCount){ for(var i=0;i < count-divCount ;i++){ - html+='
任务'+(divCount+i+1)+'\n' + - '
\n' + + html+='
任务'+(divCount+i+1)+'\n' + + '
\n' + '\n' + '
\n' + '
'; @@ -688,45 +688,45 @@ function addNewTab(competition_id) { '
\n' + '
\n' + '
\n' + - ' 第1阶段\n' + + ' 第1阶段\n' + '
\n' + '
\n' + - ' 有效时间:\n' + - '
\n' + + '
有效时间:\n' + + '
\n' + ' \n' + '
\n' + ' ~\n' + - '
\n' + + '
\n' + ' \n' + - '
\n' + - ' 总任务数:\n' + - '
\n' + + '
\n' + + '
总任务数:\n' + + '
\n' + ' \n' + - '
\n' + - ' 成绩来源:\n' + - '
\n' + + '
\n' + + '
成绩来源:\n' + + '
\n' + ' \n' + - '
\n' + + '
\n' + '
\n' + '
\n' + '
\n' + - ' 任务1\n' + - '
\n' + + ' 任务1\n' + + '
\n' + ' \n' + '
\n' + '
\n' + '
\n' + - ' 任务2\n' + - '
\n' + + ' 任务2\n' + + '
\n' + ' \n' + '
\n' + '
\n' + '
\n' + - ' 任务3\n' + - '
\n' + + ' 任务3\n' + + '
\n' + ' \n' + '
\n' + '
\n' + diff --git a/app/assets/stylesheets/admins/competition_settings.scss b/app/assets/stylesheets/admins/competition_settings.scss index cef12cae3..481a2d9b0 100644 --- a/app/assets/stylesheets/admins/competition_settings.scss +++ b/app/assets/stylesheets/admins/competition_settings.scss @@ -87,5 +87,30 @@ .row:last-child{ border:none; } + + .task_Input_div:nth-child(3n-2) > span.col-4{ + flex: 0 0 81px; + max-width: 81px; + } + .task_Input_div:nth-child(3n-2){ + flex: 0 0 50%; + max-width: 50%; + } + .task_Input_div:nth-child(3n-1){ + flex: 0 0 25%; + max-width: 25%; + } + .task_Input_div:nth-child(3n){ + flex: 0 0 33.3%; + max-width: 33.3%; + } + .task_Input_div:nth-child(3n) > span.col-4{ + flex: 0 0 25%; + max-width: 25%; + } + .task_Input_div:nth-child(3n) > div.col-6{ + flex: 0 0 58.3%; + max-width: 58.3%; + } } } \ No newline at end of file diff --git a/app/views/admins/competition_settings/index.html.erb b/app/views/admins/competition_settings/index.html.erb index 225f05573..1c60f0601 100644 --- a/app/views/admins/competition_settings/index.html.erb +++ b/app/views/admins/competition_settings/index.html.erb @@ -386,34 +386,40 @@
<% stage.competition_stage_sections.each_with_index do |section, j| %>
- 第<%= j + 1 %>阶段 + 第<%= j + 1 %>阶段
- 有效时间: -
- <%= text_field_tag 'stage[][start_time]', section.start_time&.strftime('%Y-%m-%d %H:%M'), autocomplete: 'off', class: 'section-start-time form-control', placeholder: '有效开始时间' %> -
- ~ -
- <%= text_field_tag 'stage[][end_time]', section.end_time&.strftime('%Y-%m-%d %H:%M'), autocomplete: 'off', class: 'section-end-time form-control', placeholder: '有效结束时间' %> +
+ 有效时间: +
+ <%= text_field_tag 'stage[][start_time]', section.start_time&.strftime('%Y-%m-%d %H:%M'), autocomplete: 'off', class: 'section-start-time form-control', placeholder: '有效开始时间' %> +
+ ~ +
+ <%= text_field_tag 'stage[][end_time]', section.end_time&.strftime('%Y-%m-%d %H:%M'), autocomplete: 'off', class: 'section-end-time form-control', placeholder: '有效结束时间' %> +
- 总任务数: -
- +
+ 总任务数: +
+ +
- 成绩来源: -
- +
+ 成绩来源: +
+ +
<% section.competition_entries.each_with_index do |entry, z| %>
- 任务<%= z+1 %> -
+ 任务<%= z+1 %> +
@@ -450,45 +456,51 @@
- 第1阶段 + 第1阶段
- 有效时间: -
- <%= text_field_tag 'stage[][start_time]', '', autocomplete: 'off', class: 'section-start-time form-control', placeholder: '有效开始时间' %> -
- ~ -
- <%= text_field_tag 'stage[][end_time]', '', autocomplete: 'off', class: 'section-end-time form-control', placeholder: '有效结束时间' %> +
+ 有效时间: +
+ <%= text_field_tag 'stage[][start_time]', '', autocomplete: 'off', class: 'section-start-time form-control', placeholder: '有效开始时间' %> +
+ ~ +
+ <%= text_field_tag 'stage[][end_time]', '', autocomplete: 'off', class: 'section-end-time form-control', placeholder: '有效结束时间' %> +
- 总任务数: -
- +
+ 总任务数: +
+ +
- 成绩来源: -
- +
+ 成绩来源: +
+ +
- 任务1 -
+ 任务1 +
- 任务2 -
+ 任务2 +
- 任务3 -
+ 任务3 +