瀏覽代碼

提交选中数增加

wenmenghao321 2 年之前
父節點
當前提交
d31d21bd10

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

@@ -148,7 +148,14 @@ $(function() {
   $('body').on('change','.custom-checkbox',function () {
     setTimeout(function () {
       let checkNum = selectDataIds ? selectDataIds.length : 0 ;
-      console.log(checkNum)
+      if( checkNum > 0 ) {
+        $('#checkNum-bid-box').show()
+        $('#checkNum-bid').html(checkNum)
+        $('#serchNum-bid').hide()
+      }else{
+        $('#checkNum-bid-box').hide()
+        $('#serchNum-bid').show()
+      }
     })
   })
 

+ 9 - 0
src/web/templates/frontRouter/pc/collection/sess/index.html

@@ -31,6 +31,13 @@
             .visited td {
               color: #999!important;
             }
+            .left .total-count{
+              display: inline-block;
+              margin-left: 12px;
+              font-size: 14px;
+              color: #686868;
+              line-height: 49px;
+            }
         </style>
 	</head>
 
@@ -149,6 +156,8 @@
                         <div class="left flex">
                             <el-checkbox v-model="currentPageAllChecked" @change="allCheckboxChange"></el-checkbox>
                             <div class="list-title">标讯收藏</div>
+                            <span class="total-count" v-if="checkNum > 0">已选<em class="highlight-text">${ checkNum }</em>条信息</span>
+                            <span class="total-count" v-else>搜索到<em class="highlight-text">${ listState.total }</em>条信息</span>
                         </div>
                         <div class="right flex" v-if="biEnv">
                             <div class="icon-box flex" @click="biBatchAddSelected">

+ 2 - 1
src/web/templates/pc/supsearch.html

@@ -1277,7 +1277,8 @@
       <div class="filter-table-container" :class="tableFixedTop? 'fixed' : ''">
         <div class="tabTitle clearfix" :class="tableFixedTop? 'table-fixed-top' : ''">
           <input class="custom-checkbox check-all" type="checkbox" />
-          <span class="tab-bid-count">搜索到<em style="color: #2cb7ca;">${ bidTotalCount() }</em>条信息</span>
+          <span class="tab-bid-count" id="serchNum-bid">搜索到<em style="color: #2cb7ca;">${ bidTotalCount() }</em>条信息</span>
+          <span class="tab-bid-count" id="checkNum-bid-box" style="display: none;">已选<em style="color: #2cb7ca;" id="checkNum-bid"></em>条信息</span>
           <ul id="newsclass" style="display:none;">
             <li>
               <a class="active" href="javascript:;" style="width:70px;">标题搜索</a>