Browse Source

修复后台编办js bug

olym 7 years ago
parent
commit
1875bd951e
1 changed files with 1 additions and 2 deletions
  1. 1 2
      web/users/js/compilation.js

+ 1 - 2
web/users/js/compilation.js

@@ -234,10 +234,9 @@ function initCompilation() {
     let rationLibData = rationList === undefined ? [] : JSON.parse(rationList);
     let rationLibData = rationList === undefined ? [] : JSON.parse(rationList);
     let gljLibData = gljList === undefined ? [] : JSON.parse(gljList);
     let gljLibData = gljList === undefined ? [] : JSON.parse(gljList);
     let feeLibData = feeRateList === undefined ? [] : JSON.parse(feeRateList);
     let feeLibData = feeRateList === undefined ? [] : JSON.parse(feeRateList);
+    mainTreeCol = mainTreeCol !== '' ? mainTreeCol.replace(/\n/g, '\\n') : mainTreeCol;
     mainTreeCol = mainTreeCol === '' ? '' : JSON.parse(mainTreeCol);
     mainTreeCol = mainTreeCol === '' ? '' : JSON.parse(mainTreeCol);
-
     let artificialCoefficientData = artificialCoefficientList === undefined ? [] : JSON.parse(artificialCoefficientList);
     let artificialCoefficientData = artificialCoefficientList === undefined ? [] : JSON.parse(artificialCoefficientList);
-    mainTreeCol = mainTreeCol.replace(/\n/g, '\\n');
     billsTemplateData = billsTemplateData.replace(/\n/g, '\\n');
     billsTemplateData = billsTemplateData.replace(/\n/g, '\\n');
 
 
     // 初始化 造价书列设置
     // 初始化 造价书列设置