优化代码结构
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
<template>
|
||||
<el-dialog title="导出产品数据" v-model="isShowDialog" width="450px" align-center>
|
||||
<div class="export-content">
|
||||
<el-dialog title="导出报表数据" v-model="isShowDialog" width="450px" align-center>
|
||||
<div class="report-export-content">
|
||||
<div class="export-icon">
|
||||
<el-icon class="icon-download"><Download /></el-icon>
|
||||
</div>
|
||||
<p class="export-text">确定要导出产品数据吗?</p>
|
||||
<p class="export-tip">导出的文件将包含所有产品信息</p>
|
||||
<p class="export-text">确定要导出报表数据吗?</p>
|
||||
<p class="export-tip">导出的文件将包含所有报表信息</p>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
@@ -23,7 +23,7 @@
|
||||
import { ref } from 'vue';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import { Download } from '@element-plus/icons-vue';
|
||||
import { exportProduct } from '/@/api/customerService/report';
|
||||
import { exportReport } from '/@/api/customerService/report';
|
||||
|
||||
const isShowDialog = ref(false);
|
||||
const loading = ref(false);
|
||||
@@ -46,8 +46,8 @@ const handleExport = async () => {
|
||||
params.name = exportName.value;
|
||||
}
|
||||
|
||||
// 调用导出接口 - 根据API文档,这里应该返回JSON
|
||||
const response = await exportProduct(params);
|
||||
// 调用导出接口
|
||||
const response = await exportReport(params);
|
||||
|
||||
console.log('导出响应:', response);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user