温红权 3 years ago
parent
commit
585ba5ac53
1 changed files with 14 additions and 14 deletions
  1. 14 14
      ruoyi-ui/src/components/map/index.vue

+ 14 - 14
ruoyi-ui/src/components/map/index.vue

@@ -231,7 +231,7 @@
             <el-table
               :header-cell-style="{ background: '#e4eafc'}"
               ref="singleTable"
-              :data="tableData.minor"
+              :data="tableData.main"
               highlight-current-row
               style="width: 100%"
               class="tableSc">
@@ -249,15 +249,15 @@
                 :label="'硫含量'"
               >
                 <template slot-scope="scope">
-                  <div v-if="scope.row.so2Percent > normalPer" style="color:red">{{ scope.row.so2Percent }}% ↑ {{ ((scope.row.so2Percent - normalPer) / normalPer * 100).toFixed(0) }}%</div>
-                  <div v-if=" scope.row.so2Percent <= normalPer">{{ scope.row.so2Percent }}%</div>
+                  <div v-if="scope.row.so2Percent!=null && scope.row.so2Percent > normalPer" style="color:red">{{ scope.row.so2Percent }}% ↑ {{ ((scope.row.so2Percent - normalPer) / normalPer * 100).toFixed(0) }}%</div>
+                  <div v-if="scope.row.so2Percent!=null && scope.row.so2Percent <= normalPer">{{ scope.row.so2Percent }}%</div>
                 </template>
               </el-table-column>
               <el-table-column
                 :label="'黑度'">
                 <template slot-scope="scope">
-                  <div v-if="scope.row.rcgSoot > normalCount" style="color:red">{{ scope.row.rcgSoot }}度 ↑ {{ ((scope.row.rcgSoot - normalCount) / normalCount * 100).toFixed(0) }}%</div>
-                  <div v-if=" scope.row.rcgSoot <= normalCount">{{ scope.row.rcgSoot }}度</div>
+                  <div v-if="scope.row.rcgSoot!=null && scope.row.rcgSoot > normalCount" style="color:red">{{ scope.row.rcgSoot }}度 ↑ {{ ((scope.row.rcgSoot - normalCount) / normalCount * 100).toFixed(0) }}%</div>
+                  <div v-if="scope.row.rcgSoot!=null &&  scope.row.rcgSoot <= normalCount">{{ scope.row.rcgSoot }}度</div>
                 </template>
               </el-table-column>
               <el-table-column
@@ -272,7 +272,7 @@
             <el-table
               :header-cell-style="{ background: '#e4eafc'}"
               ref="singleTable"
-              :data="tableData.main"
+              :data="tableData.minor"
               highlight-current-row
               style="width: 100%"
               class="tableSc"
@@ -291,31 +291,31 @@
                 :label="'SO2浓度'"
               >
                 <template slot-scope="scope">
-                  <div v-if="scope.row.so2Concentration > normalPer" style="color:red">{{ scope.row.so2Concentration }}% ↑</div>
-                  <div v-if=" scope.row.so2Concentration <= normalPer">{{ scope.row.so2Concentration }}%</div>
+                  <div v-if="scope.row.so2Concentration!=null && scope.row.so2Concentration > normalPer" style="color:red">{{ scope.row.so2Concentration }}% ↑</div>
+                  <div v-if="scope.row.so2Concentration!=null && scope.row.so2Concentration <= normalPer">{{ scope.row.so2Concentration }}%</div>
                 </template>
               </el-table-column>
               <el-table-column
                 :label="'NO2浓度'"
               >
                 <template slot-scope="scope">
-                  <div v-if="scope.row.no2Concentration > normalPer" style="color:red">{{ scope.row.no2Concentration }}% ↑</div>
-                  <div v-if=" scope.row.no2Concentration <= normalPer">{{ scope.row.no2Concentration }}%</div>
+                  <div v-if="scope.row.no2Concentration!=null && scope.row.no2Concentration > normalPer" style="color:red">{{ scope.row.no2Concentration }}% ↑</div>
+                  <div v-if="scope.row.no2Concentration!=null && scope.row.no2Concentration <= normalPer">{{ scope.row.no2Concentration }}%</div>
                 </template>
               </el-table-column>
               <el-table-column
                 :label="'CO2浓度'"
               >
                 <template slot-scope="scope">
-                  <div v-if="scope.row.co2Concentration > normalPer" style="color:red">{{ scope.row.co2Concentration }}% ↑</div>
-                  <div v-if=" scope.row.co2Concentration <= normalPer">{{ scope.row.co2Concentration }}%</div>
+                  <div v-if="scope.row.co2Concentration!=null &&  scope.row.co2Concentration > normalPer" style="color:red">{{ scope.row.co2Concentration }}% ↑</div>
+                  <div v-if=" scope.row.co2Concentration!=null && scope.row.co2Concentration <= normalPer">{{ scope.row.co2Concentration }}%</div>
                 </template>
               </el-table-column>
               <el-table-column
                 :label="'硫碳比'">
                 <template slot-scope="scope">
-                  <div v-if="scope.row.so2Percent > normalCount" style="color:red">{{ scope.row.so2Percent }}度 ↑</div>
-                  <div v-if=" scope.row.so2Percent <= normalCount">{{ scope.row.so2Percent }}度</div>
+                  <div v-if="scope.row.so2Percent!=null && scope.row.so2Percent > normalCount" style="color:red">{{ scope.row.so2Percent }}度 ↑</div>
+                  <div v-if="scope.row.so2Percent!=null &&  scope.row.so2Percent <= normalCount">{{ scope.row.so2Percent }}度</div>
                 </template>
               </el-table-column>
               <el-table-column