Commit a98cb273b26881fd6009d0145e295e2eeccc8b5a
1 parent
06419a7d
优化设备维修样式;
Showing
2 changed files
with
22 additions
and
5 deletions
src/mes/serviceUpkeep/equipmentRepair/index.js
| @@ -92,14 +92,14 @@ const EquipmentInfo = props => { | @@ -92,14 +92,14 @@ const EquipmentInfo = props => { | ||
| 92 | const { sMachineNo, sMachineName } = viewRow; | 92 | const { sMachineNo, sMachineName } = viewRow; |
| 93 | return ( | 93 | return ( |
| 94 | <div className={styles.equipmentInfo}> | 94 | <div className={styles.equipmentInfo}> |
| 95 | - <div className={styles.title}>{getEquipmentTranslation(app, "设备信息")}</div> | 95 | + <div className={styles.title}><span title={getEquipmentTranslation(app, "设备信息")}>{getEquipmentTranslation(app, "设备信息")}</span></div> |
| 96 | <div className={styles.image} /> | 96 | <div className={styles.image} /> |
| 97 | <div className={styles.info}> | 97 | <div className={styles.info}> |
| 98 | <div className={styles.content}> | 98 | <div className={styles.content}> |
| 99 | <div>{getEquipmentTranslation(app, "设备编号")}:</div> | 99 | <div>{getEquipmentTranslation(app, "设备编号")}:</div> |
| 100 | <div>{sMachineNo}</div> | 100 | <div>{sMachineNo}</div> |
| 101 | <div>{getEquipmentTranslation(app, "设备名称")}:</div> | 101 | <div>{getEquipmentTranslation(app, "设备名称")}:</div> |
| 102 | - <div>{sMachineName}</div> | 102 | + <div><span title={sMachineName}>{sMachineName}</span></div> |
| 103 | </div> | 103 | </div> |
| 104 | </div> | 104 | </div> |
| 105 | </div> | 105 | </div> |
| @@ -159,7 +159,7 @@ const EquipmentFaultAnalysis = props => { | @@ -159,7 +159,7 @@ const EquipmentFaultAnalysis = props => { | ||
| 159 | 159 | ||
| 160 | return ( | 160 | return ( |
| 161 | <div className={styles.equipmentFaultAnalysis}> | 161 | <div className={styles.equipmentFaultAnalysis}> |
| 162 | - <div className={styles.title}>{title}</div> | 162 | + <div className={styles.title}><span title={title}>{title}</span></div> |
| 163 | <div className={styles.charts}> | 163 | <div className={styles.charts}> |
| 164 | {pieProps.data.length ? ( | 164 | {pieProps.data.length ? ( |
| 165 | <Pie {...pieProps} /> | 165 | <Pie {...pieProps} /> |
src/mes/serviceUpkeep/equipmentRepair/index.less
| @@ -48,7 +48,19 @@ | @@ -48,7 +48,19 @@ | ||
| 48 | } | 48 | } |
| 49 | 49 | ||
| 50 | >div:nth-of-type(4) { | 50 | >div:nth-of-type(4) { |
| 51 | - .flex(flex-start, flex-start) | 51 | + display: -webkit-box; |
| 52 | + /*! autoprefixer: ignore next */ | ||
| 53 | + -webkit-box-orient: vertical; | ||
| 54 | + -webkit-line-clamp: 2; | ||
| 55 | + /* 只保留 2 行 */ | ||
| 56 | + overflow: hidden; | ||
| 57 | + text-overflow: ellipsis; | ||
| 58 | + /* 兜底 */ | ||
| 59 | + white-space: normal; | ||
| 60 | + word-break: break-all; | ||
| 61 | + /* 覆盖 antd 默认 nowrap */ | ||
| 62 | + /* 按需调整,决定何时断行 */ | ||
| 63 | + line-height: 1.2; | ||
| 52 | } | 64 | } |
| 53 | } | 65 | } |
| 54 | } | 66 | } |
| @@ -59,10 +71,15 @@ | @@ -59,10 +71,15 @@ | ||
| 59 | 71 | ||
| 60 | .title { | 72 | .title { |
| 61 | .size(100%, 40px); | 73 | .size(100%, 40px); |
| 62 | - .flex(center); | 74 | + // .flex(center); |
| 63 | font-size: 20px; | 75 | font-size: 20px; |
| 64 | color: #1890ff; | 76 | color: #1890ff; |
| 65 | font-weight: bold; | 77 | font-weight: bold; |
| 78 | + // 超出省略号 | ||
| 79 | + white-space: nowrap; | ||
| 80 | + overflow: hidden; | ||
| 81 | + text-overflow: ellipsis; | ||
| 82 | + text-align: center; | ||
| 66 | } | 83 | } |
| 67 | 84 | ||
| 68 | .charts { | 85 | .charts { |