Explorar el Código

fix: 山东养护(2016) 改为 山东养护(2016/2024)对名称写死的代码做处理

zhangweicheng hace 1 año
padre
commit
1a70625a5b

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 403 - 229
modules/main/facade/project_facade.js


+ 1 - 1
web/building_saas/main/html/main.html

@@ -108,7 +108,7 @@
                       <div class="btn-group ml-2">
                           <a class="dropdown-toggle btn btn-light btn-sm" data-toggle="dropdown" href="#" id="moreMenuA" role="button" aria-haspopup="true" aria-expanded="false">更多</a>
                           <div class="dropdown-menu dropright" id="moreMenu">
-                            <% if((compilationName === '公路造价(2018)' || compilationName === '安徽养护(2018)' || compilationName === '广东公路造价(2018)' || compilationName === '浙江养护(2005)' || compilationName === '山东养护(2016)' || (compilationName === '广西养护(2020)')) && boqType) { %>
+                            <% if((compilationName === '公路造价(2018)' || compilationName === '安徽养护(2018)' || compilationName === '广东公路造价(2018)' || compilationName === '浙江养护(2005)' || compilationName === '山东养护(2016/2024)' || (compilationName === '广西养护(2020)')) && boqType) { %>
                                 <a class="dropdown-item" id="open-export-modal" href="javascript:void(0);"><i class="fa fa-code-fork"></i> 数据接口</a>
                                 <!-- <a class="dropdown-item" id="open-export-modal" href="javascript:void(0);" data-toggle="modal" data-target="#interface-export-modal"><i class="fa fa-code-fork"></i> 数据接口</a> -->
                             <% }%>

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 685 - 206
web/building_saas/main/js/views/glj_view.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 4873 - 3725
web/building_saas/pm/js/pm_newMain.js


+ 46 - 33
web/building_saas/standard_interface/index.js

@@ -9,7 +9,7 @@
  * 注意:导出脚本必须有一个“entry”方法挂载在“INTERFACE_EXPORT”对象上。 eg: INTERFACE_EXPORT = { entry: () => void }
  * entry方法返回的结果必须为[{ data, exportKind,(导出类型,招、投标、控制价) fileName(文件名) }]
  * 其中data为xml的object形式:
- * xml: 
+ * xml:
  * <JingJiBiao Xmbh="001">
  *   <ZhaoBiaoXx Zbr="vian">
  *   </ZhaoBiaoXx>
@@ -19,11 +19,11 @@
  *   name: 'JingJiBiao',
  *   attrs: [{ name: 'xmbh', value: '001' }],
  *   children: [
- *      { 
+ *      {
  *        name: 'ZhaoBiaoXx',
  *        attrs: [{ name: 'Zbr', value: 'vian' }],
  *        children: []
- *      }  
+ *      }
  *   ]
  * }
  */
