摘要: xAxis: [{ type: 'category', boundaryGap: false, axisLabel: { textStyle: { color: "rgba(255,255,255,.6)", fontSize: 12, }, interval: 0, // 数据处理 formatt 阅读全文
posted @ 2021-12-21 15:36 卡农的忧伤ろ◆ 阅读(165) 评论(0) 推荐(0)
摘要: /** * 根据共同属性将数据分组 * @param data [数据源] * @param field [字段名] */ const groupingData = (data, filed) => { let map = {}; let dest = []; data.forEach(item = 阅读全文
posted @ 2021-12-21 15:33 卡农的忧伤ろ◆ 阅读(357) 评论(0) 推荐(0)
摘要: /** * 获取当月的日期集合(yyyy-MM-dd) */ function currentMonthDays() { // 获取标准时间 const date = new Date(); // 获取当天日期 const currentDay = date.getDate(); // 获取当前月份 阅读全文
posted @ 2021-12-21 14:15 卡农的忧伤ろ◆ 阅读(2334) 评论(0) 推荐(0)
摘要: /** * 日期格式化 * @param datetime 日期 * @param fmt 格式 * @returns {*} */ function dateFormat(datetime, fmt) { if (parseInt(datetime) == datetime) { if (date 阅读全文
posted @ 2021-12-21 14:13 卡农的忧伤ろ◆ 阅读(152) 评论(0) 推荐(0)
摘要: 第一种:定制显示 series: [ { type: 'bar', data: alertSizeArr, barWidth: '30%', //柱子宽度 // barGap: 1, //柱子之间间距 itemStyle: { normal: { color: function (params) { 阅读全文
posted @ 2021-12-18 10:43 卡农的忧伤ろ◆ 阅读(1500) 评论(0) 推荐(0)
摘要: methods: { // 回到顶部 goTop() { cancelAnimationFrame(this.timer) const self = this self.timer = requestAnimationFrame(function fn () { const oTop = docum 阅读全文
posted @ 2021-12-10 16:57 卡农的忧伤ろ◆ 阅读(146) 评论(0) 推荐(0)
摘要: 筛选(在list中筛选所有名称为admin的数据) List<Object> resultList = list.stream().filter(obj-> Objects.equals(obj.getName(), "admin")).collect(Collectors.toList()); 处 阅读全文
posted @ 2021-12-01 14:29 卡农的忧伤ろ◆ 阅读(1372) 评论(0) 推荐(0)
摘要: 分组 Map<String, List<Object>> itemMap = list.parallelStream().collect(Collectors.groupingBy(Object::getType)); 处理 itemMap.forEach((x,y)->{ System.out.p 阅读全文
posted @ 2021-12-01 13:53 卡农的忧伤ろ◆ 阅读(421) 评论(0) 推荐(0)
摘要: 第一种 boolean a = list.stream().anyMatch(m -> m.getUserName().equals("admin")); 第二种 boolean b = list.stream().filter(m -> m.getUserName().equals("admin" 阅读全文
posted @ 2021-12-01 13:35 卡农的忧伤ろ◆ 阅读(4252) 评论(0) 推荐(1)
摘要: /** * 需要分组的list数据 */ List<User> list = new ArrayList<>(); /** * 将所有的数据根据用户名称进行分组处理 */ Map<String, List<User>> userMap = ListUtil.groupBy(list, new Lis 阅读全文
posted @ 2021-05-19 11:03 卡农的忧伤ろ◆ 阅读(96) 评论(0) 推荐(0)