Lou
2023-12-23 77bb088d2a1bd0092b0fba5ccd24ceccbfe95606
subPackage/workbench/views/audit.vue
@@ -5,7 +5,7 @@
            :activeStyle="{color:'#017BFC'}"></u-tabs>
      </view>
      <view class="list">
         <view class="list-item bgc-ff mb-20" v-for="(i,k) in list" :key="k" @click="navTo(i.name,i.id)">
         <view class="list-item bgc-ff mb-20" v-for="(i,k) in list" :key="k" @click="navTo(i.name,i.id,i.reportType)">
            <view class="item-title flex a-i-c j-c-s-b mb-20">
               <text class="f-32 fw">{{i.name}}</text>
               <u-tag v-if="i.status == 1" text="待审批" type="warning" plain plainFill></u-tag>
@@ -52,23 +52,33 @@
            loadingStatus: 'nomore',
            currentPage: 1,
            frequency: '',
            reportType:""
         }
      },
      onLoad(option) {
         if (option.type == 1) {
         // if (option.type == 1) {
         //    uni.setNavigationBarTitle({
         //       title: "一次性"
         //    })
         //    this.frequency = 1
         // }
         // if (option.type == 2) {
         //    uni.setNavigationBarTitle({
         //       title: "周期性"
         //    })
         //    this.frequency = 2
         // }
         if(option.reportType){
            this.reportType = option.reportType;
            uni.setNavigationBarTitle({
               title: "一次性"
               title:"取保候审"
            })
            this.frequency = 1
         }
         if (option.type == 2) {
            uni.setNavigationBarTitle({
               title: "周期性"
            })
            this.frequency = 2
         }
         this.getList()
      },
      onReachBottom() {
         this.currentPage++
@@ -84,12 +94,18 @@
            this.getList();
         },
         getList() {
            getAuditReportingList({
            let params = {
               page: this.currentPage,
               size: 20,
               status: this.currentStatus,
               frequency: this.frequency,
            }).then(res => {
            }
            if(this.reportType){
               params.reportType = this.reportType
            }
            getAuditReportingList(params).then(res => {
               if (res.code != 200) {
                  uni.showToast({
                     title: '数据请求失败',
@@ -102,16 +118,15 @@
               this.loadingStatus = 'nomore'
            })
         },
         navTo(name, id) {
            if (name == "旅馆安全") {
               this.$u.func.globalNavigator(`hotelReportDetail?id=${id}`)
            } else if (name == "取保候审") {
         navTo(name,id,type) {
            if(type == 1){
               this.$u.func.globalNavigator(`bailReportDetail?id=${id}`)
            } else if(name == "校园安全自查"){
               this.$u.func.globalNavigator(`schoolReportDetail?id=${id}`)
            }
            else {
            }else if (type == 2){
               this.$u.func.globalNavigator(`hotelReportDetail?id=${id}`)
            }else if (type == 3 || type == 4 || type == 5){
               this.$u.func.globalNavigator(`labelReportDetail?id=${id}`)
            }else if(type == 6){
               this.$u.func.globalNavigator(`schoolReportDetail?id=${id}`)
            }
         }
      }