Преглед изворни кода

电井商铺控制范围还原度修改,设备设施页面,切换系统查询 更多主要设备

yunxing пре 4 година
родитељ
комит
3487be8cf2
2 измењених фајлова са 32 додато и 9 уклоњено
  1. 18 7
      src/views/equipmentFacilities/ElectricWell.vue
  2. 14 2
      src/views/equipmentFacilities/index.vue

+ 18 - 7
src/views/equipmentFacilities/ElectricWell.vue

@@ -39,8 +39,7 @@
                             <span class='value'>{{detail.shopsnumList}}</span>
                         </div>
                     </div>
-                    <!-- 加载更多 -->
-                    <div class='load-more' v-show='!item.loadMore && item.data.length>2' @click='loadMore(item)'>加载更多</div>
+
                     <!-- 第三条以上 -->
                     <div v-show='item.loadMore &&  item.data.length>2' :key='key'>
                         <div class='well' v-for='(detail) in item.data.slice(2)' :key='detail.meterbox'>
@@ -58,6 +57,10 @@
 
                     <!-- </div> -->
                 </div>
+                <!-- 加载更多 -->
+                <div class='load-more-container' v-show='!item.loadMore && item.data.length>2' @click='loadMore(item)'>
+                    <div class='load-more'>加载更多</div>
+                </div>
             </div>
         </div>
         <!-- 无数据 -->
@@ -335,7 +338,9 @@ export default {
         // background-color: #fff;
         text-align: center;
         .search {
-            width: 80%;
+            width: 100%;
+            padding-left: 15px;
+            padding-right: 15px;
             margin: 0 auto;
             background: none;
         }
@@ -357,7 +362,7 @@ export default {
         color: #333333;
         .floor {
             width: 100%;
-            max-height: 400px;
+            max-height: 410px;
             overflow: auto;
             display: flex;
             flex-direction: column;
@@ -387,13 +392,13 @@ export default {
             }
             // 电井列表
             .well-container {
-                padding: 15px 15px 10px 15px;
+                padding: 0 15px;
                 flex: 1;
                 overflow: auto;
                 .well {
                     width: 100%;
                     // height: 130px;
-                    padding: 10px 0;
+                    padding: 15px 0;
                     border-bottom: 1px solid #e6e6e6;
                     .well-title {
                         font-size: 16px;
@@ -418,13 +423,19 @@ export default {
                         }
                     }
                 }
+            }
+            .load-more-container {
+                width: 100%;
+                height: 50px;
+                background: #f5f6f7;
+                text-align: center;
+                padding-top: 12px;
                 .load-more {
                     width: 80px;
                     height: 25px;
                     line-height: 25px;
                     text-align: center;
                     margin: 0 auto;
-                    margin-top: 10px;
                     color: #025baa;
                     background: #e5eef6;
                 }

+ 14 - 2
src/views/equipmentFacilities/index.vue

@@ -38,8 +38,8 @@
                     :key='item.category_name'
                     @click.native='goToEquipment(item)'
                 />
-                <!-- 更多主要设备 -->
-                <m-card class='card' :type='4' name unit v-if='!showMoreCardList' :total='0' @click.native='goToMoreEquipment' />
+                <!-- 更多主要设备,有moreCardList时才显示 -->
+                <m-card class='card' :type='4' name unit v-if='moreCardList.length &&  !showMoreCardList' :total='0' @click.native='goToMoreEquipment' />
                 <m-card
                     v-show='moreCardList.length && showMoreCardList'
                     class='card'
@@ -207,6 +207,11 @@ export default {
                     }
                     this.getTuliData({ smsxt: newV, system_code: dict[newV] })
                 }
+                // 八大系统,查询更多主要设备列表
+                let smsxtArr1 = ['1001', '1002', '1003', '1004', '1005', '1006', '1007', '1008']
+                if (smsxtArr1.includes(newV)) {
+                    this.getMoreCardList()
+                }
             },
             immediate: true,
         },
@@ -637,6 +642,12 @@ export default {
          */
         async goToMoreEquipment(e) {
             this.showMoreCardList = true
+        },
+        /**
+         * 查询更多主要设备
+         */
+        async getMoreCardList() {
+            // console.log('getMoreCardList')
             let getParams = {
                 plazaId: this.plazaId,
                 system_code: this.smsxt,
@@ -644,6 +655,7 @@ export default {
             let res = await queryMoreSystemCard({ getParams })
             console.log(res)
             if (!res?.data) {
+                this.moreCardList = []
                 return false
             }
             let moreCardList = res.data