备份修改
This commit is contained in:
@ -119,7 +119,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md2 widget-col-list column2" data-index="3" data-parentindex="0">
|
||||
@* <div class="layui-col-md2 widget-col-list column2" data-index="3" data-parentindex="0">
|
||||
<div id="select_4" class="layui-form-item active" data-id="select_4" data-tag="select"
|
||||
data-index="0">
|
||||
<label class="layui-form-label layui-form-required" style="width: 110px;">
|
||||
@ -154,7 +154,7 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> *@
|
||||
<div class="layui-col-md1 widget-col-list column3" data-index="4" data-parentindex="0">
|
||||
<div id="bottom_5" class="layui-form-item active" data-id="bottom_5" data-tag="bottom"
|
||||
data-index="0">
|
||||
@ -982,11 +982,65 @@
|
||||
"OUT": "5.68",
|
||||
"TimeZone": "峰电",
|
||||
},],
|
||||
// rowStyle: function (row, index) {
|
||||
// var style = ''; // 初始化样式变量
|
||||
// // 根据业务逻辑设置颜色
|
||||
// if (row.data.TimeZone == '平电') { // 替换 yourCondition 为你的条件判断
|
||||
// style = 'color: #fff; background-color: #ff5722;'; // 例如设置为橙色
|
||||
// } else if (row.data.TimeZone == '谷电') {
|
||||
// style = 'color: #fff; background-color: #ff5722;'; // 例如设置为橙色
|
||||
// }
|
||||
// return style;
|
||||
// },
|
||||
//skin: 'line', // 表格风格
|
||||
//even: true,
|
||||
height: 765,
|
||||
scrollY: true,
|
||||
page: false, // 是否显示分页
|
||||
limits: [5, 10, 15],
|
||||
limit: 24 // 每页默认显示的数量
|
||||
limit: 24, // 每页默认显示的数量
|
||||
done: function (res, curr, count, origin) {
|
||||
// var style = ''; // 初始化样式变量
|
||||
// // 根据业务逻辑设置颜色
|
||||
// if (row.data.TimeZone == '平电') { // 替换 yourCondition 为你的条件判断
|
||||
// style = 'color: #fff; background-color: #ff5722;'; // 例如设置为橙色
|
||||
// } else if (row.data.TimeZone == '谷电') {
|
||||
// style = 'color: #fff; background-color: #ff5722;'; // 例如设置为橙色
|
||||
// }
|
||||
// return style;
|
||||
|
||||
res.data.forEach(function (item, index) { //循环数据
|
||||
|
||||
if (item.TimeZone == '平电') { //当数据id为1时
|
||||
|
||||
var tr = $(".layui-table").find("tbody tr[data-index='" + index + "']"); //查找某一行的数据
|
||||
|
||||
tr.css("background-color", "#73C0DE"); //标记该行的背景色
|
||||
|
||||
// 给1-0-9列添加样式
|
||||
|
||||
// tr.find(".laytable-cell-1-0-9").css("color", "red"); //标记该行某一列的颜色
|
||||
|
||||
} else if(item.TimeZone == '尖电') {
|
||||
var tr = $(".layui-table").find("tbody tr[data-index='" + index + "']"); //查找某一行的数据
|
||||
|
||||
tr.css("background-color", "#EE6666"); //标记该行的背景色
|
||||
} else if (item.TimeZone == '峰电') {
|
||||
var tr = $(".layui-table").find("tbody tr[data-index='" + index + "']"); //查找某一行的数据
|
||||
|
||||
tr.css("background-color", "#FAC858"); //标记该行的背景色
|
||||
} else if (item.TimeZone == '平电') {
|
||||
var tr = $(".layui-table").find("tbody tr[data-index='" + index + "']"); //查找某一行的数据
|
||||
|
||||
tr.css("background-color", "#73C0DE"); //标记该行的背景色
|
||||
} else if (item.TimeZone == '谷电') {
|
||||
var tr = $(".layui-table").find("tbody tr[data-index='" + index + "']"); //查找某一行的数据
|
||||
|
||||
tr.css("background-color", "#3FB17C"); //标记该行的背景色
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user