diff --git a/src/views/homePage/components/tableMain.vue b/src/views/homePage/components/tableMain.vue index 5852bd2..ebb7e31 100644 --- a/src/views/homePage/components/tableMain.vue +++ b/src/views/homePage/components/tableMain.vue @@ -765,7 +765,14 @@ import htmlToExcel from "@/utils/htmlToExcel"; import { saveAs } from "file-saver"; import XLSX from "xlsx"; export default { - props: ["tableData", "onlineNum", "offlineNum", "noPicNum", "tableLoaidng"], + props: [ + "tableData", + "onlineNum", + "offlineNum", + "noPicNum", + "freeNum", + "tableLoaidng", + ], components: { rowMsgDialog, }, @@ -828,7 +835,6 @@ export default { ywNumber: 0, kxtNumber: 0, - freeNum: 0, nowTime: new Date().getTime() / 1000, gycheck: true, @@ -1031,7 +1037,7 @@ export default { if (row.raw_report.msgs.hasOwnProperty("freeROM")) { // console.log(row.raw_report.msgs.freeROM); // console.log(parseInt(row.raw_report.msgs.freeROM)); - if (parseInt(row.raw_report.msgs.freeROM) < 40) { + if (parseInt(row.raw_report.msgs.freeROM) < 50) { return "has-color"; } } @@ -1121,10 +1127,10 @@ export default { this.checkAllKXT = false; } - this.freeNum = - this.$refs.ywMultipleTable.$el.getElementsByClassName( - "has-color" - ).length; + // this.freeNum = + // this.$refs.ywMultipleTable.$el.getElementsByClassName( + // "has-color" + // ).length; }, //导出表格 handleExport() { @@ -1699,10 +1705,10 @@ export default { } } .has-color { - background: #f5dab1; + background: #ffb8b8; } .has-color td.el-table__cell { - background: #f5dab1 !important; + background: #ffb8b8 !important; } } .ywTableBox { diff --git a/src/views/homePage/index.vue b/src/views/homePage/index.vue index 0357ed9..be1929e 100644 --- a/src/views/homePage/index.vue +++ b/src/views/homePage/index.vue @@ -195,6 +195,7 @@ :onlineNum="onlineNum" :offlineNum="offlineNum" :noPicNum="noPicNum" + :freeNum="freeNum" :tableLoaidng="tableLoaidng" > @@ -254,6 +255,7 @@ export default { onlineNum: 0, //在线数量 offlineNum: 0, //离线数量 noPicNum: 0, //未上传图片数量 + freeNum: 0, intervalId: null, // 用于存储定时器的ID activityIdLoc: "", runCommand: [], //获取命令列表 @@ -470,6 +472,10 @@ export default { item.raw_report.pic == 0 || item.raw_report.pic == -1 ).length; + this.freeNum = this.dataList.filter( + (item) => parseInt(item.raw_report.msgs.freeROM) < 50 + ).length; + console.log("我是磁盘", this.freeNum); this.getCmdList(); this.tableLoaidng = false; }) @@ -571,6 +577,10 @@ export default { item.raw_report.pic == 0 || item.raw_report.pic == -1 ).length; + this.freeNum = this.dataList.filter( + (item) => parseInt(item.raw_report.msgs.freeROM) < 50 + ).length; + console.log("我是磁盘", this.freeNum); this.getCmdList(); }) .catch((err) => {});