diff --git a/dl_admin/ruoyi-admin/src/main/java/com/ruoyi/busi/controller/StatisticsController.java b/dl_admin/ruoyi-admin/src/main/java/com/ruoyi/busi/controller/StatisticsController.java index 8840514..fe00fe9 100644 --- a/dl_admin/ruoyi-admin/src/main/java/com/ruoyi/busi/controller/StatisticsController.java +++ b/dl_admin/ruoyi-admin/src/main/java/com/ruoyi/busi/controller/StatisticsController.java @@ -65,21 +65,25 @@ public class StatisticsController extends BaseController */ @GetMapping("/countryChart") public AjaxResult countryChart(String tenantId,String startDate,String endDate){ - return success(busiThirdItemService.nationalData(tenantId,startDate,endDate,null)); + return success(busiThirdItemService.nationalData(tenantId,startDate,endDate,10)); } /** * 询盘国家列表--分页表格 */ @GetMapping("/inquiryCountryList") - public AjaxResult inquiryCountryList(@RequestParam(name = "tenantId", defaultValue = "1") String tenantId, - @RequestParam(name = "startDate", defaultValue = "1") String startDate, - @RequestParam(name = "endDate", defaultValue = "1") String endDate, + public AjaxResult inquiryCountryList(@RequestParam(name = "tenantId",required = true) String tenantId, + @RequestParam(name = "startDate", required = false) String startDate, + @RequestParam(name = "endDate", required = false) String endDate, @RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize){ List list = busiThirdItemService.nationalData(tenantId,startDate,endDate,null); int startIndex = (pageNum-1)*pageSize; int endIndex = Math.min(startIndex+pageSize,list.size()); - return success(list.subList(startIndex,endIndex)); + Map rtnMap = new HashMap<>(); + rtnMap.put("records",list.subList(startIndex,endIndex)); + rtnMap.put("current",pageNum); + rtnMap.put("total",list.size()); + return success(rtnMap); } } diff --git a/dl_vue/src/api/statistics/statistics.js b/dl_vue/src/api/statistics/statistics.js index 25d9da6..e4cc45a 100644 --- a/dl_vue/src/api/statistics/statistics.js +++ b/dl_vue/src/api/statistics/statistics.js @@ -25,4 +25,12 @@ export function countryChart(query) { params: query }) } +//国家分布---分页表格 +export function inquiryCountryList(query) { + return request({ + url: '/statistics/inquiryCountryList', + method: 'get', + params: query + }) +} diff --git a/dl_vue/src/views/statistics/countryList/index.vue b/dl_vue/src/views/statistics/countryList/index.vue new file mode 100644 index 0000000..c1a10ec --- /dev/null +++ b/dl_vue/src/views/statistics/countryList/index.vue @@ -0,0 +1,149 @@ + +