点位图表数据名称、时间限制
This commit is contained in:
@ -146,7 +146,7 @@ export default {
|
|||||||
data.forEach((item,index)=>{
|
data.forEach((item,index)=>{
|
||||||
item.deviceList.forEach(inner=>{
|
item.deviceList.forEach(inner=>{
|
||||||
dataset.push({
|
dataset.push({
|
||||||
name:`${this.isDtdc ? `${inner.parentDeviceId ? inner.parentDeviceId+'-' : ''}` : ''}${inner.deviceId}`,
|
name:`${this.isDtdc ? `${inner.parentDeviceId ? inner.parentDeviceId+'-' : ''}` : ''}${this.pointName}`,
|
||||||
type:'line',
|
type:'line',
|
||||||
xdata:[],
|
xdata:[],
|
||||||
data:[]
|
data:[]
|
||||||
|
|||||||
@ -68,7 +68,7 @@
|
|||||||
prop="maxData"
|
prop="maxData"
|
||||||
label="单体最大值">
|
label="单体最大值">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span class="pointe " @click="showChart( tablePointNameMap[scope.row.dataName+scope.column.label],'电池簇',baseInfo.deviceId)">{{scope.row.maxData}}</span>
|
<span class="pointer " @click="showChart( tablePointNameMap[scope.row.dataName+scope.column.label],'电池簇',baseInfo.deviceId)">{{scope.row.maxData}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
|||||||
@ -83,13 +83,15 @@ export default {
|
|||||||
if(this.dateRange && this.dateRange.length>0){
|
if(this.dateRange && this.dateRange.length>0){
|
||||||
const {dataUnit} = this
|
const {dataUnit} = this
|
||||||
const [start,end] = this.dateRange
|
const [start,end] = this.dateRange
|
||||||
|
if([1,2].includes(dataUnit)){
|
||||||
const startTime = new Date(start),endTime=new Date(end)
|
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
|
const timeDis= 7 * 24 * 60 * 60 * 1000
|
||||||
if(endTime - startTime > timeDis){
|
if(endTime - startTime > timeDis){
|
||||||
this.$message.error(`时间范围不能超过${dataUnit === 3 ? '30天' : dataUnit === 2 ? '24小时' : '1小时'}`)
|
this.$message.error(`按分钟或小时查询数据,时间范围不能超过7天`)
|
||||||
}else{
|
return
|
||||||
this.$emit('updateDate',this.dateRange || [])
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
this.$emit('updateDate',this.dateRange || [])
|
||||||
}else{
|
}else{
|
||||||
this.$emit('updateDate',this.dateRange || [])
|
this.$emit('updateDate',this.dateRange || [])
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user