Commit 760f81c761b4628deebdec62260c11dcddea1273

Authored by Min
1 parent 05191c58

1.主页流程排序不对,没有根据iOrder排序

src/components/IndexCenter/IndexCenter.js
@@ -328,6 +328,7 @@ class IndexCenter extends Component { @@ -328,6 +328,7 @@ class IndexCenter extends Component {
328 328
329 if (commonUtils.isNotEmptyArr(tableTreeData[0].children)) { 329 if (commonUtils.isNotEmptyArr(tableTreeData[0].children)) {
330 const { sId: activeTree, data: tableData, columns } = tableTreeData[0].children[0]; 330 const { sId: activeTree, data: tableData, columns } = tableTreeData[0].children[0];
  331 + const sortedTableData = tableData.slice().sort((a, b) => (a.iOrder ?? 0) - (b.iOrder ?? 0));
331 this.treeId = 'treeId_' + activeTree; 332 this.treeId = 'treeId_' + activeTree;
332 if (this.curActiveTree) { 333 if (this.curActiveTree) {
333 this.activeTree = this.curActiveTree; 334 this.activeTree = this.curActiveTree;
@@ -337,7 +338,7 @@ class IndexCenter extends Component { @@ -337,7 +338,7 @@ class IndexCenter extends Component {
337 338
338 if (!sNotShowChildFlow) { 339 if (!sNotShowChildFlow) {
339 const flowJson = {}; 340 const flowJson = {};
340 - tableData.forEach((item, flowIndex) => { 341 + sortedTableData.forEach((item, flowIndex) => {
341 let sChildFlow = item.sChildFlow; 342 let sChildFlow = item.sChildFlow;
342 if (!sChildFlow) { 343 if (!sChildFlow) {
343 sChildFlow = OtherFlow; 344 sChildFlow = OtherFlow;
@@ -431,7 +432,7 @@ class IndexCenter extends Component { @@ -431,7 +432,7 @@ class IndexCenter extends Component {
431 } 432 }
432 } 433 }
433 if (!addState.tableData) { 434 if (!addState.tableData) {
434 - addState.tableData = tableData; 435 + addState.tableData = sortedTableData;
435 addState.columns = columns; 436 addState.columns = columns;
436 this.tableTreeScrollTop = 0; 437 this.tableTreeScrollTop = 0;
437 this.kpiTableScrollTop = 0; 438 this.kpiTableScrollTop = 0;