瀏覽代碼

完善框架

master
张泽亮 2 月之前
父節點
當前提交
d04728d8fa
共有 2 個檔案被更改,包括 7 行新增4 行删除
  1. +4
    -1
      ruoyi-common/src/main/java/com/ruoyi/common/utils/pdf/PdfUtils.java
  2. +3
    -3
      ruoyi-generator/src/main/resources/vm/vue/index.vue.vm

+ 4
- 1
ruoyi-common/src/main/java/com/ruoyi/common/utils/pdf/PdfUtils.java 查看文件

@@ -12,6 +12,7 @@ import com.ruoyi.common.core.domain.pdf.PdfProperty;
import com.ruoyi.common.core.domain.pdf.ShoulderItem;
import com.ruoyi.common.utils.StringUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.MediaType;

import javax.servlet.http.HttpServletResponse;
import java.io.ByteArrayOutputStream;
@@ -94,9 +95,11 @@ public class PdfUtils<statistic> {
// 5. 关闭文档
document.close();
// 6. 将PDF输出到浏览器
response.setContentType("application/pdf");
response.setContentType(MediaType.APPLICATION_PDF_VALUE);
response.setCharacterEncoding("utf-8");
response.setContentLength(baos.size());
response.setHeader("Pragma", "public");
response.setHeader("Cache-Control", "public, must-revalidate");
response.setHeader("Content-Disposition", "inline; filename=example.pdf");
response.getOutputStream().write(baos.toByteArray());
response.getOutputStream().flush();


+ 3
- 3
ruoyi-generator/src/main/resources/vm/vue/index.vue.vm 查看文件

@@ -105,9 +105,9 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>

<!-- 数据列表 列属性(min-width="60" show-overflow-tooltip) -->
<el-table v-loading="loading" :data="${businessName}List" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<!-- 数据列表 列属性 min-width="60" show-overflow-tooltip @selection-change="handleSelectionChange" -->
<el-table v-loading="loading" :data="${businessName}List" >
<!--<el-table-column type="selection" width="55" align="center" />-->
#foreach($column in $columns)
#set($javaField=$column.javaField)
#set($parentheseIndex=$column.columnComment.indexOf("("))


Loading…
取消
儲存