change integer to A
This commit is contained in:
parent
88e35c7431
commit
a9942fd4b3
|
@ -6,18 +6,23 @@ module QualityAnalysisHelper
|
|||
if val <= 5
|
||||
arr << "很好"
|
||||
arr << "b_green2"
|
||||
arr << "A"
|
||||
elsif val. > 5 && val <= 10
|
||||
arr << "较好"
|
||||
arr << "b_slow_yellow"
|
||||
arr << "B"
|
||||
elsif val > 10 && val <= 20
|
||||
arr << "中等"
|
||||
arr << "b_yellow"
|
||||
arr << "C"
|
||||
elsif val > 20 && val <= 50
|
||||
arr << "较差"
|
||||
arr << "b_slow_red"
|
||||
arr << "D"
|
||||
elsif val > 20
|
||||
arr << "很差"
|
||||
arr << "b_red"
|
||||
arr << "E"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<div class="analysis-genral">
|
||||
<p id="container_sqale_rating" style="max-width:200px;min-height:200px;width:200px; margin:0 auto;"></p>
|
||||
<p class="fontGrey3">质量等级</p>
|
||||
<p class="fontBlue2 pr"><%= @ha["sqale_rating"] %>
|
||||
<p class="fontBlue2 pr"><%= sqale_rating_status(@ha["sqale_rating"].to_i)[2] %>
|
||||
<span class="f10 c_white analysis-genral-icon <%= sqale_rating_status(@ha["sqale_rating"].to_i)[1] %> borderRadius">
|
||||
<%= @ha["sqale_rating"].nil? ? "很好" : sqale_rating_status(@ha["sqale_rating"].to_i)[0] %>
|
||||
</span>
|
||||
|
|
Loading…
Reference in New Issue