无人机管理后台前端(已迁走)
张含笑
2025-08-07 f9673d80458380c89ec886dc9f4f7d250412df3c
src/views/dataCenter/components/searchData.vue
@@ -20,6 +20,7 @@
            v-model="searchForm.deviceSn"
            placeholder="请选择"
            clearable
            @change="handleSearch"
          >
            <el-option
              v-for="item in machineData"
@@ -37,7 +38,7 @@
            popper-class="custom-date-picker"
            v-model="dateRange"
            type="daterange"
            :clearable="false"
            :clearable="true"
            range-separator="至"
            start-placeholder="开始日期"
            end-placeholder="结束日期"
@@ -62,12 +63,14 @@
            v-model="searchForm.resultType"
            placeholder="请选择"
            clearable
             @change="handleSearch"
          >
            <el-option
              v-for="item in fileFormatOption"
              :key="item.value"
              :label="item.label"
              :value="item.value"
         :disabled="searchForm.photoType !== '' && item.value === '4'"
            />
          </el-select>
        </el-form-item>
@@ -78,6 +81,8 @@
            v-model="searchForm.photoType"
            placeholder="请选择"
            clearable
            @clear="changePhotoType"
             @change="handleSearch"
          >
            <el-option
              v-for="item in CategoryOption"
@@ -163,10 +168,12 @@
  {
    value: '5',
    label: '全景',
  },
  {
    value: '4',
    label: '正射',
  },
];
const CategoryOption = [
@@ -190,7 +197,11 @@
  },
  { deep: true }
);
const changePhotoType =(val)=>{
if(val === undefined){
  searchForm.photoType = ''
}
}
// 部门
let deptTreeData = ref([]);
// 机巢
@@ -204,9 +215,9 @@
    const start = dayjs(val[0]);
    const end = dayjs(val[1]);
    const diff = end.diff(start, 'day');
    if (diff > 31) {
      ElMessage.warning('日期范围不能超过31天');
 const maxDays = 365;
    if (diff > maxDays) {
      ElMessage.warning('日期范围不能超过一年');
      dateRange.value = [];
      // 重置为默认时间范围
      setTimeout(() => {
@@ -218,8 +229,9 @@
    // 更新搜索表单中的时间
    searchForm.startTime = start.format(timeFormat);
    searchForm.endTime = end.format(timeFormat);
    handleSearch()
  }
  //handleSearch();
};
// 部门下得机巢
const requestDockInfo = () => {
@@ -245,6 +257,7 @@
  deptData.value = [];
  getDeptsByAreaCode();
  handleSearch();
};
// 所属部门信息
const getDeptsByAreaCode = () => {