Commit 2e25f294 authored by 车宾's avatar 车宾

feat(监控大屏):图标日期相关的一些判断

parent d9e3685d
......@@ -18,6 +18,7 @@
placeholder="结束时间">
</el-date-picker>
<el-button
@click="doConfirmClick()"
type="primary"
size="small">
确定
......@@ -31,9 +32,9 @@
data () {
return {
// 开始时间
startTime: '',
startTime: null,
// 结束时间
endTime: ''
endTime: null
}
},
methods: {
......@@ -69,6 +70,18 @@
}
]
})
},
// 点击确认按钮
doConfirmClick () {
if (this.startTime !== null && this.endTime !== null) {
if (this.startTime > this.endTime) {
this.$message.warning('设备故障率图标开始时间不能大于结束时间!')
} else {
console.log('调取接口数据')
}
} else {
this.$message.warning('设备故障率图标开始时间不能大于结束时间!')
}
}
},
mounted () {
......
......@@ -17,6 +17,7 @@
placeholder="结束时间">
</el-date-picker>
<el-button
@click="doConfirmClick()"
type="primary"
size="small">
确定
......@@ -32,9 +33,9 @@
data () {
return {
// 开始时间
startTime: '',
startTime: null,
// 结束时间
endTime: ''
endTime: null
}
},
methods: {
......@@ -95,6 +96,18 @@
}
}]
})
},
// 点击确认按钮
doConfirmClick () {
if (this.startTime !== null && this.endTime !== null) {
if (this.startTime > this.endTime) {
this.$message.warning('设备故障率趋势图开始时间不能大于结束时间!')
} else {
console.log('调取接口数据')
}
} else {
this.$message.warning('设备故障率趋势图开始时间和结束时间不能为空!')
}
}
},
mounted () {
......
......@@ -17,6 +17,7 @@
placeholder="结束时间">
</el-date-picker>
<el-button
@click="doConfirmClick()"
type="primary"
size="small">
确定
......@@ -31,9 +32,9 @@
data () {
return {
// 开始时间
startTime: '',
startTime: null,
// 结束时间
endTime: ''
endTime: null
}
},
methods: {
......@@ -76,6 +77,18 @@
}
]
})
},
// 点击确认按钮
doConfirmClick () {
if (this.startTime !== null && this.endTime !== null) {
if (this.startTime > this.endTime) {
this.$message.warning('设备运行状态表开始时间不能大于结束时间!')
} else {
console.log('调取接口数据')
}
} else {
this.$message.warning('设备运行状态表开始时间和结束时间不能为空!')
}
}
},
mounted () {
......
......@@ -17,6 +17,7 @@
placeholder="结束时间">
</el-date-picker>
<el-button
@click="doConfirmClick()"
type="primary"
size="small">
确定
......@@ -31,9 +32,9 @@
data () {
return {
// 开始时间
startTime: '',
startTime: null,
// 结束时间
endTime: ''
endTime: null
}
},
methods: {
......@@ -127,6 +128,18 @@
// }
}]
})
},
// 点击确认按钮
doConfirmClick () {
if (this.startTime !== null && this.endTime !== null) {
if (this.startTime > this.endTime) {
this.$message.warning('设备状态趋势图开始时间不能大于结束时间!')
} else {
console.log('调取接口数据')
}
} else {
this.$message.warning('设备状态趋势图开始时间和结束时间不能为空!')
}
}
},
mounted () {
......
......@@ -32,9 +32,9 @@
data () {
return {
// 开始时间
startTime: '',
startTime: null,
// 结束时间
endTime: ''
endTime: null
}
},
methods: {
......@@ -73,7 +73,7 @@
},
// 点击确认按钮
doConfirmClick () {
if (this.startTime !== '' && this.endTime !== '') {
if (this.startTime !== null && this.endTime !== null) {
if (this.startTime > this.endTime) {
this.$message.warning('设备利用率图表开始时间不能大于结束时间!')
} else {
......
......@@ -17,6 +17,7 @@
placeholder="结束时间">
</el-date-picker>
<el-button
@click="doConfirmClick()"
type="primary"
size="small">
确定
......@@ -31,9 +32,9 @@
data () {
return {
// 开始时间
startTime: '',
startTime: null,
// 结束时间
endTime: ''
endTime: null
}
},
methods: {
......@@ -94,6 +95,22 @@
}
}]
})
},
// 点击确认按钮
doConfirmClick () {
if (this.startTime !== null && this.endTime !== null) {
if (this.startTime > this.endTime) {
this.$message.warning('设备利用率趋势图开始时间不能大于结束时间!')
} else {
console.log('调取接口数据')
console.log(this.startTime)
console.log(this.endTime)
}
} else {
this.$message.warning('设备利用率趋势图开始时间和结束时间不能为空!')
console.log(this.startTime)
console.log(this.endTime)
}
}
},
mounted () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment