瀏覽代碼

修复后台编办js bug

olym 7 年之前
父節點
當前提交
1875bd951e
共有 1 個文件被更改,包括 1 次插入2 次删除
  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 gljLibData = gljList === undefined ? [] : JSON.parse(gljList);
     let feeLibData = feeRateList === undefined ? [] : JSON.parse(feeRateList);
+    mainTreeCol = mainTreeCol !== '' ? mainTreeCol.replace(/\n/g, '\\n') : mainTreeCol;
     mainTreeCol = mainTreeCol === '' ? '' : JSON.parse(mainTreeCol);
-
     let artificialCoefficientData = artificialCoefficientList === undefined ? [] : JSON.parse(artificialCoefficientList);
-    mainTreeCol = mainTreeCol.replace(/\n/g, '\\n');
     billsTemplateData = billsTemplateData.replace(/\n/g, '\\n');
 
     // 初始化 造价书列设置