1 { 2 file: 'usename', 3 title: '下发用户', 4 "20%", 5 align: 'center', 6 templet: function (d) { 7 var test = '<select style="border:solid 1px #009688;color:#009688; 82px; border-radius:5px;padding-left:15px;" lay-ignore class="selData">' 8 for (var j = 0; j < d.cmdbUsers.length; j++) { 9 if (j == 0) { 10 test += '<option value="' + d.cmdbUsers[j].id + '" selected>' + d.cmdbUsers[j].userName + '</option>'; 11 } else { 12 test += '<option value="' + d.cmdbUsers[j].id + '">' + d.cmdbUsers[j].userName + '</option>'; 13 } 14 } 15 test += ' </select>'; 16 return test; 17 } 18 }