Commit ec722cbb12cf94c17c4bef17689dc6a3bef010ac
1 parent
3a596bfc
下拉框表格刷新
Showing
2 changed files
with
8 additions
and
3 deletions
src/components/Common/CommonComponent/index.js
| @@ -803,11 +803,11 @@ export default class CommonComponent extends Component { | @@ -803,11 +803,11 @@ export default class CommonComponent extends Component { | ||
| 803 | }, | 803 | }, |
| 804 | }; | 804 | }; |
| 805 | }); | 805 | }); |
| 806 | - | ||
| 807 | return ( | 806 | return ( |
| 808 | <Option key="" className="select-table-option"> | 807 | <Option key="" className="select-table-option"> |
| 809 | <div style={{ width: scrollX + 8, maxWidth: 'calc(100vw - 16px)', minWidth: '100%' }}> | 808 | <div style={{ width: scrollX + 8, maxWidth: 'calc(100vw - 16px)', minWidth: '100%' }}> |
| 810 | <Table | 809 | <Table |
| 810 | + key={Math.random()} | ||
| 811 | size="small" | 811 | size="small" |
| 812 | className="select-table" | 812 | className="select-table" |
| 813 | rowKey="sId" | 813 | rowKey="sId" |
src/mes/scheduledTasks/machineTasks/index.js
| @@ -539,7 +539,7 @@ const MachineTasks = baseProps => { | @@ -539,7 +539,7 @@ const MachineTasks = baseProps => { | ||
| 539 | }); | 539 | }); |
| 540 | } | 540 | } |
| 541 | // 顶部表格配置 | 541 | // 顶部表格配置 |
| 542 | - const tableProps = { | 542 | + let tableProps = { |
| 543 | ...commonBusiness.getTableTypes("slave0", props), | 543 | ...commonBusiness.getTableTypes("slave0", props), |
| 544 | // data: [{ sId: "123" }], | 544 | // data: [{ sId: "123" }], |
| 545 | tableProps: { | 545 | tableProps: { |
| @@ -578,10 +578,15 @@ const MachineTasks = baseProps => { | @@ -578,10 +578,15 @@ const MachineTasks = baseProps => { | ||
| 578 | onTableBtnClick: item => { | 578 | onTableBtnClick: item => { |
| 579 | props.onTableBtnClick(item); | 579 | props.onTableBtnClick(item); |
| 580 | }, | 580 | }, |
| 581 | - tableBtnsWidth: "200px", | 581 | + tableBtnsWidth: "200px", |
| 582 | fixedHeight: "335px", | 582 | fixedHeight: "335px", |
| 583 | onCopyTo: handleCopyTo | 583 | onCopyTo: handleCopyTo |
| 584 | }; | 584 | }; |
| 585 | + const record = tableProps?.data?.[0] || {} | ||
| 586 | + // 如果bManual为true的时候 操作栏加长 | ||
| 587 | + if (record && record.bManual) { | ||
| 588 | + tableProps.tableBtnsWidth = '300px' | ||
| 589 | + } | ||
| 585 | // 全部按钮事件 | 590 | // 全部按钮事件 |
| 586 | const tableAll = () => { | 591 | const tableAll = () => { |
| 587 | setSSrcNo(""); | 592 | setSSrcNo(""); |