feat(RealTimeInventory): 添加单元格悬停提示功能

添加getCellTooltip方法用于显示单元格的机台信息和完成度百分比
master
huangjinysf 2 months ago
parent 00019f9f24
commit d8afca21b4

@ -53,6 +53,7 @@
padding: '8px 0',
transition: 'background-color 0.3s ease'
}"
:title="getCellTooltip(scope.row.specification, column.prop)"
>
<span v-if="!showDifference">
{{ scope.row[column.prop] || '-' }}
@ -507,6 +508,19 @@ const getEquipmentCodeColor = (specification, columnProp) => {
return status.equipment_color;
};
//
const getCellTooltip = (specification, columnProp) => {
// key
const keyWithSpec = `${columnProp}::${specification}`;
if (!uidProductionStatusMap.value.has(keyWithSpec)) {
return '';
}
const status = uidProductionStatusMap.value.get(keyWithSpec);
return `机台: ${status.equipment_code}\n完成度: ${(status.wight_completion/100).toFixed(2)}%`;
};
//
const refreshData = () => {
fetchData();

Loading…
Cancel
Save