Browse Source

feat: 临时处理数据导出新窗口打开

zhangyuhan 1 year ago
parent
commit
abcc44e240

+ 17 - 12
src/web/staticres/js/biddingSearch.js

@@ -399,6 +399,7 @@ function unique( arr ){
 }
 //携带当前检索跳转数据导出支付页面
 function toPaydataExport(){
+  var isOpenNewTab = true
 	if(!loginflag){
 		unseatflag = true;
 		$(".code-text").html('<span style="font-size:22px;margin-top:10px;display:inline-block;color:#252627;font-weight:normal;"><img id="wxpng" src="/images/wx1.png">请先微信扫码登录</span>')
@@ -423,7 +424,9 @@ function toPaydataExport(){
         }
       }
     })
-    window.history.replaceState(null, null, window.location.pathname+"?goback"+new Date().getTime());
+    if (!isOpenNewTab) {
+      window.history.replaceState(null, null, window.location.pathname+"?goback"+new Date().getTime());
+    }
 		//$("#zbSeatchT").attr("action","/front/dataExport/superSearchExport?selectIds=" + selectIds);
     var tmpInput= $("<input type='hidden' name='selectIds'/>");
     // 点击数据导出,先调用分页的函数,让selectDataIds为最新的数据
@@ -440,19 +443,21 @@ function toPaydataExport(){
     // if(ipt.length != 0) {
     //   $('#zbSeatchT input[name="selectIds"]').attr('name', '')
     // }
-	var params = $("#zbSeatchT").serialize();
-	var $form = jsCreateFrom(params)
-    $form.attr('target', "_parent")
+    var params = $("#zbSeatchT").serialize();
+    var $form = jsCreateFrom(params)
+    $form.attr('target', "_blank")
     $form.attr("action","/front/dataExport/superSearchExport").append(tmpInput);
-    if (goTemplateData.inIframe) {
-      window.$BRACE.methods.open({
-        route: {
-          link: window.location.pathname+"?goback"+new Date().getTime(),
-          appType: 'iframe'
-        }
-      })
+    if (!isOpenNewTab) {
+      if (goTemplateData.inIframe) {
+        window.$BRACE.methods.open({
+          route: {
+            link: window.location.pathname+"?goback"+new Date().getTime(),
+            appType: 'iframe'
+          }
+        })
+      }
     }
-	$form.submit();
+    $form.submit();
 	}
 }
 

+ 6 - 0
src/web/templates/frontRouter/pc/page_big_pc/sess/index.html

@@ -104,6 +104,12 @@
 <script src='{{Msg "seo" "cdn"}}/js/jquery.cookie.js?v={{Msg "seo" "version"}}' type="text/javascript"></script>
 <script src='{{Msg "seo" "cdn"}}/js/public-nav.js?v={{Msg "seo" "version"}}' type="text/javascript"></script>
 <script>
+    // 临时处理-返回筛选
+    $('.page--docs--index').on('click', '.fr.goback', function() {
+      if (history.length === 1) {
+        window.close();
+      }
+    });
     $(function () {
         haslogin({{.T.logid}});
         // 采购单位画像TDK设置(也可在page_bigmember_pc子应用里通过MetaInfo插件设置)