Lou
2024-01-17 ef51ae09decb4e016a849d8a5d96be7f44dafc4f
subPackage/bs/views/repair.vue
@@ -1,6 +1,6 @@
<template>
   <view class="">
<!--       <u-navbar height="48" :autoBack="true" safeAreaInsetTop placeholder bgColor="transparent" leftIconColor="#fff">
      <!--       <u-navbar height="48" :autoBack="true" safeAreaInsetTop placeholder bgColor="transparent" leftIconColor="#fff">
      </u-navbar> -->
      <view class="top">
         <image class="top-img" src="/static/img/repair-bg.png" mode="aspectFill"></image>
@@ -9,7 +9,7 @@
      <view class="container">
         <view class="c-ff f-36">请选择您需要的服务</view>
         <view class="serve-box bgc-ff mb-20 flex j-c-s-b a-i-c">
            <view class="flex a-i-c"   @click="navToRecord()">
            <view class="flex a-i-c" @click="navToRecord()">
               <u-icon name="/static/icon/nav-09.png" width="91rpx" height="70rpx"></u-icon>
               <view class="flex f-d-c ml-40">
                  <text class="f-36">总申请</text>
@@ -19,7 +19,7 @@
                  </view>
               </view>
            </view>
            <view class="flex a-i-c"  @click="navToRecord(3)">
            <view class="flex a-i-c" @click="navToRecord(3)">
               <u-icon name="/static/icon/nav-10.png" width="91rpx" height="70rpx"></u-icon>
               <view class="flex f-d-c ml-40">
                  <text class="f-36">已处理</text>
@@ -34,10 +34,9 @@
         <view class="site-box bgc-ff flex">
            <view class="flex a-i-c">
               <u-icon name="map-fill" color="#AAAAAA"></u-icon>
               <text class="f-28 c-aa ml-20">当前小区:</text>
               <text class="f-28 c-aa ml-20">{{curSelectSite.addressType == 2?"当前地址:":"当前小区:"}}</text>
            </view>
            <text class="address f-28">{{ curSelectSite.name }}</text>
            <text class="address f-28">{{address ||  "暂无完善"}}</text>
         </view>
         <view class="nav flex flex-wrap j-c-s-b">
@@ -49,7 +48,7 @@
                  <button class="item-btn" :style="{backgroundColor:i.background}">立即上报</button>
               </view>
            </view>
            <view class="nav-item" @click="navTo('addRepair')"   v-if="curSelectSite.addressType == 2">
            <view class="nav-item" @click="navTo('addRepair')" v-if="curSelectSite.addressType == 2">
               <image class="nav-item-bg" src="/static/icon/nav-bg-09.png" mode="aspectFill"></image>
               <view class="nav-item-inner flex f-d-c">
                  <text class="f-32 mb-30">企业商户上报</text>
@@ -69,6 +68,10 @@
   import {
      getStatistics
   } from '@/api/task/taskReportForRepairs'
   import {
      getPlaceDetail
   } from '@/api/place/place.js'
   export default {
      data() {
         return {
@@ -112,8 +115,8 @@
               //    path: "addRepair",
               //    background: "#F4B862"
               // },
            ]
            ],
            address: ""
         }
      },
      computed: {
@@ -123,9 +126,27 @@
         this.getStatistics()
         this.curSelectSite = uni.getStorageSync('siteInfo')
         console.log(this.curSelectSite);
         if (uni.getStorageSync('siteInfo').addressType == 2) {
            this.getPlace();
         } else {
            this.address = uni.getStorageSync('siteInfo').name;
         }
      },
      methods: {
         getPlace() {
            getPlaceDetail({
               houseCode: uni.getStorageSync("siteInfo").houseCode
            }).then(res => {
               console.log(res)
               if (res.code == 200) {
                  this.address = res.data.location;
               }
            })
         },
         navTo(item) {
            if (item.path) {
               let url = item.path + "?title=" + item.title + "&type=" + item.type
@@ -138,7 +159,7 @@
               this.statistic = res.data
            })
         },
         navToRecord(type=0){
         navToRecord(type = 0) {
            this.$u.func.globalNavigator(`/subPackage/bs/views/repairRecord?type=${type}`, "navTo")
         }
      }
@@ -248,10 +269,11 @@
            font-size: 22rpx;
            padding: 0;
            margin: 0;
            border:none;
            border: none;
         }
         .item-btn::after{
            border:none;
         .item-btn::after {
            border: none;
         }
      }