| | |
| | | :limit="1" |
| | | accept=".xlsx, .xls" |
| | | :headers="upload.headers" |
| | | :action="upload.url + '?updateSupport=' + upload.updateSupport" |
| | | :action="upload.url" |
| | | :data="upload.data" |
| | | :disabled="upload.isUploading" |
| | | :before-upload="upload.beforeUpload" |
| | | :on-progress="upload.onProgress" |
| | |
| | | import { onMounted, ref, reactive, getCurrentInstance, toRefs } from "vue"; |
| | | import { Search, Paperclip, Upload } from "@element-plus/icons-vue"; |
| | | import { |
| | | delCustomerPrivate, |
| | | addCustomerFollow, |
| | | updateCustomerFollow, |
| | | delCustomerFollow, |
| | |
| | | // 设置上传的请求头部 |
| | | headers: { Authorization: "Bearer " + getToken() }, |
| | | // 上传的地址 |
| | | url: import.meta.env.VITE_APP_BASE_API + "/customerPrivate/importData", |
| | | url: import.meta.env.VITE_APP_BASE_API + "/basic/customer/importData", |
| | | data: { |
| | | type: 0 |
| | | }, |
| | | // 文件上传前的回调 |
| | | beforeUpload: file => { |
| | | console.log("文件即将上传", file); |
| | |
| | | } |
| | | /** 下载模板 */ |
| | | function importTemplate() { |
| | | proxy.download("/customerPrivate/downloadTemplate", {}, "客户导入模板.xlsx"); |
| | | proxy.download("/basic/customer/downloadTemplate", {}, "客户导入模板.xlsx"); |
| | | } |
| | | // 打开弹框 |
| | | const openForm = (type, row) => { |
| | |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | proxy.download("/customerPrivate/export", {}, "客户档案.xlsx"); |
| | | proxy.download("/basic/customer/export", {type: 0}, "客户档案.xlsx"); |
| | | }) |
| | | .catch(() => { |
| | | proxy.$modal.msg("已取消"); |