فهرست منبع

新选项卡打开工具

zhongzewei 7 سال پیش
والد
کامیت
31f3f3a884

+ 8 - 2
web/building_saas/complementary_ration_lib/js/main.js

@@ -12,10 +12,16 @@ let compleRationMain = {
                     let libName = rstData[i].dispName;
                     $("#comple_ration_table").append(
                         "<tr id='tempId'>" +
-                        "<td><a href='/stdGljRepository/glj'>"+libName+"</a></td></tr>"
+                        "<td><a href='javascript:void(0);'>"+libName+"</a></td></tr>"
                     );
                     var newHref = "/complementaryRation/ration?repository="+id;
-                    $("#tempId td:first a").attr("href", newHref);
+                    $("#tempId td:first a").click(function () {
+                        let newHref = "/complementaryRation/ration?repository="+id;
+                        let newTab = window.open('about:blank');
+                        CommonAjax.get(newHref, [], function () {
+                            newTab.location.href = newHref;
+                        });
+                    });
                     $("#tempId").attr("id", id);
                 }
             }

+ 8 - 0
web/building_saas/main/js/views/project_view.js

@@ -1350,6 +1350,14 @@ $('#ZLFB_btn').click(function () {
     zlfb_object.getSectionInfo();
 });
 
+//工料机库
+$('#compleGljLib').click(function () {
+    let newTab = window.open('about:blank');
+    let newHref = '/complementaryGlj';
+    CommonAjax.get(newHref, [], function () {
+        newTab.location.href = newHref;
+    });
+});
 
 //显示至..
 let displayLevel = function(nodes, depth, type){

+ 5 - 1
web/building_saas/pm/js/pm_newMain.js

@@ -580,6 +580,10 @@ const projTreeObj = {
                 }
                 //单项文件,进入造价书界面
                 else if(node.data.projType === projectType.tender && withingClickArea()){
+                    let timeoutTime = 200;
+                    if($('.slide-sidebar').hasClass('open')){
+                        timeoutTime = 500;
+                    }
                     setTimeout(function () {
                         let newTab = window.open('about:blank');
                         BeforeOpenProject(node.data.ID, {'fullFolder': GetFullFolder(node.parent)}, function () {
@@ -589,7 +593,7 @@ const projTreeObj = {
                             });
                         });
                         return;
-                    }, 200);
+                    }, timeoutTime);
                 }
                 if (!node || node.children.length === 0) { return; }
             }

+ 1 - 1
web/common/html/header.html

@@ -13,7 +13,7 @@
                 <!--<a class="dropdown-item" href="/complementaryRation/main">定额库编辑器</a>-->
                 <a class="dropdown-item" href="javascript:void(0);" aria-expanded="false" data-toggle="modal" data-target="#opts-set"><i class="fa fa-sliders"></i> 选项</a>
                 <a class="dropdown-item" href="javascript:void(0);" data-toggle="modal" data-target="#comple-ration">定额库编辑器</a>
-                <a class="dropdown-item" href="/complementaryGlj">人材机库编辑器</a>
+                <a id="compleGljLib" class="dropdown-item" href="javascript:void(0);">人材机库编辑器</a>
             </div>
         </li>
         <li class="nav-item dropdown">