Lou
2023-12-27 3a3eacecf7cff294b6567f67bfd6dab7191d9883
subPackage/workbench/views/rental.vue
@@ -7,7 +7,12 @@
         </view> -->
         <view class="tabs">
            <u-tabs :list="tabsList" :current="tabIndex" @click="tabClick" :inactiveStyle="{color:'#999999'}"
               :activeStyle="{color:'#017BFC'}"></u-tabs>
               :activeStyle="{color:'#017BFC'}">
                <view class="tab-filter flex j-c-c a-i-c" slot="right" @click="showDateModal">
                   <text class="f-28">时间筛选</text>
                   <u-icon name="arrow-down"></u-icon>
                </view>
            </u-tabs>
         </view>
         <view class="search-box">
            <u-search placeholder="请输入租户名" v-model="keyword" :clearabled="true" :showAction="true" :animation="true"
@@ -65,6 +70,7 @@
      </view>
      <u-toast ref="uToast"></u-toast>
      <u-loadmore :status="loadingStatus" loadmoreText="开始加载" loadingText="数据加载中" nomoreText="已经到底了" line />
       <date-range-modal  ref="dateRane"    @comfirm="handleComfirmDate"  @rest="handleRestDate"  />
   </view>
</template>
@@ -73,7 +79,12 @@
      getRentalHouseContent,
      getStatistics
   } from '@/api/houseRental/houseRental.js'
   import dateRangeModal from '@/components/dateRangeModal/modal.vue';
   export default {
      components:{
         dateRangeModal
      },
      data() {
         return {
@@ -175,7 +186,8 @@
                  value: 2
               },
            ],
            tabIndex: 0
            tabIndex: 0,
            selectDate:[]
         }
      },
      computed: {
@@ -191,7 +203,11 @@
            })
         }
      },
      onLoad() {
      onLoad(option) {
         if(option.from){
            this.tabIndex = 1
            this.pagingParams.auditStatus = 0;
         }
         this.currentRole = uni.getStorageSync('activeRole')
         this.getStatistics()
      },
@@ -285,6 +301,12 @@
            const {
               roleName
            } = this.currentRole
            if(this.selectDate.length){
                this.pagingParams.startTime = this.selectDate[0],
                this.pagingParams.endTime = this.selectDate[1]
            }
            const {
               code,
               data: {
@@ -330,6 +352,19 @@
               current: 1,
               size: 10
            }
         },
         showDateModal(){
            this.$refs.dateRane.open();
         },
         handleRestDate(){
            this.selectDate = [];
            this.resetParams();
            this.getRentalHouseInfo()
         },
         handleComfirmDate(val){
            this.selectDate = val;
            this.resetParams();
            this.getRentalHouseInfo()
         }
      }
   }
@@ -358,6 +393,13 @@
      height: 100rpx;
   }
   .tabs{
      width:100%;
   }
   .tab-filter {
      padding: 0 20rpx;
   }
   .search-box {
      padding: 20rpx 24rpx 30rpx;