无人机管理后台前端(已迁走)
张含笑
2025-09-28 b972a93d5a8c7ec03192ccd22bbd2a4f06d320ec
src/views/dataCenter/components/searchData.vue
@@ -3,7 +3,7 @@
    <el-form :model="searchForm" inline>
      <div class="search-first">
        <el-form-item label="行政区划:" >
          <el-tree-select
          <el-tree-select
          :disabled="viewDetailsDisabled"
            popper-class="custom-tree-select"
            v-model="searchForm.areaCode"
@@ -80,7 +80,7 @@
        </el-form-item>
        <el-form-item label="文件类别:">
          <el-select
            :disabled="disabled || foldersDisabled || viewDetailsDisabled"
            :teleported="false"
            v-model="searchForm.photoType"
@@ -142,7 +142,7 @@
const userAreaCode = computed(() => store.getters.userInfo.detail.areaCode);
const selectedAreaCode = computed(() => store.state.user.selectedAreaCode);
const htsjzx = computed(() => store.state.common.downloadProgress?.htsjzx || 100)
const emit = defineEmits(['search', 'downFun', 'allDownFun','handleswitchFolders','handleBack']);
const emit = defineEmits(['search', 'Reset','downFun', 'allDownFun','handleswitchFolders','handleBack']);
const startTime = dayjs().subtract(6, 'day').startOf('day');
const endTime = dayjs().endOf('day');
const timeRange = [startTime.format('YYYY-MM-DD HH:mm:ss'), endTime.format('YYYY-MM-DD HH:mm:ss')];
@@ -283,7 +283,7 @@
  machineData.value = '';
  const droneList = await getDeviceRegion({ areaCode: data.id });
  machineData.value = droneList?.data?.data;
  // 默认选中值
  if (signDevice_sn.value) {
    searchForm.deviceSn = signDevice_sn.value;
@@ -292,7 +292,7 @@
  deptData.value = [];
  getDeptsByAreaCode();
  handleSearch();
};
// 所属部门信息
const getDeptsByAreaCode = () => {
@@ -333,6 +333,7 @@
  searchForm.wayLineJobId=''
  handleNodeClick({ id: userAreaCode.value });
  handleSearch();
   emit('Reset', searchForm);
};
// 下载
const downloadFun = () => {
@@ -350,22 +351,24 @@
}
// 切换文件夹
const handleswitchFolders =()=>{
  emit('handleswitchFolders');
  emit('handleswitchFolders');
}
// 返回按钮
const handleBack = ()=>{
  emit('handleBack');
  emit('handleBack');
}
onMounted(() => {
  requestDockInfo();
  getDownloadStatusApi({type: 'htsjzx'}).then(res =>{
    if (!['CANCELLED','COMPLETED'].includes(res.data.data?.status || 'COMPLETED')){
      EventBus.emit('useDownloadWs-messageHandler',res.data.data)
      EventBus.emit('useGlobalWS-messageHandler',res.data.data)
    }
  })
});
defineExpose({
  handleReset,
});
</script>
<style scoped lang="scss">