Lou
2023-12-23 77bb088d2a1bd0092b0fba5ccd24ceccbfe95606
subPackage/statistics/index.vue
@@ -50,7 +50,7 @@
               <text class="f-28">物业人员</text>
            </view>
            <view class="menu-item flex f-d-c a-i-c">
               <text class="c-main f-32 fw mb-20">0</text>
               <text class="c-main f-32 fw mb-20">{{gridData.ownersStatistics}}</text>
               <text class="f-28">业委会</text>
            </view>
            <!-- <view class="menu-item flex f-d-c a-i-c">
@@ -102,7 +102,7 @@
                  </u-grid-item>
                  <u-grid-item bgColor="#fff">
                     <view class="grid-item flex f-d-c a-i-c">
                        <text class="f-32 fw c-main mb-20">{{Number(reportData.result2) * 100}}</text>
                        <text class="f-32 fw c-main mb-20">{{ setNumber(reportData.result2)}</text>
                        <text class="f-28">办结比例</text>
                     </view>
                  </u-grid-item>
@@ -225,10 +225,33 @@
      },
      methods: {
         getRoleType(){
            let roleName = uni.getStorageSync("activeRole").roleName;
            if(roleName == "网格员"){
               return 1;
            }else if (roleName == "系统管理员"){
               return 2
            }else if(roleName == "民警"){
               return 3;
            }
         },
         setNumber(num){
            if(num){
               let n = Number(reportData.result2) * 100
               return  n.toFixed(2)
            }else {
               return num
            }
         },
         getHouseHoldData() {
            statisticsModal.getHouseholdStatistics({
               code: this.siteInfo.id,
               roleType: uni.getStorageSync("activeRole").roleAlias == "wgy" ? 1 : 2
               roleType: this.getRoleType()
            }).then(res => {
               // this.houseHoldData = res.data;
               let data = res.data;
@@ -273,7 +296,7 @@
         getHouseData() {
            statisticsModal.getHouseStatistics({
               code: this.siteInfo.id,
               roleType: uni.getStorageSync("activeRole").roleAlias == "wgy" ? 1 : 2
               roleType: this.getRoleType()
            }).then(res => {
               this.houseData = res.data;
            })
@@ -283,7 +306,7 @@
         getReportData() {
            statisticsModal.getReportStatistics({
               code: this.siteInfo.id,
               roleType: uni.getStorageSync("activeRole").roleAlias == "wgy" ? 1 : 2
               roleType: this.getRoleType()
            }).then(res => {
               console.log(res);
               this.reportData = res.data;
@@ -294,7 +317,7 @@
         getGridData() {
            statisticsModal.getGridStatistics({
               code: this.siteInfo.id,
               roleType: uni.getStorageSync("activeRole").roleAlias == "wgy" ? 1 : 2
               roleType: this.getRoleType()
            }).then(res => {
               console.log(res);
               this.gridData = res.data;