forked from drone/command-center-dashboard

chenyao
2025-04-14 b0ccd2d131b2e3df5d901385e38ed0077b8d0fbc
src/views/TaskManage/SearchBox.vue
@@ -71,7 +71,9 @@
import { deptsByAreaCode, getDockInfo } from '@/api/home/common';
import TaskAlgorithmBusiness from './components/TaskAlgorithmBusiness.vue';
import dayjs from 'dayjs';
import { useStore } from 'vuex'
const store = useStore()
const isExpand = ref(false);
const toggleExpand = () => {
  isExpand.value = !isExpand.value;
@@ -102,11 +104,14 @@
const emit = defineEmits(['search','addTask']);
const handleSearch = () => {
  emit('search', {
  // 提交至store
  let params = {
    ...searchForm,
    start_date: dateRange.value.length ? `${dateRange.value[0]} 00:00:00` : null,
    end_date: dateRange.value.length ? `${dateRange.value[1]} 23:59:59` : null
  });
  }
  store.commit('setTaskSearchParams', params);
  emit('search', params);
};
const handleReset = () => {
@@ -187,7 +192,7 @@
  checked.value = item;
  // model.value = dateRanges[item];
  // emit('change', dateRanges[item],timeListEnum[index]);
  searchForm.value.date_enum = timeListEnum[index];
  searchForm.date_enum = timeListEnum[index];
};