无人机管理后台前端(已迁走)
张含笑
2025-09-20 ee8589ea223a7ff864df467c4dbcafe9aa45909e
src/views/resource/patchManagement.vue
@@ -35,13 +35,13 @@
        <el-button type="primary" text icon="el-icon-edit" @click="uploadPatch(scope.row, 'edit')"
          >编辑
        </el-button>
        <el-button type="primary" text icon="el-icon-delete" @click="rowDel(scope.row)"
        <el-button :disabled="scope.row.patches_type_desc==='综合类'" type="primary" text icon="el-icon-delete" @click="rowDel(scope.row)"
          >删除
        </el-button>
      </template>
    </avue-crud>
    <el-dialog title="上传图斑" append-to-body align-center v-model="box" width="550px">
    <el-dialog title="上传图斑" class="ztzf-dialog-mange" append-to-body align-center v-model="box" width="550px">
      <el-form
        ref="ruleFormRef"
        style="max-width: 600px"
@@ -89,7 +89,7 @@
  </basic-container>
</template>
<script setup>
import {findAreaName} from '@/utils/areaUtils'
import { findAreaName } from '@/utils/areaUtils';
import {
  spotManagementTableApi,
  searchManagementApi,
@@ -161,7 +161,7 @@
  border: true,
  index: true,
  indexLabel: '序号',
   indexWidth: 60,
  indexWidth: 60,
  selection: true,
  grid: false,
  menuWidth: 240,
@@ -468,7 +468,7 @@
    data.value = d.records.map(i => ({
      ...i,
      dataFrom: i.date_from === 0 ? '本地上传' : '国土调查云',
      areaName: findAreaName(i.area_code, regionalData.value, true)
      areaName: findAreaName(i.area_code, regionalData.value, true),
    }));
    loading.value = false;
    selectionClear();
@@ -510,12 +510,14 @@
};
// 图斑上传
const uploadFlightFile = (file, t) => {
loading.value = true
  loading.value = true;
  const fileSuffix = file.name.substring(file.name.lastIndexOf('.') + 1);
  if (!['kmz', 'kml', 'zip'].includes(fileSuffix)) {
    return ElMessage.error('请上传zip/kmz/kml格式的文件');
  }
  if (file) {
    box.value = false;
  }
  let data = new FormData();
  let type = t === '3' ? '' : t;
  const params = {
@@ -535,15 +537,14 @@
    ElMessage.success('上传成功');
    box.value = false;
    loading.value = false;
    ruleForm.name = '';
    ruleForm.region = '';
    if (ruleFormRef.value) {
      ruleFormRef.value.resetFields();
    }
loading.value = true
    searchReset();
  });
};