diff --git a/src/views/ems/dzjk/sbjk/PointChart.vue b/src/views/ems/dzjk/sbjk/PointChart.vue index 514ff90..0589cbb 100644 --- a/src/views/ems/dzjk/sbjk/PointChart.vue +++ b/src/views/ems/dzjk/sbjk/PointChart.vue @@ -146,7 +146,7 @@ export default { data.forEach((item,index)=>{ item.deviceList.forEach(inner=>{ dataset.push({ - name:`${this.isDtdc ? `${inner.parentDeviceId ? inner.parentDeviceId+'-' : ''}` : ''}${inner.deviceId}`, + name:`${this.isDtdc ? `${inner.parentDeviceId ? inner.parentDeviceId+'-' : ''}` : ''}${this.pointName}`, type:'line', xdata:[], data:[] diff --git a/src/views/ems/dzjk/sbjk/bmsdcc/index.vue b/src/views/ems/dzjk/sbjk/bmsdcc/index.vue index 5cd8684..5b98ab3 100644 --- a/src/views/ems/dzjk/sbjk/bmsdcc/index.vue +++ b/src/views/ems/dzjk/sbjk/bmsdcc/index.vue @@ -68,7 +68,7 @@ prop="maxData" label="单体最大值"> 0){ const {dataUnit} = this const [start,end] = this.dateRange - const startTime = new Date(start),endTime=new Date(end) - const timeDis= dataUnit === 3? 30 * 24 * 60 * 60 * 1000 :dataUnit === 2 ? 24 * 60 * 60 * 1000 : 60 * 60 * 1000 - if(endTime - startTime > timeDis){ - this.$message.error(`时间范围不能超过${dataUnit === 3 ? '30天' : dataUnit === 2 ? '24小时' : '1小时'}`) - }else{ - this.$emit('updateDate',this.dateRange || []) + if([1,2].includes(dataUnit)){ + const startTime = new Date(start),endTime=new Date(end) + const timeDis= 7 * 24 * 60 * 60 * 1000 + if(endTime - startTime > timeDis){ + this.$message.error(`按分钟或小时查询数据,时间范围不能超过7天`) + return + } } + this.$emit('updateDate',this.dateRange || []) }else{ this.$emit('updateDate',this.dateRange || []) }