From f16acb06ab278cdcb1d39a29680634010638326d Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期三, 08 五月 2024 17:35:48 +0800 Subject: [PATCH] 1. 完成表格模块的功能迁移; 2. 完成表格、折线图、地图标记三者点击联动 --- src/components/search/SearchBar.vue | 52 +++++++++++++++++++++++++++++++++++++++++++++++----- 1 files changed, 47 insertions(+), 5 deletions(-) diff --git a/src/components/search/SearchBar.vue b/src/components/search/SearchBar.vue index 03e4082..1c1202d 100644 --- a/src/components/search/SearchBar.vue +++ b/src/components/search/SearchBar.vue @@ -1,14 +1,17 @@ <template> - <BaseCard class="map-date-selector"> + <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" v-model="formSearch.deviceCode" ></OptionDevice> <OptionTime v-model="formSearch.timeArray"></OptionTime> + <el-button type="primary" class="el-button-custom" @click="handleClick"> + 鍒嗘瀽 + </el-button> </el-form> </template> </BaseCard> @@ -17,17 +20,56 @@ <script> // 鎼滅储妗� export default { + props: { + searchTime: Array + }, data() { return { + mission: {}, formSearch: { - missionCode: '', type: '', deviceCode: '', timeArray: [] } }; }, - method: {} + emits: ['search'], + watch: { + searchTime(nV, oV) { + if (nV != oV) { + 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, mission: this.mission }); + } + } }; </script> -<style scoped></style> +<style lang="scss"> +.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