This commit is contained in:
parent
c0ec824805
commit
bdef1ebb6d
|
|
@ -634,7 +634,17 @@ function initEnvironmentRecordTable() {
|
|||
return '<a href="javascript:void(0)" style="color: #00FFB8;" onclick="viewVideo()">查看</a>';
|
||||
}
|
||||
},
|
||||
{ field: 'analysis', title: '分析改进', width: '6%', align: 'center' },
|
||||
{
|
||||
field: 'analysis',
|
||||
title: '分析改进',
|
||||
width: '18%',
|
||||
align: 'left',
|
||||
fixed: 'right',
|
||||
templet: function (d) {
|
||||
const text = d.analysis || '';
|
||||
return '<div class="analysis-text-cell" title="' + text + '">' + text + '</div>';
|
||||
}
|
||||
},
|
||||
// {
|
||||
// title: '分析改进', width: '8%', align: 'center', templet: function (d) {
|
||||
// return '<a href="javascript:void(0)" style="color: #00FFB8;" onclick="analyzeImprove(\'' + (d.monitoringPointNumber || '') + '\')">分析与改进</a>';
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ function getTeamUtilizationList() {
|
|||
console.log(result, '班组人员利用率排名列表');
|
||||
if (result && Array.isArray(result)) {
|
||||
// 如果返回的是数组,直接使用
|
||||
updateTeamTable(result);
|
||||
updateTeamTable(result.data);
|
||||
} else if (result && result.data && Array.isArray(result.data)) {
|
||||
// 如果返回的是对象,取data字段
|
||||
updateTeamTable(result.data);
|
||||
|
|
@ -358,13 +358,20 @@ function updateTeamTable(data) {
|
|||
return;
|
||||
}
|
||||
|
||||
// 映射数据字段
|
||||
// 调试:打印第一条数据查看字段名
|
||||
if (data.length > 0) {
|
||||
console.log('第一条数据字段:', data[0]);
|
||||
}
|
||||
|
||||
// 映射数据字段(尝试多个可能的字段名)
|
||||
const tableData = data.map(item => ({
|
||||
workType: item.workType || '',
|
||||
teamName: item.teamName || '',
|
||||
teamLeader: item.teamLeader || '',
|
||||
totalPeople: item.totalPeople || 0,
|
||||
todayDuty: item.dutyNum || 0,
|
||||
// 尝试多个可能的字段名:peopleNum, totalPeople, teamPeople
|
||||
teamPeople: item.peopleNum || item.totalPeople || item.teamPeople || 0,
|
||||
// dutyNum 应该是正确的字段名
|
||||
dutyPeople: item.dutyNum || 0,
|
||||
utilizationRate: item.userRate || '0.00%'
|
||||
}));
|
||||
|
||||
|
|
@ -460,8 +467,18 @@ function initTeamTable() {
|
|||
{ field: 'workType', title: '专业', width: '16%', align: 'center' },
|
||||
{ field: 'teamName', title: '班组', width: '18%', align: 'center' },
|
||||
{ field: 'teamLeader', title: '班组负责人', width: '16%', align: 'center' },
|
||||
{ field: 'totalPeople', title: '班组人数', width: '14%', align: 'center' },
|
||||
{ field: 'todayDuty', title: '当日到岗', width: '14%', align: 'center' },
|
||||
{
|
||||
field: 'teamPeople', title: '班组人数', width: '14%', align: 'center',
|
||||
templet: function (d) {
|
||||
return '<span style="color: #00FEFC;">' + (d.teamPeople || 0) + '</span>';
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'dutyPeople', title: '当日到岗', width: '14%', align: 'center',
|
||||
templet: function (d) {
|
||||
return '<span style="color: #00FEFC;">' + (d.dutyPeople || 0) + '</span>';
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'utilizationRate',
|
||||
title: '利用率',
|
||||
|
|
|
|||
|
|
@ -298,7 +298,7 @@
|
|||
.table-container {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
overflow-x: auto;
|
||||
position: relative;
|
||||
min-height: 0;
|
||||
padding: 0 10px;
|
||||
|
|
@ -310,35 +310,62 @@
|
|||
}
|
||||
|
||||
.table-module .layui-table thead tr {
|
||||
background-color: rgba(13, 34, 37, 0.8) !important;
|
||||
background-color: rgba(13, 34, 37, 0.6) !important;
|
||||
}
|
||||
|
||||
.table-module .layui-table thead th {
|
||||
background-color: transparent !important;
|
||||
background-color: rgba(13, 34, 37, 0.6) !important;
|
||||
color: #FFFFFF !important;
|
||||
border-color: rgba(6, 189, 221, 0.3) !important;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.table-module .layui-table tbody tr {
|
||||
background-color: rgba(25, 62, 68, 0.3) !important;
|
||||
background-color: rgba(25, 62, 68, 0.2) !important;
|
||||
}
|
||||
|
||||
.table-module .layui-table tbody tr:hover {
|
||||
background-color: rgba(25, 62, 68, 0.6) !important;
|
||||
background-color: rgba(25, 62, 68, 0.4) !important;
|
||||
}
|
||||
|
||||
.table-module .layui-table tbody td {
|
||||
background-color: rgba(25, 62, 68, 0.2) !important;
|
||||
color: #FFFFFF !important;
|
||||
border-color: rgba(6, 189, 221, 0.2) !important;
|
||||
}
|
||||
|
||||
.table-module .layui-table-page {
|
||||
background-color: transparent !important;
|
||||
background-color: rgba(13, 34, 37, 0.5) !important;
|
||||
border-top: 1px solid rgba(6, 189, 221, 0.3) !important;
|
||||
padding: 10px 0 !important;
|
||||
}
|
||||
|
||||
/* 确保表格主体有滚动条 */
|
||||
.table-module .layui-table-body {
|
||||
overflow-y: auto !important;
|
||||
overflow-x: auto !important;
|
||||
}
|
||||
|
||||
/* 表格主体滚动条样式 */
|
||||
.table-module .layui-table-body::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
}
|
||||
|
||||
.table-module .layui-table-body::-webkit-scrollbar-track {
|
||||
background: rgba(13, 34, 37, 0.5);
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.table-module .layui-table-body::-webkit-scrollbar-thumb {
|
||||
background: rgba(6, 189, 221, 0.6);
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.table-module .layui-table-body::-webkit-scrollbar-thumb:hover {
|
||||
background: rgba(6, 189, 221, 0.8);
|
||||
}
|
||||
|
||||
.table-module .layui-table-page .layui-laypage {
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
|
@ -492,6 +519,47 @@
|
|||
height: 100%;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
/* 分析改进列文本样式 - 限制最多显示2行 */
|
||||
.analysis-text-cell {
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
word-break: break-word;
|
||||
line-height: 1.5;
|
||||
max-height: 3em;
|
||||
/* 2行的高度,1.5行高 * 2 */
|
||||
padding: 4px 8px;
|
||||
color: #FFFFFF;
|
||||
background-color: #16BAAA;
|
||||
}
|
||||
|
||||
/* 确保固定列样式正确 */
|
||||
.table-module .layui-table-fixed-r {
|
||||
box-shadow: -2px 0 6px rgba(0, 0, 0, 0.3);
|
||||
background-color: rgba(13, 34, 37, 0.7) !important;
|
||||
}
|
||||
|
||||
/* 固定列表头背景 */
|
||||
.table-module .layui-table-fixed-r .layui-table-header {
|
||||
background-color: rgba(13, 34, 37, 0.6) !important;
|
||||
}
|
||||
|
||||
/* 固定列单元格背景 */
|
||||
.table-module .layui-table-fixed-r .layui-table-body td {
|
||||
background-color: rgba(25, 62, 68, 1) !important;
|
||||
}
|
||||
|
||||
.table-module .layui-table-fixed-r .layui-table-body tr:hover td {
|
||||
background-color: rgba(25, 62, 68, 0.4) !important;
|
||||
}
|
||||
|
||||
/* 分析改进列单元格背景 */
|
||||
.table-module .layui-table tbody td .analysis-text-cell {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
</style>
|
||||
<script src="../../js/pages/dataAnalysisOctober/engineeringSafetyAnalysis.js" type="text/javascript"></script>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue