Lou
2023-12-27 3a3eacecf7cff294b6567f67bfd6dab7191d9883
subPackage/workbench/views/report.vue
@@ -1,10 +1,17 @@
<template>
   <view>
      <u-sticky>
         <view class="tab">
         <view class="hander">
            <view class="tab">
               <u-tabs :list="tabList" :scrollable="false" :current="tabIndex" @click="changeTab"
                  :inactiveStyle="{color:'#999999'}" :activeStyle="{color:'#017BFC'}"></u-tabs>
                  :inactiveStyle="{color:'#999999'}" :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 class="search">
                  <u-search placeholder="请输入需要查询信息的姓名" v-model="keyWord" :clearabled="true" :showAction="true"
                     :animation="true" @search="searchConfirm" @clear="clearConfirm"></u-search>
@@ -30,9 +37,14 @@
               <text class="f-28">事发地</text>
               <text class="address f-28 c-66">{{ item.address || "" }}</text>
            </view>
            <view class="item-row flex a-i-c j-c-s-b f-28">
               <text>时间</text>
               <text class="c-66">{{item.createTime}}</text>
            </view>
         </view>
      </view>
      <u-loadmore :status="loadingStatus" loadmoreText="开始加载" loadingText="数据加载中" nomoreText="没有更多了" line />
      <date-range-modal  ref="dateRane"    @comfirm="handleComfirmDate"  @rest="handleRestDate"  />
   </view>
</template>
@@ -40,7 +52,11 @@
   import {
      getPage
   } from '@/api/task/taskReportForRepairs.js'
   import dateRangeModal from '@/components/dateRangeModal/modal.vue';
   export default {
      components:{
         dateRangeModal
      },
      data() {
         return {
            reportList: [],
@@ -48,7 +64,13 @@
               current: 1,
               size: 10
            },
            tabList: [{
            tabList: [
               {
                     name: "全部",
                     status: "",
                  },
               {
                  name: "待处理",
                  status: 1,
                  type: 'warning'
@@ -87,11 +109,20 @@
               }
            ],
            tabIndex: 0,
            tabStatus: 1,
            tabStatus:"",
            keyWord: '',
            loadingStatus: 'nomore'
            loadingStatus: 'nomore',
            selectDate:[]
         }
      },
      onLoad(option) {
         if(option.from){
            this.tabIndex = 1;
            this.tabStatus = 1;
         }
      },
      onShow() {
         this.currentRole = uni.getStorageSync("activeRole")
         this.reportList = []
@@ -107,6 +138,10 @@
            const params = {
               realName: this.keyWord,
               confirmFlag: this.tabStatus
            }
            if(this.selectDate.length){
                 params.startTime = this.selectDate[0],
                 params.endTime = this.selectDate[1]
            }
            const { roleName } = this.currentRole
            const res = await getPage({
@@ -157,6 +192,21 @@
            const data = JSON.stringify(item)
            // this.$u.func.globalNavigator('/subPackage/workbench/views/reportAudit?id='+id)
            this.$u.func.globalNavigator('/subPackage/workbench/views/reportAudit?data='+data)
         },
         showDateModal(){
            this.$refs.dateRane.open();
         },
         handleRestDate(){
            this.selectDate = [];
            this.resetParams();
            this.getPageList()
         },
         handleComfirmDate(val){
            this.selectDate = val;
            this.resetParams();
            this.getPageList()
         }
      }
   }
@@ -167,9 +217,15 @@
      background-color: #F5F5F5;
   }
   .tab {
   .hander {
      background-color: #fff;
.tab {
         width: 100%;
      }
      .tab-filter {
         padding: 0 20rpx;
      }
      .search {
         padding: 20rpx 70rpx;
      }