xiongzhu 2 anos atrás
pai
commit
17b5c4f814

+ 3 - 3
src/main/java/com/izouma/zhirongip/web/resource/IntellectualPropertyController.java

@@ -34,7 +34,7 @@ public class IntellectualPropertyController extends BaseController {
     public IntellectualProperty save(@RequestBody IntellectualProperty record) {
         if (record.getId() != null) {
             IntellectualProperty orig = intellectualPropertyRepo.findById(record.getId())
-                    .orElseThrow(new BusinessException("无记录"));
+                                                                .orElseThrow(new BusinessException("无记录"));
             ObjUtils.merge(orig, record);
             return intellectualPropertyRepo.save(orig);
         }
@@ -58,9 +58,9 @@ public class IntellectualPropertyController extends BaseController {
         intellectualPropertyRepo.softDelete(id);
     }
 
-    @GetMapping("/excel")
+    @PostMapping("/excel")
     @ResponseBody
-    public void excel(HttpServletResponse response, PageQuery pageQuery) throws IOException {
+    public void excel(HttpServletResponse response, @RequestBody PageQuery pageQuery) throws IOException {
         List<IntellectualProperty> data = all(pageQuery).getContent();
         List<IntellectualPropertyDTO> dtoList = intellectualPropertyService.export(data);
         ExcelUtils.export(response, dtoList);

+ 10 - 7
src/main/vue/src/views/resource/IntellectualPropertyList.vue

@@ -197,17 +197,20 @@ export default {
         download() {
             this.downloading = true;
             this.$axios
-                .get('/intellectualProperty/excel', {
-                    responseType: 'blob',
-                    params: {
-                        size: 10000,
+                .post(
+                    '/intellectualProperty/excel',
+                    {
+                        size: 1000000,
                         query: {
-                            lawStatus: this.lawStatus,
-                            type: this.type,
+                            lawStatusId: this.lawStatus,
+                            typeId: this.type,
                             industryClass: this.industry
                         }
+                    },
+                    {
+                        responseType: 'blob'
                     }
-                })
+                )
                 .then(res => {
                     console.log(res);
                     this.downloading = false;