From 807d02b7a650c6450c313dd728848e02f74a1b78 Mon Sep 17 00:00:00 2001
From: Admin <978517621@qq.com>
Date: 星期一, 28 十一月 2022 15:15:34 +0800
Subject: [PATCH] 添加提示

---
 src/views/specialCheck/components/sumSheet.vue |   92 ++++++++++++++++++++++++++++-----------------
 1 files changed, 57 insertions(+), 35 deletions(-)

diff --git a/src/views/specialCheck/components/sumSheet.vue b/src/views/specialCheck/components/sumSheet.vue
index c8bb865..15e14a7 100644
--- a/src/views/specialCheck/components/sumSheet.vue
+++ b/src/views/specialCheck/components/sumSheet.vue
@@ -126,8 +126,8 @@
                         <td>{{thisLevelStatistic.thisLevelSpotCheckinfo.amerceEnterpriseNum}}</td>
                         <td>{{thisLevelStatistic.thisLevelSpotCheckinfo.amerceMoneySum}}</td>
                     </tr>
-                    <template v-for="(item,index) in institutionalData">
-                    <tr>
+                    <template v-if="institutionalData && institutionalData.length>0" v-for="(item,index) in institutionalData">
+                    <tr v-if="item.citySpotCheckinfo || item.areaSpotCheckinfo">
                         <td :rowspan="sheetStatus==1?2:1">{{ index + 1}}</td>
                         <td :rowspan="sheetStatus==1?2:1" class="point-item" @click="toDig(item.enterpriseCity,item.enterpriseArea)">
                             {{sheetStatus==1?item.enterpriseCity:item.enterpriseArea }}
@@ -146,32 +146,56 @@
                         <td :rowspan="sheetStatus==1?2:1">{{ item.majorHiddendangerNum }}</td>
                         <td :rowspan="sheetStatus==1?2:1">{{ item.completedRectifyHiddendangerSum }}</td>
                         <td :rowspan="sheetStatus==1?2:1">{{ item.completedRectifyMajorHiddendangerNum }}</td>
-                        <td :rowspan="sheetStatus==1?2:1">{{ item.hiddendangerRectifyRate==null?'--':item.hiddendangerRectifyRate + '%' }}</td>
+                        <td :rowspan="sheetStatus==1?2:1">{{ item.hiddendangerRectifyRate==null?'--':(item.hiddendangerRectifyRate + '%') }}</td>
                         <td>{{ sheetStatus==1?'设立区级':'县级' }}</td>
-                        <td class="point-item" @click="checkEnterprise(item.enterpriseCity,item.enterpriseArea)">{{sheetStatus==1?item.citySpotCheckinfo.spotCheckEnterpriseNum:item.areaSpotCheckinfo.spotCheckEnterpriseNum}}</td>
-                        <td>{{sheetStatus==1?item.citySpotCheckinfo.spotCheckRateRequire + '%':item.areaSpotCheckinfo.spotCheckRateRequire + '%'}}</td>
-                        <td v-if="sheetStatus==1" :class="item.citySpotCheckinfo.spotCheckCompleteRate<item.citySpotCheckinfo.spotCheckRateRequire?'warning':''">
-                            {{item.citySpotCheckinfo.spotCheckCompleteRate + '%'}}
+                        <td v-if="(item.citySpotCheckinfo && item.citySpotCheckinfo.spotCheckEnterpriseNum !== undefined)|| (item.areaSpotCheckinfo && item.areaSpotCheckinfo.spotCheckEnterpriseNum !== undefined)" class="point-item" @click="checkEnterprise(item.enterpriseCity,item.enterpriseArea)">
+                            {{sheetStatus==1?item.citySpotCheckinfo.spotCheckEnterpriseNum:item.areaSpotCheckinfo.spotCheckEnterpriseNum}}
+                        </td>
+                        <td v-if="(item.citySpotCheckinfo && item.citySpotCheckinfo.spotCheckRateRequire !== undefined)|| (item.areaSpotCheckinfo && item.areaSpotCheckinfo.spotCheckRateRequire !== undefined)">
+                            {{sheetStatus==1?(item.citySpotCheckinfo.spotCheckRateRequire + '%'):(item.areaSpotCheckinfo.spotCheckRateRequire + '%')}}
+                        </td>
+                        <td v-if="sheetStatus==1 && item.citySpotCheckinfo && item.citySpotCheckinfo.spotCheckCompleteRate!== undefined" :class="item.citySpotCheckinfo.spotCheckCompleteRate<item.citySpotCheckinfo.spotCheckRateRequire?'warning':''">
+                            {{item.citySpotCheckinfo.spotCheckCompleteRate==null?'--':(item.citySpotCheckinfo.spotCheckCompleteRate + '%')}}
                         </td>
                         <td v-else :class="item.areaSpotCheckinfo.spotCheckCompleteRate<item.areaSpotCheckinfo.spotCheckRateRequire?'warning':''">