@@ -33,47 +33,56 @@ let INTERFACE_EXPORT = {};
 let INTERFACE_IMPORT = {};
 
 const STD_INTERFACE = (() => {
-  'use strict';
+  "use strict";
 
   // 根据地区配置,初始化地区选项
   function initInterfaceAreas($parentAreas, $subAreas) {
     const connectedAreas = Object.keys(INTERFACE_CONFIG);
     const parentMap = {};
-    connectedAreas.forEach(connectedArea => {
-      const areas = connectedArea.split('@');
-      if ((COMPILATION_NAME === '安徽养护(2018)' && areas[0] !== '安徽') ||
-        (COMPILATION_NAME === '广东公路造价(2018)' && areas[0] !== '广东') ||
-        (COMPILATION_NAME === '浙江养护(2005)' && areas[0] !== '浙江') ||
-        (COMPILATION_NAME === '广西养护(2020)' && areas[0] !== '广西')
-        ) {
+    connectedAreas.forEach((connectedArea) => {
+      const areas = connectedArea.split("@");
+      if (
+        (COMPILATION_NAME === "安徽养护(2018)" && areas[0] !== "安徽") ||
+        (COMPILATION_NAME === "广东公路造价(2018)" && areas[0] !== "广东") ||
+        (COMPILATION_NAME === "浙江养护(2005)" && areas[0] !== "浙江") ||
+        (COMPILATION_NAME === "广西养护(2020)" && areas[0] !== "广西")
+      ) {
         return;
       }
-      if (COMPILATION_NAME.includes('山东养护(2016)')) {
-        if (areas[0].includes('山东')) (parentMap[areas[0]] || (parentMap[areas[0]] = [])).push(areas[1]);
+      if (COMPILATION_NAME.includes("山东养护(2016/2024)")) {
+        if (areas[0].includes("山东"))
+          (parentMap[areas[0]] || (parentMap[areas[0]] = [])).push(areas[1]);
       } else {
         (parentMap[areas[0]] || (parentMap[areas[0]] = [])).push(areas[1]);
       }
     });
-    const parentAreasHtml = Object
-      .keys(parentMap)
-      .reduce((acc, area) => acc += `<option value="${area}">${area}</option>`, '');
+    const parentAreasHtml = Object.keys(parentMap).reduce(
+      (acc, area) => (acc += `<option value="${area}">${area}</option>`),
+      ""
+    );
     $parentAreas.html(parentAreasHtml);
-    const subAreasHtml = parentMap[Object.keys(parentMap)[0]].reduce((acc, area) => acc += `<option value="${area}">${area}</option>`, '');
+    const subAreasHtml = parentMap[Object.keys(parentMap)[0]].reduce(
+      (acc, area) => (acc += `<option value="${area}">${area}</option>`),
+      ""
+    );
     $subAreas.html(subAreasHtml);
     // 父级地区变更,子地区选项更新
     $parentAreas.change(function () {
-      if (typeof EXPORT_VIEW !== 'undefined') {
+      if (typeof EXPORT_VIEW !== "undefined") {
         EXPORT_VIEW.resetState(); // 清空导出接口缓存
       }
       const curArea = $(this).val();
-      const subAreasHtml = parentMap[curArea].reduce((acc, area) => acc += `<option value="${area}">${area}</option>`, '');
+      const subAreasHtml = parentMap[curArea].reduce(
+        (acc, area) => (acc += `<option value="${area}">${area}</option>`),
+        ""
+      );
       $subAreas.html(subAreasHtml);
     });
     $subAreas.change(function () {
-      if (typeof EXPORT_VIEW !== 'undefined') {
+      if (typeof EXPORT_VIEW !== "undefined") {
         EXPORT_VIEW.resetState(); // 清空导出接口缓存
       }
-    })
+    });
   }
 
   /**
@@ -86,37 +95,42 @@ const STD_INTERFACE = (() => {
    */
   function loadScript(path) {
     return new Promise((resolve, reject) => {
-      const scriptID = 'interface-script';
-      const body = document.getElementsByTagName('body')[0];
+      const scriptID = "interface-script";
+      const body = document.getElementsByTagName("body")[0];
       // 移除原来的
       const orgScript = document.getElementById(scriptID);
       if (orgScript) {
         body.removeChild(orgScript);
       }
       // 增加新的
-      const script = document.createElement('script');
+      const script = document.createElement("script");
       script.src = path;
-      script.type = 'text/javascript';
+      script.type = "text/javascript";
       script.id = scriptID;
       body.appendChild(script);
-      script.onload = script.onreadystatechange = function () { // ie、ff触发事件不同,都写上
-        if (!this.readyState || this.readyState === 'loaded' || this.readyState === 'complete') {
+      script.onload = script.onreadystatechange = function () {
+        // ie、ff触发事件不同,都写上
+        if (
+          !this.readyState ||
+          this.readyState === "loaded" ||
+          this.readyState === "complete"
+        ) {
           script.onload = script.onreadystatechange = null;
           resolve();
         }
       };
       script.onerror = function () {
-        reject('script加载失败。');
+        reject("script加载失败。");
       };
     });
   }
 
   const ScriptType = {
-    EXPORT: 'export',
-    IMPORT: 'import',
+    EXPORT: "export",
+    IMPORT: "import",
   };
 
-  let curArea = '';
+  let curArea = "";
   /**
    * 根据地区和脚本类型加载脚本
    * @param {String} area - 地区选项 eg: '安徽省@马鞍山'
@@ -145,5 +159,4 @@ const STD_INTERFACE = (() => {
     ScriptType,
     loadScriptByArea,
   };
-
-})();
+})();