Authored by 王涛

Merge branch 'joke' into 'master'

杭州-小型机服务器详情页样式优化

杭州-小型机服务器详情页样式优化

See merge request !190
... ... @@ -98,7 +98,7 @@ layui.define(['admin', 'table', 'common','sessions','commonDetail'], function (e
var data = res.map;
var jbxx = data.jbxx;
var tabletop = '<table id="table-assets-base-info" class="layui-table"><tbody>';
var tableTh='<thead><tr style="background-color: #d0ddec;"><th class="layui-table-cell" style="color: rgb(30,159,255);">属性</th><th class="layui-table-cell" style="color: rgb(30,159,255);">内容</th><th class="layui-table-cell"style="color: rgb(30,159,255);">属性</th><th class="layui-table-cell" style="color: rgb(30,159,255);">内容</th></tr></thead>'
var tableTh='<thead><tr style="background-color: #d0ddec;"><th class="layui-table-cell" style="color: rgb(30,159,255);background-color: rgb(235,245,249);">属性</th><th class="layui-table-cell" style="color: rgb(30,159,255);background-color: rgb(235,245,249);">内容</th><th class="layui-table-cell"style="color: rgb(30,159,255);background-color: rgb(235,245,249);">属性</th><th class="layui-table-cell" style="color: rgb(30,159,255);background-color: rgb(235,245,249);">内容</th></tr></thead>'
var tablebottom = "</tbody></table>";
var tableContent = '';
// 将数组转换为二位数组
... ... @@ -148,12 +148,15 @@ layui.define(['admin', 'table', 'common','sessions','commonDetail'], function (e
}
}
td += '<td style="width: 30%" data-idx="' + idx + '" data-type="value" data-source="' + dataSource + '" data-propgroup="' + v.propGroup + '" ' +
td += '<td class="layui-td-value" style="width: 30%" data-idx="' + idx + '" data-type="value" data-source="' + dataSource + '" data-propgroup="' + v.propGroup + '" ' +
'data-propkey="' + v.propKey + '" data-sort="' + v.sort + '" data-parentpropkey="' + v.parentPropKey + '" ' +
'data-id="' + v.id + '" data-dataresource="' + v.dataResource + '">' + val + '</td>';
});
tableContent += '<tr>' + td + '</tr>';
});
if (jbxx.length == 0){
tableContent = '<tr style="background-color: white;"> <td class="none" colspan="4" style="text-align: center;color: #999;background-color: white">无数据</td> </tr>';
}
$("#hostminicomputer_property").html(tabletop+ tableTh+ tableContent + tablebottom);
$(".layui-td-title").css("backgroundColor", "#F1F6F9")
if (data.data && data.data.length > 0) {//有分区信息
... ...
... ... @@ -14,7 +14,7 @@
<div class="lay-row">
<div class="lay-row-item">
<h5 class="lay-row-title">属性信息</h5>
<div class="layui-form-pane" id="hostminicomputer_property"></div>
<div class="layui-form layui-border-box" id="hostminicomputer_property"></div>
</div>
</div>
<div class="lay-row">
... ... @@ -35,6 +35,17 @@
</div>
</article>
<textarea id="host_minicomputer_param_id" style="display: none;">{{d}}</textarea>
<style>
#hostminicomputer_property tr:hover{
background-color: white !important;
}
#hostminicomputer_property .layui-td-title:hover{
background-color: rgb(241, 246, 249); !important;
}
#hostminicomputer_property .layui-td-value{
pointer-events: none !important;
}
</style>
<script>
layui.use('host_minicomputer_server', function (fn) {
var $ = layui.$;
... ...