无人机管理后台前端(已迁走)
chenyao
2025-08-15 05372af7adb6368eeea11bc6bdebfcc56c3aecd7
src/views/dataCenter/dataCenter.vue
@@ -11,11 +11,14 @@
      <!-- 表格部分 -->
      <div class="dataTable">
        <el-table
        border
         stripe
          v-loading="loadings"
          element-loading-text="加载中"
          :data="tableData"
          class="custom-header"
          @selection-change="handleSelectionChange"
          @cell-click="handleCellClick"
        >
          <el-table-column type="selection" width="55" />
          <el-table-column label="序号" type="index" width="60">
@@ -34,7 +37,14 @@
          </el-table-column>
          <el-table-column property="nestName" label="所属机巢" />
          <el-table-column property="jobName" label="任务名称" show-overflow-tooltip />
          <el-table-column prop="nickName" label="文件名称" show-overflow-tooltip />
          <el-table-column prop="nickName" label="文件名称" width="160">
            <template #default="scope">
              <el-tooltip-copy :content="scope.row.nickName" :showCopyText="true">
                {{scope.row.nickName}}
              </el-tooltip-copy>
            </template>
          </el-table-column>
          <el-table-column property="link" label="缩略图" width="120">
            <template #default="scope">
              <img
@@ -298,11 +308,12 @@
  deleteFileMultipleApi,
  downloadApi,
  updataTitleApi,
  getOrthoimageInfo,
  getOrthoimageInfo, getDownloadStatusApi
} from '@/api/dataCenter/dataCenter';
import { getShowImg, getSmallImg, getzsSmallImg } from '@/utils/util';
import { onMounted, watch } from 'vue';
import dayjs from 'dayjs';
import ElTooltipCopy from '@/components/ElTooltipCopy.vue';
function bytesToMB(bytes, decimalPlaces = 2) {
  if (typeof bytes !== 'number' || bytes < 0) return '0';
@@ -473,7 +484,7 @@
  a.click();
  document.body.removeChild(a);
}
const fileDownload = () => {
const fileDownload = async () => {
  const list = selectedRows.value.filter(i => i.checked);
  if (!list?.length) return ElMessage.warning('请选择文件');
  if (list.length === 1) {
@@ -494,11 +505,14 @@
      jobName: '',
      resultType: '',
      startTime: '',
      wayLineJobIds: [],
      type:'htsjzx'
    };
    downloadApi(aaa).then(res => {
      aLinkDownload(res.data.data, `sjzx-file-pack-${dayjs().format('YYYYMMDDHHmmss')}.zip`);
    const res = await getDownloadStatusApi({type: 'htsjzx'})
    if (!['CANCELLED','COMPLETED'].includes(res.data.data?.status || 'COMPLETED')){
      loading.close()
      return ElMessage.warning('还有正在处理的')
    }
    downloadApi(aaa).finally(res => {
      loading.close();
    });
  }
@@ -709,6 +723,14 @@
  viewer = null;
  isMapInitialized.value = false;
}
function handleCellClick(row, column) {
  console.log(row,column.no)
  if (column.no === 5) {
    navigator.clipboard.writeText(row.nickName).then(() => {
      ElMessage.success('复制文件名称成功')
    })
  }
}
onMounted(() => {
  getaiImagesPage();
  // 监听打开全景事件
@@ -808,6 +830,7 @@
:deep(.custom-header th.el-table__cell) {
  color: rgba(0, 0, 0, 0.85);
  background: #fafafa;
}
// 弹框