diff --git a/src/views/homePage/components/tableMain.vue b/src/views/homePage/components/tableMain.vue index 66844c6..9204bf6 100644 --- a/src/views/homePage/components/tableMain.vue +++ b/src/views/homePage/components/tableMain.vue @@ -63,9 +63,9 @@ > - + {{ @@ -142,7 +142,7 @@ {{ protocolMap[scope.row.protocol] }} - + {{ scope.row.raw_report.hasOwnProperty("msgs") @@ -153,7 +153,7 @@ - + {{ scope.row.raw_report.hasOwnProperty("msgs") @@ -162,7 +162,7 @@ }} - + {{ scope.row.raw_report.hasOwnProperty("msgs") @@ -331,6 +331,8 @@ 规约 电池状态 心跳信息 + 心跳次数 + 心跳周期 拍照 网络信号 重启次数 @@ -574,6 +576,8 @@ export default { gycheck: false, dccheck: true, xtcheck: true, + xtcs: false, + xtzq: false, pzcheck: true, wlcheck: true, cqcheck: true, diff --git a/src/views/homePage/index.vue b/src/views/homePage/index.vue index 1e2a59f..cb21038 100644 --- a/src/views/homePage/index.vue +++ b/src/views/homePage/index.vue @@ -7,111 +7,134 @@ :model="formdata" class="demo-form-inline" > - - - - + + - {{ item.vname + item.name }} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 查询 - 重置 - - + + {{ item.vname + item.name }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 查询 + 重置 + + - + @@ -172,7 +201,7 @@ export default { tableLoaidng: false, onlineNum: "", //在线数量 offlineNum: "", //离线数量 - noPicNum:'',//未上传图片数量 + noPicNum: "", //未上传图片数量 }; }, created() { @@ -234,39 +263,38 @@ export default { frev4: this.formdata.versionCheck, }) .then((res) => { - - res.data = res.data.map(item => { - - if (!item.raw_report.pic) { - item.raw_report.pic = 0; - } - return item; - }); - + res.data = res.data.map((item) => { + if (!item.raw_report.pic) { + item.raw_report.pic = 0; + } + return item; + }); + if (this.formdata.isonline == "-1") { //全部 - this.dataList = res.data; + this.dataList = res.data; // console.log(this.dataList) } else if (this.formdata.isonline == "1") { //在线 this.dataList = res.data.filter( (item) => this.nowTime - item.last_heartbeat_ts <= 720 ); - } else if (this.formdata.isonline == "0") { //离线 this.dataList = res.data.filter( (item) => this.nowTime - item.last_heartbeat_ts > 720 ); - } - this.onlineNum =this.dataList.filter( - (item) => this.nowTime - item.last_heartbeat_ts <= 720 - ).length; - this.offlineNum = this.dataList.length - this.onlineNum - this.noPicNum = this.dataList.filter( - (item) => item.raw_report.pic==undefined||item.raw_report.pic==0||item.raw_report.pic==-1 - ).length + this.onlineNum = this.dataList.filter( + (item) => this.nowTime - item.last_heartbeat_ts <= 720 + ).length; + this.offlineNum = this.dataList.length - this.onlineNum; + this.noPicNum = this.dataList.filter( + (item) => + item.raw_report.pic == undefined || + item.raw_report.pic == 0 || + item.raw_report.pic == -1 + ).length; this.tableLoaidng = false; }) .catch((err) => {}); @@ -292,13 +320,12 @@ export default { }) .then((res) => { console.log(res); - res.data = res.data.map(item => { - - if (!item.raw_report.pic) { - item.raw_report.pic = 0; - } - return item; - }); + res.data = res.data.map((item) => { + if (!item.raw_report.pic) { + item.raw_report.pic = 0; + } + return item; + }); if (this.formdata.isonline == "-1") { //全部 this.dataList = res.data; @@ -314,13 +341,16 @@ export default { (item) => this.nowTime - item.last_heartbeat_ts > 720 ); } - this.onlineNum =this.dataList.filter( - (item) => this.nowTime - item.last_heartbeat_ts <= 720 - ).length; - this.offlineNum = this.dataList.length - this.onlineNum - this.noPicNum = this.dataList.filter( - (item) => item.raw_report.pic==undefined||item.raw_report.pic==0||item.raw_report.pic==-1 - ).length + this.onlineNum = this.dataList.filter( + (item) => this.nowTime - item.last_heartbeat_ts <= 720 + ).length; + this.offlineNum = this.dataList.length - this.onlineNum; + this.noPicNum = this.dataList.filter( + (item) => + item.raw_report.pic == undefined || + item.raw_report.pic == 0 || + item.raw_report.pic == -1 + ).length; }) .catch((err) => {}); }, @@ -360,20 +390,20 @@ export default { // align-items: center; // flex-wrap: wrap; flex-direction: column; - .topSearch{ - display:flex; + .topSearch { + display: flex; } - .bottomSearch{ - display:flex; - align-items:center; - - .el-form-item--small .el-form-item__label{ + .bottomSearch { + display: flex; + align-items: center; + + .el-form-item--small .el-form-item__label { white-space: nowrap; } - .btngrop{ - .el-form-item__content{ - display:flex; - flex-wrap:nowrap; + .btngrop { + .el-form-item__content { + display: flex; + flex-wrap: nowrap; } } } @@ -420,22 +450,20 @@ export default { //height: calc(100% - 102px); } } -.el-pagination{ - color: #606262; - font-weight: normal; - .el-pager li.active{ - font-weight:800; - } +.el-pagination { + color: #606262; + font-weight: normal; + .el-pager li.active { + font-weight: 800; + } } -.el-dialog__headerbtn{ - top:18px; - .el-dialog__close{ - font-size:26px; - &:hover{ - background:#e2e2e2; +.el-dialog__headerbtn { + top: 18px; + .el-dialog__close { + font-size: 26px; + &:hover { + background: #e2e2e2; } } -} +} - - diff --git a/src/views/report/index.vue b/src/views/report/index.vue index 9eb2fb4..0537d59 100644 --- a/src/views/report/index.vue +++ b/src/views/report/index.vue @@ -2,15 +2,30 @@ - 待下发终端 + + 待下发终端 + + + + 更新时间:{{ updateTime }} + @@ -22,14 +37,29 @@ > - + 暂无下发命令 - 已下发终端 - - + + 已下发终端 + + + + 更新时间:{{ updateTime }} + + + + + 暂无已下发命令 + {}); }, @@ -167,10 +221,134 @@ export default { .then((res) => { console.log(res); this.endCommand = res.data; + this.selectRightChanged(this.operateR); // this.leftComLoading = false; + this.updateTime = new Date().toLocaleString(); }) .catch((err) => {}); }, + //左侧筛选 + selectLeftChanged(val) { + console.log(val); + switch (val) { + case 0: + this.leftCommand = this.runCommand; + return; + case 1: + this.leftCommand = this.runCommand.filter( + (item) => item.cmdName == "yw_cmd_android_reboot" + ); + return; + case 2: + this.leftCommand = this.runCommand.filter( + (item) => item.cmdName == "yw_cmd_mcu_reboot" + ); + return; + case 3: + this.leftCommand = this.runCommand.filter( + (item) => item.cmdName == "i1_cmd_set_i1_server_ip_port" + ); + return; + case 4: + this.leftCommand = this.runCommand.filter( + (item) => item.cmdName == "i1_cmd_set_xy_yw_ip_port" + ); + return; + case 5: + this.leftCommand = this.runCommand.filter( + (item) => item.cmdName == "i1_cmd_set_i1_heart_beat_time" + ); + return; + case 6: + this.leftCommand = this.runCommand.filter( + (item) => + item.cmdName == "yw_cmd_myw_cmd_upload_i1_zip_logcu_reboot" + ); + return; + case 7: + this.leftCommand = this.runCommand.filter( + (item) => item.cmdName == "upgrade" + ); + return; + case 8: + this.leftCommand = this.runCommand.filter( + (item) => item.cmdName == "yw_cmd_start_frpc" + ); + return; + case 9: + this.leftCommand = this.runCommand.filter( + (item) => item.cmdName == "yw_cmd_stop_frpc" + ); + return; + case 10: + this.leftCommand = this.runCommand.filter( + (item) => item.cmdName == "i1_cmd_stop_aging_test" + ); + return; + } + }, + //右侧筛选 + selectRightChanged(val) { + console.log(val); + switch (val) { + case 0: + this.rightCommand = this.endCommand; + console.log(this.rightCommand); + return; + case 1: + this.rightCommand = this.endCommand.filter( + (item) => item.cmdName == "yw_cmd_android_reboot" + ); + console.log(this.rightCommand); + return; + case 2: + this.rightCommand = this.endCommand.filter( + (item) => item.cmdName == "yw_cmd_mcu_reboot" + ); + return; + case 3: + this.rightCommand = this.endCommand.filter( + (item) => item.cmdName == "i1_cmd_set_i1_server_ip_port" + ); + return; + case 4: + this.rightCommand = this.endCommand.filter( + (item) => item.cmdName == "i1_cmd_set_xy_yw_ip_port" + ); + return; + case 5: + this.rightCommand = this.endCommand.filter( + (item) => item.cmdName == "i1_cmd_set_i1_heart_beat_time" + ); + return; + case 6: + this.rightCommand = this.endCommand.filter( + (item) => + item.cmdName == "yw_cmd_myw_cmd_upload_i1_zip_logcu_reboot" + ); + return; + case 7: + this.rightCommand = this.endCommand.filter( + (item) => item.cmdName == "upgrade" + ); + return; + case 8: + this.rightCommand = this.endCommand.filter( + (item) => item.cmdName == "yw_cmd_start_frpc" + ); + return; + case 9: + this.rightCommand = this.endCommand.filter( + (item) => item.cmdName == "yw_cmd_stop_frpc" + ); + return; + case 10: + this.rightCommand = this.endCommand.filter( + (item) => item.cmdName == "i1_cmd_stop_aging_test" + ); + return; + } + }, }, beforeDestroy() { //清除定时器 @@ -196,11 +374,22 @@ export default { border: 1px solid #dcdfe6; margin-right: 12px; border-radius: 4px; - h3 { - font-size: 16px; - font-weight: normal; - height: 32px; - line-height: 32px; + .headTitle { + height: 40px; + line-height: 40px; + display: flex; + align-items: center; + .title { + font-size: 16px; + font-weight: normal; + } + .el-select { + margin: 0px 12px; + } + .time { + font-size: 12px; + margin-left: 8px; + } } .commandList { width: 100%;
@@ -22,14 +37,29 @@ >
暂无下发命令
+
暂无已下发命令