mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2025-09-24 07:19:46 +08:00
update 代码生成模板 适配新excel导出
This commit is contained in:
@ -307,7 +307,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName}, export${BusinessName} } from "@/api/${moduleName}/${businessName}";
|
||||
import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName} } from "@/api/${moduleName}/${businessName}";
|
||||
import { downLoadExcel } from "@/utils/download";
|
||||
|
||||
export default {
|
||||
name: "${BusinessName}",
|
||||
@ -599,18 +600,7 @@ export default {
|
||||
#end
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const queryParams = this.queryParams;
|
||||
this.$confirm('是否确认导出所有${functionName}数据项?', "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.exportLoading = true;
|
||||
return export${BusinessName}(queryParams);
|
||||
}).then(response => {
|
||||
this.download(response.msg);
|
||||
this.exportLoading = false;
|
||||
}).catch(() => {});
|
||||
downLoadExcel('/${moduleName}/${businessName}/export', this.queryParams);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user