From c4e9d054916c3f085329a67c7664b4c54f9137f9 Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期二, 07 五月 2024 17:36:09 +0800 Subject: [PATCH] 完成折线图相关功能的迁移 --- src/components/search/SearchBar.vue | 20 +++++++++++++++----- 1 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/components/search/SearchBar.vue b/src/components/search/SearchBar.vue index 68ee8ed..1c1202d 100644 --- a/src/components/search/SearchBar.vue +++ b/src/components/search/SearchBar.vue @@ -1,8 +1,8 @@ <template> - <BaseCard class=""> + <BaseCard size="middle-s" direction="down"> <template #content> <el-form :inline="true"> - <OptionMission v-model="formSearch.missionCode"></OptionMission> + <OptionMission v-model="mission"></OptionMission> <OptionType v-model="formSearch.type"></OptionType> <OptionDevice :type="formSearch.type" @@ -25,8 +25,8 @@ }, data() { return { + mission: {}, formSearch: { - missionCode: '', type: '', deviceCode: '', timeArray: [] @@ -37,13 +37,23 @@ watch: { searchTime(nV, oV) { if (nV != oV) { - this.timeArray = this.searchTime; + this.formSearch.timeArray = this.searchTime; + } + }, + mission(nV, oV) { + if (nV != oV) { + this.formSearch.timeArray = [ + new Date(nV.startTime), + new Date(nV.endTime) + ]; + this.formSearch.type = nV.deviceType; + this.formSearch.deviceCode = nV.deviceCode; } } }, methods: { handleClick() { - this.$emit('search', this.formSearch); + this.$emit('search', { ...this.formSearch, mission: this.mission }); } } }; -- Gitblit v1.9.3