{
title: 'evaluation'
, field: 'report_score'
, align: 'right'
, width: 200
, templet: function (d) {
return '<div id="score' + d.report_id + '" title="' + d.report_score + '"></div>'}}Copy the code
done: function (res) {
var data = res.data
console.log(data)
for (var item in data) {
rate.render({
elem: '#score' + data[item].report_id
, length: 10
, value: data[item].report_score / 10
, readonly: true}}})Copy the code
// Not less than 80 points
rate.render({
elem: '#rate'
, length: 10
, value: '{$row[report_score]? $row[report_score]/10:$row[report_score]+8}'
, text: true
, setText: function (value) {
this.span.text(value + "0")},choose: function (val) {
if (val < 8) {
this.value = val = 8
}
$('[name=report_score]').val(val * 10)}})Copy the code