Просмотр исходного кода

Merge branch '1.0.0_online' of http://192.168.1.41:3000/SmartCost/ConstructionCost into 1.0.0_online

zhongzewei 6 лет назад
Родитель
Сommit
68ff2501fa

+ 12 - 1
web/building_saas/js/global.js

@@ -154,4 +154,15 @@ function getFeeIndex(fees) {
 function replaceAll(FindText, RepText,str) {
     let regExp = new RegExp(FindText, "g");
     return str.replace(regExp, RepText);
-};
+};
+
+function setTimeoutSync(handle, time) {
+    return new Promise(function(resolve, reject) {
+        setTimeout(function () {
+            if (handle && typeof handle === 'function') {
+                handle();
+            }
+            resolve();
+        }, time);
+    });
+}

+ 6 - 1
web/building_saas/main/js/models/exportSEIInterface.js

@@ -213,6 +213,7 @@ async function exportSEI(projectID) {
     async function prepareTenderDatas(tenders,project) {
         for(let t of tenders){
             await setTenderData(t,project);
+            await setTimeoutSync(null,500);
         }
 
 
@@ -437,8 +438,9 @@ async function exportSEI(projectID) {
 
         function getFeatrue(node,parentMap){
             if(parentMap[node.ID]){//如果有子节点,那么它就是一个节点
+                let name = node.exportName?node.exportName:node.name;
                 let tem = {
-                    name:node.name.replace("*",""),
+                    name:name.replace("*",""),
                     attrs:[],
                     children:[]
                 };
@@ -448,6 +450,9 @@ async function exportSEI(projectID) {
                 }
                 return tem;
             }else {//如果没有子节点,那么它就是父节点的一个属性
+                if(node.isDetail == true){//如果是明细节点,则造一个明细节点
+                    return {name:"明细",attrs:[{name:"名称",value:node.value}],children:[]};
+                }
                 return {name:node.name.replace("*",""),value:node.value};
             }
         }