沈丘营商办后台前端项目
wjt
2024-06-25 7c68180242e9c677a798784a816bfdfee4d89965
更换模板接口
2个文件已修改
12 ■■■■ 已修改文件
src/api/system/company/company.ts 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/infomanger/companymanger/components/export.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/system/company/company.ts
@@ -318,4 +318,12 @@
    method: 'post',
    data: data
  })
}
// 下载模板 /system/company/exportTemplate
export function exportTemplate(data) {
  return request({
    url: `/system/company/exportTemplate`,
    method: 'get',
    params: data
  })
}
src/views/infomanger/companymanger/components/export.vue
@@ -22,7 +22,7 @@
import { ElMessageBox } from 'element-plus'
import FileUpload from '@/components/FileUpload/handlerImport.vue'
import { download  as downloadHttp} from '@/utils/request'
import { downTemplate, importTemplate, doImport } from '@/api/system/company/company'
import { downTemplate, importTemplate, doImport, exportTemplate } from '@/api/system/company/company'
const { proxy } = getCurrentInstance();
const dialogVisible = ref(false)
const emit = defineEmits()
@@ -37,7 +37,7 @@
  dialogVisible.value = false
}
function downLoad() {
  downTemplate().then(val => {
  exportTemplate().then(val => {
    downloadHttp('/tool/file/download', {
      fileName: val.msg,
      delete: true