Commit 14fcaf310d1268cf0ba274425c3a24b9e084c014

Authored by chenxt
1 parent 701cc0c8

展示字段

src/mes/common/siderInfoComponent/index.js
@@ -641,7 +641,20 @@ const DeviceTargetInfoComponent = () => { @@ -641,7 +641,20 @@ const DeviceTargetInfoComponent = () => {
641 .filter(col => col?.bVisible === 1) 641 .filter(col => col?.bVisible === 1)
642 .map(col => col.sName) 642 .map(col => col.sName)
643 ); 643 );
644 - const result = showConfig.filter(field => visibleFieldNames.has(field.sName)); // 筛选数据 644 + const list = sColumnConfig
  645 + .slice(1)
  646 + .filter(col => col?.bVisible === 1)
  647 + const listMap = new Map(list.map(x => [x.sName, x]))
  648 + // const result = showConfig.filter(field => visibleFieldNames.has(field.sName)); // 筛选数据
  649 + const result = showConfig
  650 + .filter(item => item?.sName != null && listMap.has(item.sName))
  651 + .map(item => {
  652 + const matched = listMap.get(item.sName);
  653 + return {
  654 + ...item,
  655 + showName: matched.showName,
  656 + };
  657 + });
645 return ( 658 return (
646 659
647 <div className={styles.deviceTargetInfo}> 660 <div className={styles.deviceTargetInfo}>