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 | 35 ++++++++++++++++++++++++++++------- 1 files changed, 28 insertions(+), 7 deletions(-) diff --git a/src/components/search/SearchBar.vue b/src/components/search/SearchBar.vue index 003c1a0..1c1202d 100644 --- a/src/components/search/SearchBar.vue +++ b/src/components/search/SearchBar.vue @@ -1,8 +1,8 @@ <template> - <BaseCard class="map-date-selector flexbox-col align-items"> + <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,18 +37,39 @@ 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; } } }, - method: { + methods: { handleClick() { - this.$emit('search', this.formSearch); + this.$emit('search', { ...this.formSearch, mission: this.mission }); } } }; </script> <style lang="scss"> -.fy-container { +.map-date-selector { + display: inline-block; + position: relative; + /* left: 0; + right: 0; + top: 0px; */ + /* padding: 0 4px; */ + /* color: ffffffbd; */ + /* background-color: antiquewhite; */ +} + +.p-events-auto { } </style> -- Gitblit v1.9.3