增加自定义导出
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import request from '@/config/axios'
|
import request from '@/config/axios'
|
||||||
import { encryptAES } from '@/components/LowDesign/src/utils/aes'
|
import { encryptAES } from '@/components/LowDesign/src/utils/aes'
|
||||||
|
import download from '@/utils/download'
|
||||||
|
|
||||||
//获取表单开发列表
|
//获取表单开发列表
|
||||||
export const getDbList = (data) => {
|
export const getDbList = (data) => {
|
||||||
@@ -158,6 +159,11 @@ export const exportExcelData = (tableId, data) => {
|
|||||||
return request.download({ url: `/jeelowcode/excel/exportExcel/${tableId}`, method: 'POST', data })
|
return request.download({ url: `/jeelowcode/excel/exportExcel/${tableId}`, method: 'POST', data })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//导出Excel表数据
|
||||||
|
export const exportExcelDataCustom = (explain,tableId, data) => {
|
||||||
|
return request.download({ url: `/jeelowcode/excel/exportExcelCustom/${tableId}`, method: 'POST', data }).then((data) => download.excel(data, explain, 'xlsx'))
|
||||||
|
}
|
||||||
|
|
||||||
//下载导入模板
|
//下载导入模板
|
||||||
export const downloadImportTemplate = (tableId) => {
|
export const downloadImportTemplate = (tableId) => {
|
||||||
return request.download({ url: `/jeelowcode/excel/exportExcelTemplate/${tableId}` })
|
return request.download({ url: `/jeelowcode/excel/exportExcelTemplate/${tableId}` })
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import { encryptAES, decryptAES } from '@/components/LowDesign/src/utils/aes'
|
|||||||
import { useUserStoreWithOut } from '@/store/modules/user'
|
import { useUserStoreWithOut } from '@/store/modules/user'
|
||||||
import { useI18n } from '@/hooks/web/useI18n';
|
import { useI18n } from '@/hooks/web/useI18n';
|
||||||
import router from '@/router/index'
|
import router from '@/router/index'
|
||||||
|
import {exportExcelDataCustom} from '@/api/design/table'
|
||||||
|
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
|
|
||||||
@@ -18,6 +19,7 @@ export default {
|
|||||||
* @param options 请求配置 如:{ params:{ text:'测试' } }
|
* @param options 请求配置 如:{ params:{ text:'测试' } }
|
||||||
*/
|
*/
|
||||||
requestApi: (Method, url, options) => callApiFun(Method, url, options),
|
requestApi: (Method, url, options) => callApiFun(Method, url, options),
|
||||||
|
exportExcelCustom: (tableId, data) => exportExcelDataCustom(tableId, data),
|
||||||
cloneDeep, //深拷贝
|
cloneDeep, //深拷贝
|
||||||
listToTree,//列表转树结构
|
listToTree,//列表转树结构
|
||||||
formatDate,//时间格式化
|
formatDate,//时间格式化
|
||||||
|
|||||||
Reference in New Issue
Block a user