-                            {{item.areaSpotCheckinfo.spotCheckCompleteRate + '%'}}
+                            {{item.areaSpotCheckinfo.spotCheckCompleteRate==null?'--':(item.areaSpotCheckinfo.spotCheckCompleteRate + '%')}}
                         </td>
-                        <td>{{sheetStatus==1?item.citySpotCheckHiddendangerinfo.spotCheckHiddendangerSum:item.areaSpotCheckHiddendangerinfo.spotCheckHiddendangerSum}}</td>
-                        <td>{{sheetStatus==1?item.citySpotCheckHiddendangerinfo.spotCheckMajorHiddendangerNum:item.areaSpotCheckHiddendangerinfo.spotCheckMajorHiddendangerNum}}</td>
-                        <td>{{sheetStatus==1?item.citySpotCheckHiddendangerinfo.spotCheckCompletedRectifyHiddendangerSum:item.areaSpotCheckHiddendangerinfo.spotCheckCompletedRectifyHiddendangerSum}}</td>
-                        <td>{{sheetStatus==1?item.citySpotCheckHiddendangerinfo.spotCheckCompletedRectifyMajorHiddendangerNum:item.areaSpotCheckHiddendangerinfo.spotCheckCompletedRectifyMajorHiddendangerNum}}</td>
-                        <td>
-                            {{sheetStatus==1?(item.citySpotCheckHiddendangerinfo.spotCheckHiddendangerRectifyRate==null?'--':item.citySpotCheckHiddendangerinfo.spotCheckHiddendangerRectifyRate + '%'):(item.areaSpotCheckHiddendangerinfo.spotCheckHiddendangerRectifyRate==null?'--':item.areaSpotCheckHiddendangerinfo.spotCheckHiddendangerRectifyRate + '%')}}</td>
-                        <td>{{sheetStatus==1?item.citySpotCheckinfo.revokeLicenseEnterpriseSum:item.areaSpotCheckinfo.revokeLicenseEnterpriseSum}}</td>
-                        <td>{{sheetStatus==1?item.citySpotCheckinfo.detainLicenseSum:item.areaSpotCheckinfo.detainLicenseSum}}</td>
-                        <td>{{sheetStatus==1?item.citySpotCheckinfo.amerceEnterpriseNum:item.areaSpotCheckinfo.amerceEnterpriseNum}}</td>
-                        <td>{{sheetStatus==1?item.citySpotCheckinfo.amerceMoneySum:item.areaSpotCheckinfo.amerceMoneySum}}</td>
+                        <td v-if="(item.citySpotCheckHiddendangerinfo && item.citySpotCheckHiddendangerinfo.spotCheckHiddendangerSum!== undefined)|| (item.areaSpotCheckHiddendangerinfo && item.areaSpotCheckHiddendangerinfo.spotCheckHiddendangerSum!== undefined)">
+                            {{sheetStatus==1?item.citySpotCheckHiddendangerinfo.spotCheckHiddendangerSum:item.areaSpotCheckHiddendangerinfo.spotCheckHiddendangerSum}}
+                        </td>
+                        <td v-if="(item.citySpotCheckHiddendangerinfo && item.citySpotCheckHiddendangerinfo.spotCheckMajorHiddendangerNum !== undefined)|| (item.areaSpotCheckHiddendangerinfo && item.areaSpotCheckHiddendangerinfo.spotCheckMajorHiddendangerNum !== undefined)">
+                            {{sheetStatus==1?item.citySpotCheckHiddendangerinfo.spotCheckMajorHiddendangerNum:item.areaSpotCheckHiddendangerinfo.spotCheckMajorHiddendangerNum}}
+                        </td>
+                        <td v-if="(item.citySpotCheckHiddendangerinfo && item.citySpotCheckHiddendangerinfo.spotCheckCompletedRectifyHiddendangerSum !== undefined)|| (item.areaSpotCheckHiddendangerinfo && item.areaSpotCheckHiddendangerinfo.spotCheckCompletedRectifyHiddendangerSum !== undefined)">
+                            {{sheetStatus==1?item.citySpotCheckHiddendangerinfo.spotCheckCompletedRectifyHiddendangerSum:item.areaSpotCheckHiddendangerinfo.spotCheckCompletedRectifyHiddendangerSum}}
+                        </td>
+                        <td v-if="(item.citySpotCheckHiddendangerinfo && item.citySpotCheckHiddendangerinfo.spotCheckCompletedRectifyMajorHiddendangerNum !== undefined)|| (item.areaSpotCheckHiddendangerinfo && item.areaSpotCheckHiddendangerinfo.spotCheckCompletedRectifyMajorHiddendangerNum !== undefined)">
+                            {{sheetStatus==1?item.citySpotCheckHiddendangerinfo.spotCheckCompletedRectifyMajorHiddendangerNum:item.areaSpotCheckHiddendangerinfo.spotCheckCompletedRectifyMajorHiddendangerNum}}
+                        </td>
+                        <td v-if="sheetStatus==1 && item.citySpotCheckHiddendangerinfo && item.citySpotCheckHiddendangerinfo.spotCheckHiddendangerRectifyRate !== undefined">
+                            {{item.citySpotCheckHiddendangerinfo.spotCheckHiddendangerRectifyRate == null ? '--' : (item.citySpotCheckHiddendangerinfo.spotCheckHiddendangerRectifyRate + '%') }}
+                        </td>
+                        <td v-else>
+                            {{item.areaSpotCheckHiddendangerinfo.spotCheckHiddendangerRectifyRate==null?'--': (item.areaSpotCheckHiddendangerinfo.spotCheckHiddendangerRectifyRate + '%')}}
+                        </td>
+                        <td v-if="(item.citySpotCheckinfo && item.citySpotCheckinfo.revokeLicenseEnterpriseSum !== undefined)|| (item.areaSpotCheckinfo && item.areaSpotCheckinfo.revokeLicenseEnterpriseSum !== undefined)">
+                            {{sheetStatus==1?item.citySpotCheckinfo.revokeLicenseEnterpriseSum:item.areaSpotCheckinfo.revokeLicenseEnterpriseSum}}
+                        </td>
+                        <td v-if="(item.citySpotCheckinfo && item.citySpotCheckinfo.detainLicenseSum !== undefined)|| (item.areaSpotCheckinfo && item.areaSpotCheckinfo.detainLicenseSum !== undefined)">
+                            {{sheetStatus==1?item.citySpotCheckinfo.detainLicenseSum:item.areaSpotCheckinfo.detainLicenseSum}}
+                        </td>
+                        <td v-if="(item.citySpotCheckinfo && item.citySpotCheckinfo.amerceEnterpriseNum !== undefined)|| (item.areaSpotCheckinfo && item.areaSpotCheckinfo.amerceEnterpriseNum !== undefined)">
+                            {{sheetStatus==1?item.citySpotCheckinfo.amerceEnterpriseNum:item.areaSpotCheckinfo.amerceEnterpriseNum}}
+                        </td>
+                        <td v-if="(item.citySpotCheckinfo && item.citySpotCheckinfo.amerceMoneySum !==undefined) || (item.areaSpotCheckinfo && item.areaSpotCheckinfo.amerceMoneySum!==undefined)">
+                            {{sheetStatus==1?item.citySpotCheckinfo.amerceMoneySum:item.areaSpotCheckinfo.amerceMoneySum}}
+                        </td>
                     </tr>
                     <tr v-if="sheetStatus==1">
                         <td>县级</td>
                         <td class="point-item" @click="checkEnterprise(item.enterpriseCity,'all')">{{item.areaSpotCheckinfo.spotCheckEnterpriseNum}}</td>
