Ver código fonte

修复新增时仍排序的问题

pm 1 ano atrás
pai
commit
71c1796016

+ 6 - 2
src/views/mes/job/jobm/NewOperations.vue

@@ -997,8 +997,12 @@ export default {
         new Set(points.map(point => point.pointId))
       ).map(id => points.find(point => point.pointId === id));
 
-      // console.log(uniquePoints, '去重后的选中节点');
-      this.tableData = this.sortTableDataByOrder(uniquePoints, this.orderTableData);//去重并排序
+      if(this.$route.query.ticketId=='null'){
+        this.tableData = uniquePoints; // 子组件传递过来的选中节点(去重后)
+      }else{
+        this.tableData = this.sortTableDataByOrder(uniquePoints, this.orderTableData);//去重并排序
+
+      }
       // this.tableData = uniquePoints; // 子组件传递过来的选中节点(去重后)
 
       // 使用 Set 来存储传递过来的点值

+ 6 - 1
src/views/mes/sop/sopm/NewSop.vue

@@ -872,7 +872,12 @@ export default {
       ).map((id) => points.find((point) => point.pointId === id));
 
       // console.log(uniquePoints, "去重后的选中节点");
-      this.tableData = this.sortTableDataByOrder(uniquePoints, this.orderTableData);//去重并排序
+      if(this.$route.query.sopId=='null'){
+        this.tableData = uniquePoints; // 子组件传递过来的选中节点(去重后)
+      }else{
+        this.tableData = this.sortTableDataByOrder(uniquePoints, this.orderTableData);//去重并排序
+
+      }
       console.log(this.tableData,'排序之后')
       // this.tableData = uniquePoints; // 子组件传递过来的选中节点(去重后)
 

+ 1 - 0
src/views/mes/sop/sopm/sopmLook.vue

@@ -979,6 +979,7 @@ export default {
       ).map((id) => points.find((point) => point.pointId === id));
 
       console.log(uniquePoints, "去重后的选中节点");
+
       this.tableData = this.sortTableDataByOrder(uniquePoints, this.orderTableData);//去重并排序
       // this.tableData = uniquePoints; // 子组件传递过来的选中节点(去重后)