From 8d7f9672e81f2c7e93e4a960359c8395eda9fb22 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期二, 14 五月 2024 17:37:27 +0800
Subject: [PATCH] 1.修复点击折线图后高亮定位点错误问题; 2.新增“分析”按钮点击加载动画
---
src/components/search/SearchBar.vue | 28 ++++++++++++++++++++++------
1 files changed, 22 insertions(+), 6 deletions(-)
diff --git a/src/components/search/SearchBar.vue b/src/components/search/SearchBar.vue
index 68ee8ed..4534886 100644
--- a/src/components/search/SearchBar.vue
+++ b/src/components/search/SearchBar.vue
@@ -1,15 +1,20 @@
<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"
v-model="formSearch.deviceCode"
></OptionDevice>
<OptionTime v-model="formSearch.timeArray"></OptionTime>
- <el-button type="primary" class="el-button-custom" @click="handleClick">
+ <el-button
+ :loading="loading"
+ type="primary"
+ class="el-button-custom"
+ @click="handleClick"
+ >
鍒嗘瀽
</el-button>
</el-form>
@@ -21,12 +26,13 @@
// 鎼滅储妗�
export default {
props: {
+ loading: Boolean,
searchTime: Array
},
data() {
return {
+ mission: {},
formSearch: {
- missionCode: '',
type: '',
deviceCode: '',
timeArray: []
@@ -37,13 +43,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