Browse Source

批量替换单价文件弹窗中,使用“从其他建设项目中复制”,选择建设项目下拉建设项目名称排序应按照项目管理界面保持一致

vian 5 years ago
parent
commit
0bbdc7ce44
1 changed files with 6 additions and 1 deletions
  1. 6 1
      web/building_saas/pm/js/pm_newMain.js

+ 6 - 1
web/building_saas/pm/js/pm_newMain.js

@@ -1301,8 +1301,13 @@ const projTreeObj = {
     getFileListWithPath:function (list) {
         for(let n of list){
             let node = projTreeObj.tree.findNode(n.ID);
-            if(node) n.name = getPathName(node);
+            if(node) {
+                n.name = getPathName(node);
+            }
+            n.serialNo = node && node.serialNo() || 1;
         }
+        // 按照正确的树结构排序
+        list.sort((a, b) => a.serialNo - b.serialNo);
 
         function getPathName(node) {
             if(node.parent && node.parent.data){