Explorar o código

修复后台编办js bug

olym %!s(int64=7) %!d(string=hai) anos
pai
achega
1875bd951e
Modificáronse 1 ficheiros con 1 adicións e 2 borrados
  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');
 
     // 初始化 造价书列设置