吉安感知网项目-前端
张含笑
2026-01-31 8fc632dff0ecb8234e8b79c2fb7f8cc32ff92c46
feat:区划需求变更
3 files modified
31 ■■■■ changed files
applications/task-work-order/src/views/orderView/organizational/agenciesManagement/index.vue 2 ●●● patch | view | raw | blame | history
applications/task-work-order/src/views/orderView/organizational/zoningManagement/index.vue 26 ●●●● patch | view | raw | blame | history
applications/task-work-order/src/views/orderView/organizational/zoningManagement/zoningApi.js 3 ●●●● patch | view | raw | blame | history
applications/task-work-order/src/views/orderView/organizational/agenciesManagement/index.vue
@@ -134,7 +134,7 @@
          :disabled="importSubmitting"
          @click="submitImport(importFormRef)"
        >
          导入
          保存
        </el-button>
      </template>
    </el-dialog>
applications/task-work-order/src/views/orderView/organizational/zoningManagement/index.vue
@@ -45,7 +45,8 @@
    <div class="gd-table-container" v-loading="loading">
      <div class="gd-table-content gd-table-content-bg">
        <el-table class="gd-table" :data="list">
        <el-table class="gd-table" :data="list" @selection-change="handleSelectionChange">
          <el-table-column type="selection" width="46" />
          <el-table-column label="序号" width="80">
            <template v-slot="{ $index }">
               {{ $index + 1 }}
@@ -130,7 +131,7 @@
          :disabled="importSubmitting"
          @click="submitImport(importFormRef)"
        >
          导入
          保存
        </el-button>
      </template>
    </el-dialog>
@@ -171,6 +172,7 @@
const dialogVisible = ref(false)
const regionOptions = ref([]) // 区域选项
const dictObj = ref({}) // 字典对象
const selectedFiles = ref([]) // 勾选的文件列表
// 导入区划相关
const isShowImportView = ref(false)
@@ -283,6 +285,11 @@
  }
}
// 勾选值设置
function handleSelectionChange(rows) {
  selectedFiles.value = rows
}
// 导出模板
async function handleExportTemplate() {
  templateExportLoading.value = true
@@ -354,14 +361,25 @@
// 导出区划
async function handleExport() {
  // 检查是否有选中的数据
  if (selectedFiles.value.length === 0) {
    ElMessage.warning('请选择要导出的区划')
    return
  }
  exportLoading.value = true
  try {
    const res = await zoningExportApi(searchParams.value)
    const params = {}
    params.regionIds = selectedFiles.value.map(i => i.id)
    // 调用导出API
    const res = await zoningExportApi(params)
    const blob = new Blob([res.data])
    const url = URL.createObjectURL(blob)
    const a = document.createElement('a')
    a.href = url
    a.download = `区划列表.xlsx`
    const fileName = `区划列表.xlsx`
    a.download = fileName
    document.body.appendChild(a)
    a.click()
    document.body.removeChild(a)
applications/task-work-order/src/views/orderView/organizational/zoningManagement/zoningApi.js
@@ -57,10 +57,11 @@
}
// 导出模板
export const zoningExportTemplateApi = () => {
export const zoningExportTemplateApi = params => {
  return request({
    url: `/blade-system/region/export-template`,
    method: 'get',
    params,
    responseType: 'blob',
  })
}