|
@@ -20,7 +20,7 @@
|
|
|
start-placeholder="开始日期" end-placeholder="结束日期" style="width:260px;"
|
|
|
@focus="hFocusDate"
|
|
|
:disabled="isDisabled"></el-date-picker>
|
|
|
- <el-button style="margin-left:10px;" type="primary" @click="onSearch">查询</el-button>
|
|
|
+ <el-button style="margin-left:10px;" type="primary" @click="onSearch" :loading="searchLoading">查询</el-button>
|
|
|
<el-button style="margin-left:10px;" type="danger" @click="onReset">重置</el-button>
|
|
|
</div>
|
|
|
<!-- <el-form :model="recForm">
|
|
@@ -85,6 +85,7 @@ export default {
|
|
|
isDisabled: false,
|
|
|
tableData: [],
|
|
|
isLoading: false,
|
|
|
+ searchLoading: false
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -114,6 +115,16 @@ export default {
|
|
|
// 查询
|
|
|
async onSearch() {
|
|
|
try {
|
|
|
+ if (!this.value) {
|
|
|
+ if (this.timer) {
|
|
|
+ window.clearTimeout(this.timer)
|
|
|
+ }
|
|
|
+ this.timer = setTimeout(() => {
|
|
|
+ this.$message.warning('请选择日期类型')
|
|
|
+ }, 1000)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.searchLoading = true
|
|
|
this.isLoading = true
|
|
|
this.startTime = this.dataRange[0]/1000
|
|
|
this.endTime = this.dataRange[1]/1000
|
|
@@ -134,9 +145,11 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
this.isLoading = false
|
|
|
+ this.searchLoading = false
|
|
|
} catch (error) {
|
|
|
console.log(error);
|
|
|
this.isLoading = false
|
|
|
+ this.searchLoading = false
|
|
|
}
|
|
|
},
|
|
|
// 重置
|