<template> <div id = 'bartest2' style="width:1300px;height:400px"></div> </template> <script> import * as echarts from '@/assets/echarts.min.js'; export default{ data(){ return{ data:[] } }, async created(){ const response = await fetch('/supermarket_visualization.csv'); const csvData = await response.text(); const rows = csvData.trim().split('\n'); this.data = rows.slice(1).map(row=>{ const columns = row.split(','); const Data1 = columns[4];//中类名称 const Date3 = columns[7];//销售日期 const Data2 = parseFloat(columns[13].toFixed(2));//销售金额 return{ Medium_Name:Data1, Sales_Amount:Data2, Sales_Date:Date3 } }); this.initChart(); }, methods:{ initChart(){ const myChart = echarts.init(document.getElementById('bartest2')); const filterData = this.data.filter(item=>{ const date = new Date(item.Sales_Date); return date.getFullYear() === 2024; }) const Sales_MediumName = filterData.reduce((acc,item)=>{ if(!acc[item.Medium_Name]){ acc[item.Medium_Name] = 0; } acc[item.Medium_Name] += Number(item.Sales_Amount ||0); return acc; },{}); const SalesData = Object.keys(Sales_MediumName) .map(SalesMediumName =>({ SalesMediumName:SalesMediumName, Total_Amount:Sales_MediumName[SalesMediumName] })) .sort((a,b)=> b.Total_Amount - a.Total_Amount); const Top10Data = SalesData.slice(0,10); console.log("打印2024年销售金额最高的10个中类名称") const MediumSalesName = Top10Data.map(item=>item.SalesMediumName); const TOTAL_Amount = Top10Data.map(item=>item.Total_Amount); console.log('2024年销售金额最高的6个月:', MediumSalesName, TOTAL_Amount) const option={ title:{ text:'2024年销售金额最高的10个中类名称', left:'top' }, tooltip:{ trigger:'axis' }, xAxis:{ type:'category', data:MediumSalesName }, yAxis:{ type:'value' }, series:[{ data:TOTAL_Amount, type:'bar', label:{ show:true, position:'outside', formatter:function(params){ return params.value.toFixed(2) } } }] } myChart.setOption(option) } } } </script> 检查代码
相关推荐




<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<style>
.bg-f4f6f7 {
background-color: #f4f6f7;
}
</style>
</head>
<body>
Æon
管理员
首页
用户管理
封禁/解除用户
用户列表
用户行为记录
歌手管理
封禁/解封歌手
歌手歌曲
歌曲内容管理
歌曲收藏
评论管理
歌曲信息
歌单管理
社区管理
帖子审核
帖子发布
举报处理
数据分析
播放量分析
用户分析
管理员管理
系统管理
<template id="homeTpl" class="">
首页
用户数量
新增用户数{{usernum}}
总用户数{{totalusernum}}
歌手数量
总歌手数{{singernum}}
代办事项
无
快捷入口
用户
用户
用户
用户
用户
用户
用户
用户
访问统计
</template>
<template id="usersTpl">
首页->用户
用户名:
<input placeholder="查询内容" class="pt-2 pb-2 rounded" />
查询
新增
删除
选择
索引
用户名
头像
性别
账号
操作
</template>
<template id="singerTpl">
首页->歌手
歌手/歌曲:
<input placeholder="查询内容" class="pt-2 pb-2 rounded" />
查询
新增
删除
<input type="checkbox" id="selectAll" class="checkbox">
索引
歌手
照片
性别
歌曲
操作
加载中...
</template>
<template id="gedanTpl">
首页->歌单
歌单:
<input placeholder="查询内容" class="pt-2 pb-2 rounded" />
查询
新增
删除
索引
歌曲名称
海报
歌曲分类
歌手
视频
操作
加载中...
</template>
<template id="shequTpl">
首页->社区
歌单:
<input placeholder="查询内容" class="pt-2 pb-2 rounded" />
查询
新增
删除
<input type="checkbox" id="selectAll">
编号
帖子标题
发布人
发布时间
更新时间
审核时间
状态
操作
加载中...
</template>
<template id="shujuTpl">
播放量
平台总播放量分析
歌手播放量
当前趋势分析
</template>
<template id="guanliTpl">
管理员管理
管理员
</template>
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.7.1/jquery.js"></script>
<script src="js/cebianlan.js"></script>
</body>
</html>在js中新增20条用户数据,能够进行增删设置,搜索设置









<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Static Maze Game</title> <style> .wall { background-color: black; width: 50px; height: 50px; display: inline-block; } .path { background-color: white; border: 1px solid gray; width: 50px; height: 50px; display: inline-block; text-align: center; line-height: 50px; } </style> </head> <body> Maze Game Level 1 → You reached level 2! </body> </html>The Adventure Begins You are standing at a crossroads. Go to the forest. Climb the mountain. In The Forest... You find an old cabin with strange symbols carved into its walls. Climbing The Mountain... A fierc



<%--
Created by IntelliJ IDEA.
User: vili
Date: 2019/8/23
Time: 13:56
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@page isELIgnored="false" %>
<html>
<head>
<title>商品列表</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="layer/layer.js"></script>
<script type="text/javascript" src="js/cart.js"></script>
</head>
<body>
<jsp:include page="/header.jsp">
<jsp:param name="flag" value="1"></jsp:param>
</jsp:include>
${scrollBook.bname}
今日精选推荐
立刻购买
热销推荐
<c:forEach items="${hotList}" var="book">
查看详情
立刻购买
${book.btname} > ${book.bname}
¥ ${book.bprice}
</c:forEach>
新品推荐
<c:forEach items="${newList}" var="book">
查看详情
立刻购买
${book.btname} > ${book.bname}
¥ ${book.bprice}
</c:forEach>
<jsp:include page="/footer.jsp"></jsp:include>
</body>
</html>
<%--
Created by IntelliJ IDEA.
User: vili
Date: 2019/8/24
Time: 17:09
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@page isELIgnored="false" %>
<!DOCTYPE html>
<html>
<head>
<title>后台管理</title>
</head>
<body>
<jsp:include page="header.jsp"></jsp:include>
欢迎进入叮当书城后台管理系统!
</body>
</html>
如何使后台管理页面能从主页进行跳转,直接输出修改后的代码

<%-- Created by IntelliJ IDEA. User: syp Date: 2023/5/22 Time: 13:59 To change this template use File | Settings | File Templates. --%> <%@ page contentType="text/html;charset=UTF-8" language="java" %> <html> <head> <title>Denglu</title> </head> <body leftmargin="0" topmargin="0" marginheight="0" marginwidth="0"> <fieldset style="width: auto; margin: 0px auto"> <legend> 欢迎使用常州工业职业技术学院人员管理系统 </legend>
<form action="loginSuccess.action"> 用户:<input type="text" name="username"/>
密码:<input type="password" name="password"/>
<input type="submit" value="登录"/> 注册 </form> </fieldset> </body> </html>
<form action="loginSuccess.action"> 用户:<input type="text" name="username"/>
密码:<input type="password" name="password"/>
<input type="submit" value="登录"/> 注册 </form> </fieldset>