-                        <td>{{item.areaSpotCheckinfo.spotCheckRateRequire + '%'}}</td>
-                        <td :class="item.areaSpotCheckinfo.spotCheckCompleteRate<item.areaSpotCheckinfo.spotCheckRateRequire?'warning':''">{{item.areaSpotCheckinfo.spotCheckCompleteRate + '%'}}</td>
+                        <td>{{item.areaSpotCheckinfo.spotCheckRateRequire==null?'--':item.areaSpotCheckinfo.spotCheckRateRequire + '%'}}</td>
+                        <td :class="item.areaSpotCheckinfo.spotCheckCompleteRate<item.areaSpotCheckinfo.spotCheckRateRequire?'warning':''">{{item.areaSpotCheckinfo.spotCheckCompleteRate==null?'--':item.areaSpotCheckinfo.spotCheckCompleteRate + '%'}}</td>
                         <td>{{item.areaSpotCheckHiddendangerinfo.spotCheckHiddendangerSum}}</td>
                         <td>{{item.areaSpotCheckHiddendangerinfo.spotCheckMajorHiddendangerNum}}</td>
                         <td>{{item.areaSpotCheckHiddendangerinfo.spotCheckCompletedRectifyHiddendangerSum}}</td>
@@ -256,7 +280,7 @@
     created() {
         const t = this
         t.getCheckUnitType()
-        if(t.taskId){t.getDataStatistics()}
+        // if(t.taskId){t.getDataStatistics()}
     },
     computed: {
         ...mapGetters([
@@ -338,7 +362,6 @@
         },
         switchSheet() {
             const t = this
-            console.log(t.sheetStatus,'status')
             if(t.sheetStatus == 1 || t.sheetStatus == 2){
                 t.getDataStatistics()
             }else{
@@ -367,6 +390,7 @@
                 t.enterpriseCity = city
                 t.sheetStatus = 2
                 t.getDataStatistics()
+                console.log(t.sheetStatus,t.institutionalData[0].citySpotCheckinfo.spotCheckEnterpriseNum,'666666666666666666')
             }else{
                 t.sheetStatus = 3
                 t.$refs.areaSheet.taskId = t.taskId
@@ -415,12 +439,12 @@
 }
 .data-table{
     border-collapse: collapse;
-    border: 1px solid #ccc;
+    border: 1px solid #eee;
     margin: 0 0 20px;
     background: #fff;
     box-shadow: 0 3px 12px rgba(0,0,0,.2);
     tr{
-        border-bottom: 1px solid #ccc;
+        border-bottom: 1px solid #eee;
         white-space: nowrap;
         font-size: 12px;
         &:last-of-type{
@@ -429,25 +453,26 @@
 
         th{
             padding: 6px 4px;
-            border: 1px solid #ccc;
+            border: 1px solid #eee;
             border-left: none;
             font-weight: bolder;
             text-align: center;
-            color: #409EFF;
+            color: #333;
+            background: #F1F4F7;
 
             &:first-of-type{
-                border-top: 1px solid #ccc;
-                border-left: 1px solid #ccc;
+                border-top: 1px solid #eee;
+                border-left: 1px solid #eee;
             }
             &.dark-bg{
-                background: #409EFF;
+                background: #034ea2;
                 color: #fff;
             }
         }
 
         td{
             padding: 6px 4px;
-            border-right: 1px solid #ccc;
+            border-right: 1px solid #eee;
             text-align: center;
 
             &:last-of-type{
@@ -456,11 +481,8 @@
         }
         .point-item{
             cursor: pointer;
-
-            &:hover{
-                text-decoration: underline;
-                color: #409EFF;
-            }
+            text-decoration: underline;
+            color: #034ea2;
         }
         .warning{
             color: red;

--
Gitblit v1.9.2