Selaa lähdekoodia

完善框架

master
张泽亮 2 kuukautta sitten
vanhempi
commit
d04728d8fa
2 muutettua tiedostoa jossa 7 lisäystä ja 4 poistoa
  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 Näytä tiedosto

@@ -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 Näytä tiedosto

@@ -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("("))


Ladataan…
Peruuta
Tallenna