From 1b28973210e78a937ae7a8de8e12640f8d3ec303 Mon Sep 17 00:00:00 2001 From: yx Date: Wed, 13 Jul 2022 11:08:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/data/photo/index.vue | 37 +++++++++++++++++++++++----------- src/views/web/camera/index.vue | 7 ++++++- 2 files changed, 31 insertions(+), 13 deletions(-) diff --git a/src/views/data/photo/index.vue b/src/views/data/photo/index.vue index 63d6861..7778abf 100644 --- a/src/views/data/photo/index.vue +++ b/src/views/data/photo/index.vue @@ -12,14 +12,14 @@ @keyup.enter.native="handleQuery" /> --> - + @@ -30,7 +30,9 @@ 重置 - +
+ {{searchInfo}} +
@@ -98,6 +100,7 @@ export default { open: false, showImg: '', srcList: [], + //时间参数 timeStage: [], // 设置可选择的时间段,*** 必须在 data 返回数据 *** @@ -125,7 +128,8 @@ export default { return (time.getTime() > (choiceDateTime + 7*24*3600*1000)) || (time.getTime() < (choiceDateTime - 7*24*3600*1000)); } }, - } + }, + } }, @@ -140,14 +144,19 @@ export default { /** 查询实时数据列表 */ getList() { + if(this.timeStage == null || this.timeStage.length == 0 ){ + this.$modal.msg("请选择时间"); + return; + } this.loading = true; - if (this.queryParams.endTime != null) - this.queryParams.endTime = formatDate(this.queryParams.endTime, 'yyyy-MM-dd hh:mm:ss') - if (this.queryParams.startTime != null) - this.queryParams.startTime = formatDate(this.queryParams.startTime, 'yyyy-MM-dd hh:mm:ss') queryPhotoList(this.queryParams).then(response => { this.currdataList = response.data; this.total = response.count; + if(this.total==0){ + this.showSearch=true + this.searchInfo='暂无数据' + }else + this.showSearch=false this.currdataList.forEach(function (e, index) { if (e.imgName == '' || e.imgName == null) { @@ -189,10 +198,9 @@ export default { this.timeStage[1]=this.queryParams.endTime }, chooseTimeRange() { - - if (this.timeStage != null) { - this.logform.queryForm.startTime = formatDate(this.timeStage[0], 'yyyy-MM-dd hh:mm:ss'); - this.logform.queryForm.endTime = formatDate(this.timeStage[1], 'yyyy-MM-dd hh:mm:ss'); + if (this.timeStage != null && this.timeStage.length > 0) { + this.queryParams.startTime = formatDate(this.timeStage[0], 'yyyy-MM-dd hh:mm:ss'); + this.queryParams.endTime = formatDate(this.timeStage[1], 'yyyy-MM-dd hh:mm:ss'); } }, @@ -240,4 +248,9 @@ img { .value { text-align: center; } +.showSearch{ + text-align: center; + line-height: 200px; + font-size: 25px; +} diff --git a/src/views/web/camera/index.vue b/src/views/web/camera/index.vue index 5324b88..00d1a5a 100644 --- a/src/views/web/camera/index.vue +++ b/src/views/web/camera/index.vue @@ -666,7 +666,7 @@ export default { //发送自动重启配置表单 async restartcfgConfirm() { - console.log(this.restartcfg.form) + this.restartcfg.form.bEnable = this.restartcfg.run ? 1 : 0; this.restartcfg.form.uHour = this.restartcfg.form.uHour.substring(0, 2) let res = await this.$axiosPost('/web/camera/setautocfg', this.restartcfg.form); @@ -751,10 +751,15 @@ export default { }, async handleAutoQuery() { + if(this.timeStage == null || this.timeStage.length == 0 ){ + this.$modal.msg("请选择时间"); + return; + } let res = await this.$axiosGet('/web/camera/getloginfo', this.logform.queryForm); if (res.code === 0) { this.logInfoList = res.data; + this.$modal.msgSuccess("查询成功"); } }, async register() {