浏览代码

跳转到新选项卡被拦截

zhongzewei 7 年之前
父节点
当前提交
547dda4b10
共有 1 个文件被更改,包括 5 次插入2 次删除
  1. 5 2
      web/building_saas/pm/js/pm_main.js

+ 5 - 2
web/building_saas/pm/js/pm_main.js

@@ -82,9 +82,12 @@ let ProjTreeSetting = {
                 tdBindEvent: function (td, node) {
                     if (node.data.projType === projectType.tender) {
                         $('a:eq(1)', td).bind('click', function () {
+                            let newTab = window.open('about:blank');
                             BeforeOpenProject(node.id(), {'fullFolder': GetFullFolder(node.parent)}, function () {
-                                //window.location.href = '/main?project=' + node.id();
-                                window.open('/main?project=' + node.id());
+                                let mainUrl = '/main?project=' + node.id();
+                                CommonAjax.get(mainUrl, [], function () {
+                                    newTab.location.href = mainUrl;
+                                });
                             });
                             return false;
                         });