|
|
|
|
@ -272,7 +272,7 @@ export default { |
|
|
|
|
// 计算文本宽度 |
|
|
|
|
const nameWidth = this.getTextWidth(nodeName); |
|
|
|
|
const codeWidth = this.getTextWidth(nodePartCode); |
|
|
|
|
const quotaWidth = nodeQuota ? this.getTextWidth(`${nodeQuota}个`) : 0; |
|
|
|
|
const quotaWidth = nodeQuota ? this.getTextWidth(`${nodeQuota}`) : 0; |
|
|
|
|
|
|
|
|
|
const maxWidth = Math.max(nameWidth, codeWidth, quotaWidth, 60); |
|
|
|
|
|
|
|
|
|
@ -296,7 +296,7 @@ export default { |
|
|
|
|
formatter: params => { |
|
|
|
|
const nodeData = params.data || params; |
|
|
|
|
nodeData.quota = nodeData.quota==-1?null:nodeData.quota |
|
|
|
|
const quotaText = nodeData.quota != null ? `${nodeData.quota}个` : ''; |
|
|
|
|
const quotaText = nodeData.quota != null ? `${nodeData.quota}` : ''; |
|
|
|
|
let result = `${nodeData.partCode}\n${nodeData.name}`; |
|
|
|
|
if (quotaText) { |
|
|
|
|
result += '\n' + quotaText; |
|
|
|
|
|