From e64e01d698c071cb4e904a7a6f6dbe25a5268c3a Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Fri, 18 Jul 2025 17:37:23 +0800
Subject: [PATCH] Merge branch 'refs/heads/test'
---
src/views/job/components/SearchBox.vue | 36 +++++++++++++++---------------------
1 files changed, 15 insertions(+), 21 deletions(-)
diff --git a/src/views/job/components/SearchBox.vue b/src/views/job/components/SearchBox.vue
index 899b99d..9a53df5 100644
--- a/src/views/job/components/SearchBox.vue
+++ b/src/views/job/components/SearchBox.vue
@@ -59,7 +59,7 @@
</el-form-item>
<el-form-item label="任务算法:" v-if="isExpand" class="taskAlgorithm">
<TaskAlgorithmBusiness
- :setWidth="162"
+ :setWidth="222"
:showAlgorithm="true"
@algorithmChange="algorithmChange"
/>
@@ -234,12 +234,15 @@
let checked = ref('today');
let timeClick = (item, index) => {
- checked.value = item;
- // dateRange.value = dateRanges[item];
- dateRange.value = [];
- // emit('change', dateRanges[item],timeListEnum[index]);
- searchForm.date_enum = timeListEnum[index];
- handleSearch();
+ if (checked.value === item){
+ checked.value = null
+ searchForm.date_enum = undefined
+ }else{
+ checked.value = item
+ searchForm.date_enum = timeListEnum[index]
+ }
+ dateRange.value = []
+ handleSearch()
};
// 搜索
const handleSearch = () => {
@@ -265,18 +268,8 @@
emit('search', params);
};
const handleDateChange = val => {
- if (val && val.length === 2) {
- const start = dayjs(val[0]);
- const end = dayjs(val[1]);
- const diff = end.diff(start, 'day');
-
- if (diff > 31) {
- ElMessage.warning('日期范围不能超过31天');
- dateRange.value = [];
- return;
- }
- }
- handleSearch();
+ checked.value = null
+ searchForm.date_enum = undefined
};
// 重置
@@ -302,7 +295,7 @@
// watch(
// () => store.state.task.jumpTask,
// newVal => {
-
+
// if (newVal && Object.keys(newVal).length) {
// // 兼容当日任务 计划任务 历史任务传参
// if (newVal.clickValue) {
@@ -343,7 +336,7 @@
const date = dayjs(calendarday.value).format(timeFormat);
const dateArray = [date, date];
-
+
dateRange.value = dateArray;
}
// 查询一次
@@ -451,6 +444,7 @@
.el-form-item {
margin-bottom: 0;
width: 233px;
+ margin-right: 20px;
.el-form-item__label {
color: #363636;
--
Gitblit v1.9.3