src/components/search/SearchBar.vue
@@ -65,6 +65,8 @@ mission(nV, oV) { if (nV != oV) { this.onInit(() => { setTimeout(() => { // 延时赋值,因为deviceType和deviceCode也有默认初始值 this.formSearch.timeArray = [ new Date(nV.startTime), new Date(nV.endTime) @@ -72,13 +74,11 @@ this.dateRange = [new Date(nV.startTime), new Date(nV.endTime)]; this.formSearch.deviceType = nV.deviceType; this.formSearch.deviceCode = nV.deviceCode; // 代表首次进入界面,此时自动执行首个任务的数据查询操作 if (oV == undefined) { setTimeout(() => { this.handleClick(); }, 500); } }, 500); }); } }