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

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

parent d9e3685d
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
placeholder="结束时间"> placeholder="结束时间">
</el-date-picker> </el-date-picker>
<el-button <el-button
@click="doConfirmClick()"
type="primary" type="primary"
size="small"> size="small">
确定 确定
...@@ -31,9 +32,9 @@ ...@@ -31,9 +32,9 @@
data () { data () {
return { return {
// 开始时间 // 开始时间
startTime: '', startTime: null,
// 结束时间 // 结束时间
endTime: '' endTime: null
} }
}, },
methods: { methods: {
...@@ -69,6 +70,18 @@ ...@@ -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 () { mounted () {
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
placeholder="结束时间"> placeholder="结束时间">
</el-date-picker> </el-date-picker>
<el-button <el-button
@click="doConfirmClick()"
type="primary" type="primary"
size="small"> size="small">
确定 确定
...@@ -32,9 +33,9 @@ ...@@ -32,9 +33,9 @@
data () { data () {
return { return {
// 开始时间 // 开始时间
startTime: '', startTime: null,
// 结束时间 // 结束时间
endTime: '' endTime: null
} }
}, },
methods: { methods: {
...@@ -95,6 +96,18 @@ ...@@ -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 () { mounted () {
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
placeholder="结束时间"> placeholder="结束时间">
</el-date-picker> </el-date-picker>
<el-button <el-button
@click="doConfirmClick()"
type="primary" type="primary"
size="small"> size="small">
确定 确定
...@@ -31,9 +32,9 @@ ...@@ -31,9 +32,9 @@
data () { data () {
return { return {
// 开始时间 // 开始时间
startTime: '', startTime: null,
// 结束时间 // 结束时间
endTime: '' endTime: null
} }
}, },
methods: { methods: {
...@@ -76,6 +77,18 @@ ...@@ -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 () { mounted () {
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
placeholder="结束时间"> placeholder="结束时间">
</el-date-picker> </el-date-picker>
<el-button <el-button
@click="doConfirmClick()"
type="primary" type="primary"
size="small"> size="small">
确定 确定
...@@ -31,9 +32,9 @@ ...@@ -31,9 +32,9 @@
data () { data () {
return { return {
// 开始时间 // 开始时间
startTime: '', startTime: null,
// 结束时间 // 结束时间
endTime: '' endTime: null
} }
}, },
methods: { methods: {
...@@ -127,6 +128,18 @@ ...@@ -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 () { mounted () {
......
...@@ -32,9 +32,9 @@ ...@@ -32,9 +32,9 @@
data () { data () {
return { return {
// 开始时间 // 开始时间
startTime: '', startTime: null,
// 结束时间 // 结束时间
endTime: '' endTime: null
} }
}, },
methods: { methods: {
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
}, },
// 点击确认按钮 // 点击确认按钮
doConfirmClick () { doConfirmClick () {
if (this.startTime !== '' && this.endTime !== '') { if (this.startTime !== null && this.endTime !== null) {
if (this.startTime > this.endTime) { if (this.startTime > this.endTime) {
this.$message.warning('设备利用率图表开始时间不能大于结束时间!') this.$message.warning('设备利用率图表开始时间不能大于结束时间!')
} else { } else {
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
placeholder="结束时间"> placeholder="结束时间">
</el-date-picker> </el-date-picker>
<el-button <el-button
@click="doConfirmClick()"
type="primary" type="primary"
size="small"> size="small">
确定 确定
...@@ -31,9 +32,9 @@ ...@@ -31,9 +32,9 @@
data () { data () {
return { return {
// 开始时间 // 开始时间
startTime: '', startTime: null,
// 结束时间 // 结束时间
endTime: '' endTime: null
} }
}, },
methods: { methods: {
...@@ -94,6 +95,22 @@ ...@@ -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 () { 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