浏览代码

fix: 修复数据导出禁用问题

zhangyuhan 1 年之前
父节点
当前提交
2f806fdab1
共有 3 个文件被更改,包括 14 次插入30 次删除
  1. 7 3
      src/web/staticres/css/dev2/biddingSearch.css
  2. 1 17
      src/web/staticres/js/superSearch.js
  3. 6 10
      src/web/templates/pc/supsearch.html

+ 7 - 3
src/web/staticres/css/dev2/biddingSearch.css

@@ -438,13 +438,13 @@ margin-left: 176px;
   color: #FFFFFF;
   background-color: #2cb7ca;
   border-radius:2px;
-  
-  
+
+
 }
 #searchInner .searchControl .searchTender .Price.select .Price-content span.active {
   background-color: #fff;
   background-image:url('/images/checked_.png')!important;
-  
+
 }
 
 #searchInner .searchControl .searchTender .Price .Price-content .PriceInput {
@@ -894,6 +894,10 @@ position: absolute;
 #right-export{
 	width: 100px !important;
 }
+#right-export[disabled] {
+  opacity: 0.5;
+  cursor: not-allowed;
+}
 
 #searchInner .split-line{
 	width:1px;

+ 1 - 17
src/web/staticres/js/superSearch.js

@@ -201,10 +201,6 @@ function getNewBids(pnum, size){
 			$(".pagination").hide();
 			$(".working").hide();
       $(".hasNoData").show();
-      $('#right-export').css({
-        'opacity': '0.5',
-        'cursor': 'not-allowed'
-      })
       // 隐藏页码
       searchInnerVue.showPage = false
     }
@@ -268,10 +264,6 @@ function getNewBiddings(num, size){
 			$(".pagination").hide();
 			$(".working").hide();
       $(".hasNoData").show();
-      $('#right-export').css({
-        'opacity': '0.5',
-        'cursor': 'not-allowed'
-      })
       // 隐藏页码
       searchInnerVue.showPage = false
       allCount = 0
@@ -896,10 +888,6 @@ function getVIPData(clickpaging){
 			}else{
 				$(".working").hide();
         $(".hasNoData").show();
-        $('#right-export').css({
-          'opacity': '0.5',
-          'cursor': 'not-allowed'
-        })
         // 隐藏页码
         searchInnerVue.showPage = false
 			}
@@ -1365,10 +1353,6 @@ function pcAjaxReqCallBack(r){
 		$(".pagination").hide();
 		$(".working").hide();
     $(".hasNoData").show();
-    $('#right-export').css({
-      'opacity': '0.5',
-      'cursor': 'not-allowed'
-    })
     // 隐藏页码
     searchInnerVue.showPage = false
 		submitflag=true;
@@ -1848,7 +1832,7 @@ function getEmployData () {
 // 收录操作
 $(document).on('click', '.icon-shoulu', function() {
   const id = $(this).attr('dataid')
-  const isChecked = $(this).hasClass('icon-a-Property1yishoulu') 
+  const isChecked = $(this).hasClass('icon-a-Property1yishoulu')
   const url = '/jyapi/crmApplication/employ/operate'
   const params = {
     idArr: id,

+ 6 - 10
src/web/templates/pc/supsearch.html

@@ -198,10 +198,6 @@
           $(".pagination").hide();
           $(".working").hide();
           $(".hasNoData").show();
-          $('#right-export').css({
-            'opacity': '0.5',
-            'cursor': 'not-allowed'
-          })
           if(isLimit==-1){
             $("#hasNoData_tiptext>font:eq(0)").hide();
             $("#hasNoData_tiptext>font:eq(1)").show();
@@ -229,10 +225,6 @@
           $(".pagination").hide();
           $(".working").hide();
           $(".hasNoData").show();
-          $('#right-export').css({
-            'opacity': '0.5',
-            'cursor': 'not-allowed'
-          })
           if(isLimit==-1){
             $("#hasNoData_tiptext>font:eq(0)").hide();
             $("#hasNoData_tiptext>font:eq(1)").show();
@@ -1573,7 +1565,7 @@
               <button  id="right-table" :class="{'active': dataTab=='table'}" @click="onCheckTypeData('table')">表格</button>
             </template>
             <div class="split-line line-common"></div>
-            <button id="right-export" data-need-bind-phone>数据导出</button>
+            <button id="right-export" data-need-bind-phone :disabled="!canNextDataExport">数据导出</button>
             <template v-if="!inResourceBIiframe">
               <div class="split-line line-common"></div>
               <button id="bid-collect">标讯收藏</button>
@@ -3095,7 +3087,11 @@ function checkTagDisabled () {
         } else {
           return '(包含任意关键词)'
         }
-      }
+      },
+      // 是否可进行数据导出
+      canNextDataExport: function () {
+        return this.listState.allCount > 0
+      },
     },
     watch: {
       'listState.allCount': function (val) {