Explorar o código

【设备资源统计】新增总数量信息

lxb hai 1 ano
pai
achega
05bcda8bd1

+ 9 - 1
imcs-ui/src/views/zuihou/statisticalAnalysis/deviceResource/Index.vue

@@ -59,6 +59,7 @@
         <el-button type="default" @click="resetData()">清空</el-button>
       </el-form>
     </el-card>
+    <p style="color: #E96767;size: 10px">生产总数:{{totalNum}}</p>
     <!-- 列表数据 -->
     <el-table
       :key="tableKey"
@@ -237,7 +238,8 @@ export default {
       searchObj: {}, // 查询条件
       dialogVisible: false, //是否弹框
       zoneList: [],
-      row2: {}
+      row2: {},
+      totalNum: 0
     };
   },
   computed: {},
@@ -286,6 +288,12 @@ export default {
         .then((response) => {
           const res = response.data;
           this.tableData = (res.data || []).records;
+          this.totalNum = 0
+          if(this.tableData){
+            this.tableData.forEach(item => {
+              this.totalNum += Number(item.totalNum)
+            })
+          }
           this.total = (res.data || []).total;
         });
     },