Vue2+ElementUI 静态首页案例

 源码

<template><div class="app-container home"><el-row  type="flex" justify="space-around" class="row-bg"><el-card class="box-card cardDiv1"><el-col :span="5"><div class="box-div card1"><div class="webBox"><div class="webO">今日交易额:</div><div class="webT">¥645334.45</div></div></div></el-col><el-col :span="5"><div class="box-div card2"><div class="webBox"><div class="webO">今日订单数量:</div><div class="webT">7512</div></div></div></el-col><el-col :span="5"><div class="box-div card3"><div class="webBox"><div class="webO">今日访问人数:</div><div class="webT">53101</div></div></div></el-col><el-col :span="5"><div class="box-div card4"><div class="webBox"><div class="webO">今日新增用户:</div><div class="webT">8868</div></div></div></el-col><el-col :span="5"><div class="box-div card5"><div class="webBox"><div class="webO">累计用户量:</div><div class="webT">895421</div></div></div></el-col></el-card></el-row>
<!--    <el-divider />--><el-row type="flex" justify="space-around" class="row-bg" style="margin-bottom:10px"><el-col :span="10"><el-card class="box-card" style="height: 320px;margin-right: 10px"><div id="main1" style="height: 300px;width:700px"></div></el-card></el-col><el-col :span="7"><el-card class="box-card" style="height: 320px;margin-right: 10px"><div id="main2" style="height: 270px;width:400px"></div></el-card></el-col><el-col :span="7"><el-card class="box-card" style="height: 320px;"><div id="main3" style="height: 270px;width:400px"></div></el-card></el-col></el-row>
<!--    <el-divider />--><el-row type="flex" justify="space-around" class="row-bg" ><el-col :span="14" style="margin-right: 10px"><el-card class="box-card cardDiv2"><div slot="header" class="clearfix"><span style="margin-right: 30px">订单信息</span><el-badge :value="99" class="item"><el-button type="text" size="small">待处理订单</el-button></el-badge><el-button style="float: right; padding: 3px 0" type="text">更多</el-button></div><el-table:data="tableData2"height="300"style="width: 100%"><el-table-columnprop="code"label="订单编号"></el-table-column><el-table-columnprop="date"label="下单日期"></el-table-column><el-table-columnprop="money"label="交易金额"></el-table-column><el-table-columnprop="name"label="客户名称"></el-table-column><el-table-columnprop="status"label="订单状态"><template slot-scope="scope"><span v-if="scope.row.status==='1'" style="color: #FF9933">待发货</span><span v-if="scope.row.status==='2'" style="color: #FF5722">已退货</span><span v-if="scope.row.status==='3'" style="color: #1890ff">已取消</span></template></el-table-column><el-table-columnlabel="操作"><template slot-scope="scope"><el-button  type="text" icon="el-icon-view" size="small">查看</el-button><el-button type="text" icon="el-icon-edit" size="small">编辑</el-button></template></el-table-column></el-table></el-card></el-col><el-col :span="10"><el-card class="box-card cardDiv2"><div slot="header" class="clearfix"><span>客户信息</span><el-badge :value="99" class="item" style="visibility: hidden"><el-button type="text" size="small">待处理订单</el-button></el-badge><el-button style="float: right; padding: 3px 0" type="text">更多</el-button></div><el-table:data="tableData"height="300"style="width: 100%"><el-table-columnprop="name"label="客户名称"></el-table-column><el-table-columnprop="phone"label="联系电话"></el-table-column><el-table-columnprop="money"label="消费金额"></el-table-column><el-table-columnprop="level"label="会员级别"><template slot-scope="scope"><span v-if="scope.row.level==='1'"><el-tag type="danger">至尊</el-tag></span><span v-if="scope.row.level==='2'"><el-tag type="success">钻石</el-tag></span><span v-if="scope.row.level==='3'"><el-tag type="warning">黄金</el-tag></span><span v-if="scope.row.level==='4'"><el-tag type="info">普通</el-tag></span></template></el-table-column><el-table-columnlabel="操作"><template slot-scope="scope"><el-button  type="text" icon="el-icon-view" size="small">查看</el-button></template></el-table-column></el-table></el-card></el-col></el-row></div>
</template><script>
import * as echarts from 'echarts'
export default {name: "Index",data() {return {// 版本号version: "3.8.6",tableData: [{money: '8856.56',name: '张三',phone: '18888888888',level:'1'}, {money: '2384.50',name: '李四',phone: '18888888888',level:'2'}, {money: '6000.20',name: '王五',phone: '13688888888',level:'3'}, {money: '5558.34',name: '赵六',phone: '13688888888',level:'4'},{money: '1234.25',name: '钱七',phone: '13688888888',level:'3'},{money: '1234.25',name: '钱七',phone: '13688888888',level:'3'},{money: '1234.25',name: '钱七',phone: '13688888888',level:'2'}],tableData2: [{date: '2016-05-02',name: '张三',code: '454545454234455',money: '2422',status: '1',},{date: '2016-05-02',name: '李四',code: '234234234324234',money: '7870.00',status: '1',},{date: '2016-05-02',name: '王五',code: '23523523544644',money: '34545.2',status: '1',},{date: '2016-05-02',name: '赵六',code: '25235235235325',money: '3430',status: '2',},{date: '2016-05-02',name: '钱七',code: '25235235235325',money: '3430',status: '3',},]};},created() {},mounted() {this.setLineData()this.setbData()this.setBireData()},methods: {goTarget(href) {window.open(href, "_blank");},setLineData(){var chartDom = document.getElementById('main1');var myChart = echarts.init(chartDom);var option;option = {title: [{text: '一周交易额',textStyle: {fontSize: 15},},{text: '单位:万元',left:'80%',textStyle:{fontSize:13,fontWeight:100}}],xAxis: {type: 'category',data: ['3-16', '3-17', '3-18', '3-19', '3-20', '3-21', '3-22']},yAxis: {type: 'value',splitLine:{show:true,lineStyle:{type:'dashed'}}},series: [{data: [150, 230, 224, 218, 135, 147, 260],type: 'line',itemStyle: {normal: {color: "#2ec7c9",lineStyle: {color: "rgb(30 198 149)"}}},}]};option && myChart.setOption(option);},setbData(){var chartDom = document.getElementById('main2');var myChart = echarts.init(chartDom);var option;option = {color: ['#49bafc', '#e9898f', '#f7b230', '#bd92e1', '#26c8aa'],title: {text: '商品销售额占比',left: 'left',textStyle: {fontSize: 15},},tooltip: {trigger: 'item',formatter: '{a} <br/>{b} : {c} ({d}%)'},legend: {bottom: 1,left: 'center',data: ['食品', '服装', '家电', '日用品', '原材料']},series: [{type: 'pie',radius: '65%',center: ['50%', '45%'],selectedMode: 'single',data: [{ value: 1548,name: '原材料'},{ value: 735, name: '日用品'},{ value: 510, name: '家电' },{ value: 434, name: '服装' },{ value: 335, name: '食品' }],emphasis: {itemStyle: {shadowBlur: 10,shadowOffsetX: 0,shadowColor: 'rgba(0, 0, 0, 0.5)'}}}]};option && myChart.setOption(option);},setBireData(){var chartDom = document.getElementById('main3');var myChart = echarts.init(chartDom);var option;option = {title: {text: '订单状态',textStyle: {fontSize: 15},},tooltip: {trigger: 'axis',axisPointer: {type: 'shadow'}},legend: {},grid: {left: '3%',right: '4%',bottom: '3%',containLabel: true,//设置自适应画布大小状态为开,也可通过设置left左移实现相同效果},xAxis: {type: 'value',boundaryGap: [0, 0.01],splitLine:{show:false},"axisLine":{     //x轴坐标轴"show":false},axisLabel:{show: false},axisTick: {		//x轴刻度线show:false},},yAxis: {type: 'category', //纵向改成横向柱状图data: ['今日取消订单', '今日评价订单','今日退货订单','今日发货订单',  ], //y轴显示文字axisTick: {show: false},axisLine: {show: false,},},series: [{name: '',type: 'bar',barWidth: 20,showSymbol: false,label:{ //柱状图显示数值show:true,position: 'insideTop', //内部顶部显示textStyle: {color: '#FFF', //字体颜色fontSize: 14 //字体大小}},data: [{value:1546,itemStyle: {normal: {barBorderRadius: [0, 6, 6, 0],color: new echarts.graphic.LinearGradient(1, 0, 0, 0, [{ //1000纵向柱状图渐变色 0100横向柱状图渐变色offset: 0,color: "rgba(30, 198, 149, 1)" // 0% 处的颜色}, {offset: 0.6,color: "rgba(30, 198, 149, 1)" // 60% 处的颜色}, {offset: 1,color: "rgba(51, 204, 204, 1)" // 100% 处的颜色}], false)}},},{value:860,itemStyle: {normal: {barBorderRadius: [0, 6, 6, 0],//顺时针左上,右上,右下,左下)color: new echarts.graphic.LinearGradient(1, 0, 0, 0, [{offset: 0,color: "rgba(170, 137, 254, 1)" // 0% 处的颜色}, {offset: 0.6,color: "rgba(170, 137, 254, 1)" // 60% 处的颜色}, {offset: 1,color: "rgba(204, 153, 204, 1)" // 100% 处的颜色}], false)}},},{value:1022,itemStyle: {normal: {barBorderRadius: [0, 6, 6, 0],color: new echarts.graphic.LinearGradient(1, 0, 0, 0, [{offset: 0,color: "rgba(226, 113, 140, 1)" // 0% 处的颜色}, {offset: 0.6,color: "rgba(244, 174, 149, 1)" // 60% 处的颜色}, {offset: 1,color: "rgba(244, 174, 149, 1)" // 100% 处的颜色}], false)}},},{value:1600,itemStyle: {normal: {barBorderRadius: [0, 6, 6, 0],color: new echarts.graphic.LinearGradient(1, 0, 0, 0, [{offset: 0,color: "rgba(255, 153, 51, 1)" // 0% 处的颜色}, {offset: 0.6,color: "rgba(255, 153, 51, 1)" // 60% 处的颜色}, {offset: 1,color: "rgba(239, 203, 45, 1)" // 100% 处的颜色}], false)}},},]},]};option && myChart.setOption(option);}}
};
</script><style scoped lang="scss">::v-deep .el-card__body {padding: 15px 20px 20px 20px;display: flex;justify-content: center;}.box-div{height: 120px;padding: 35px;margin: 20px;}.cardDiv1{width: 100%;margin-bottom: 10px;}.cardDiv2{width: 100%;margin-bottom: 20px;}.app-container {padding: 20px;background: #eeeeee50;}
.home {blockquote {padding: 10px 20px;margin: 0 0 20px;font-size: 17.5px;border-left: 5px solid #eee;}hr {margin-top: 20px;margin-bottom: 20px;border: 0;border-top: 1px solid #eee;}.col-item {margin-bottom: 20px;}ul {padding: 0;margin: 0;}font-family: "open sans", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 13px;color: #676a6c;overflow-x: hidden;ul {list-style-type: none;}h4 {margin-top: 0px;}h2 {margin-top: 10px;font-size: 26px;font-weight: 100;}p {margin-top: 10px;b {font-weight: 700;}}.update-log {ol {display: block;list-style-type: decimal;margin-block-start: 1em;margin-block-end: 1em;margin-inline-start: 0;margin-inline-end: 0;padding-inline-start: 40px;}}.webBox{display: -webkit-box;-webkit-box-orient: vertical;}.webO{display: -webkit-box;-webkit-box-pack: start;-webkit-box-align: center;font-size: 14px;font-weight: 700;color: #fff;}.webT{display: -webkit-box;-webkit-box-pack: end;-webkit-box-align: center;font-size: 20px;font-weight: 700;padding-right: 50px;padding-top: 10px;color: #fff;}.card1{background: linear-gradient(180deg, rgba(30, 198, 149, 1) 0%, rgba(30, 198, 149, 1) 0%, rgba(51, 204, 204, 1) 100%, rgba(51, 204, 204, 1) 100%);border: none;border-radius: 4px;box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.349019607843137);font-family: 'Arial Negreta', 'Arial Normal', 'Arial';}.card2{background: linear-gradient(90deg, rgba(244, 174, 149, 1) 0%, rgba(244, 174, 149, 1) 0%, rgba(226, 113, 140, 1) 100%, rgba(226, 113, 140, 1) 100%);border: none;border-radius: 4px;box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.349019607843137);font-family: 'Arial Negreta', 'Arial Normal', 'Arial';}.card3{background: linear-gradient(180deg, rgba(255, 153, 51, 1) 0%, rgba(255, 153, 51, 1) 0%, rgba(239, 203, 45, 1) 100%, rgba(239, 203, 45, 1) 100%);border: none;border-radius: 4px;box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.349019607843137);font-family: 'Arial Negreta', 'Arial Normal', 'Arial';}.card4{background: linear-gradient(180deg, rgba(45, 169, 250, 1) 0%, rgba(45, 169, 250, 1) 0%, rgba(102, 204, 255, 1) 100%, rgba(102, 204, 255, 1) 100%);border: none;border-radius: 4px;box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.349019607843137);font-family: 'Arial Negreta', 'Arial Normal', 'Arial';}.card5{background: linear-gradient(180deg, rgba(170, 137, 254, 1) 0%, rgba(170, 137, 254, 1) 0%, rgba(204, 153, 204, 1) 100%, rgba(204, 153, 204, 1) 100%);border: none;border-radius: 4px;box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.349019607843137);font-family: 'Arial Negreta', 'Arial Normal', 'Arial';}
}
</style>

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/87447.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

小程序自定义tabbar,中间凸起

微信小程序自带tabbar&#xff0c;但无法实现中间按钮凸起样式和功能&#xff0c;因此按照设计重新自定义一个tabbar 1、创建tabbar文件&#xff0c;与pages同级创建一个文件夹&#xff0c;custom-tab-bar,里面按照设计图将底部tabbar样式编写 <view class"tab-bar&q…

庆国庆中秋双节多克大回馈!!!凡官方旗舰店产品,每个产品下订单的前10名,现价基础之上8 折优惠

凡官方旗舰店产品&#xff0c;每个产品下订单的前10名&#xff0c;现价基础之上8折优惠&#xff08;每单限一个产品&#xff09;&#xff1b;10名之后&#xff0c;现价基础之上9.5折优惠&#xff0c;付款之前请加官方微信&#xff0c;并将订单截图发送至官方微信&#xff01;&a…

【设计模式】四、工厂模式

文章目录 概述工厂模式简单工厂模式&#xff1a;工厂方法模式抽象工厂模式小结 概述工厂模式 传统方式&#xff1a; 简单工厂模式&#xff1a; 简单工厂模式的设计方案: 定义一个可以实例化 Pizaa 对象的类&#xff0c;封装创建对象的代码。 存在的问题&#xff1a; 简单工厂…

肠道微生物可改善围手术期和术后康复效果

谷禾健康 手术&#xff0c;俗称开刀&#xff0c;是医生通过医疗器械对病人身体局部进行去除病变组织、修复损伤等治疗&#xff0c;来维持患者的健康&#xff0c;在治愈疾病方面具有明确的作用。 围手术期是指从手术决策到手术结束及术后恢复期的整个时间段。围手术期管理的目标…

unable to access xxxx: Failed to connect to xxxx

问题&#xff1a; 1、GitLab仓库加上双重验证后&#xff0c;设置GIt得 Manage Remotes时报错 unable to access xxxx: Failed to connect to xxxx SSL certificate problem:self signed certificate 解决 1、返回前面得操作步骤检查了一遍 没有问题 2、最后尝试一些方法解…

Level FHE 的高效实现 兼容 Level FHE 的高级算法

参考文献&#xff1a; [CS05] Choi Y, Swartzlander E E. Parallel prefix adder design with matrix representation[C]//17th IEEE Symposium on Computer Arithmetic (ARITH’05). IEEE, 2005: 90-98.[SV11] Smart N P, Vercauteren F. Fully homomorphic SIMD operations[…

全国职业技能大赛云计算--高职组赛题卷③(容器云)

全国职业技能大赛云计算--高职组赛题卷③&#xff08;私有云&#xff09; 第二场次题目&#xff1a;容器云平台部署与运维任务1 Docker CE及私有仓库安装任务&#xff08;5分&#xff09;任务2 基于容器的web应用系统部署任务&#xff08;15分&#xff09;任务3 基于容器的持续…

vue3在watch和watchEffect的使用

Vue3 的 watch 是一个函数&#xff0c;能接收三个参数&#xff0c;参数一是监听的属性&#xff0c;参数二是接收新值和老值的回调函数&#xff0c;参数三是配置项。 <script setup> import { watch, ref, reactive } from vueprops: [info], const data reactive({name…

vue点击pdf文件直接在浏览器中预览文件

好久没有更新文章了&#xff0c;说说为什么会有这篇文章呢&#xff0c;其实是应某个热线评论的要求出的&#xff0c;不过由于最近很长一段时间没打开csdn现在才看到&#xff0c;所以才会导致到现在才出。 先来看看封装完这个预览方法的使用&#xff0c;主打一个方便使用&#x…

超详细postgresql基础语法和备份恢复

postgresql基础语法 \l 查看所有库\c ceshi&#xff08;库名&#xff09; 进入对应库\d 查看所有表\q 退出数据库\help 查询语法使用方法\du 查看数据库用户\dp 查看数据库用户权限\db 查看表空间查看所有用户 select * from pg_user;创建用户 create use…

结合Mockjs与Bus事件总线搭建首页导航和左侧菜单

&#x1f389;&#x1f389;欢迎来到我的CSDN主页&#xff01;&#x1f389;&#x1f389; &#x1f3c5;我是Java方文山&#xff0c;一个在CSDN分享笔记的博主。&#x1f4da;&#x1f4da; &#x1f31f;推荐给大家我的专栏《ELement》。&#x1f3af;&#x1f3af; &#x1…

Python:pyts库中的GramianAngularField

您想要使用pyts库中的GramianAngularField类&#xff0c;这是一个用于时间序列数据图像转换的工具。要使用这个类&#xff0c;首先确保您已经安装了pyts库。如果尚未安装&#xff0c;您可以使用以下命令来安装它&#xff1a; pip install pyts一旦安装完成&#xff0c;您可以通…

如何使用ArcGIS Pro将等高线转DEM

通常情况下&#xff0c;我们拿到的等高线数据一般都是CAD格式&#xff0c;如果要制作三维地形模型&#xff0c;使用栅格格式的DEM数据是更好的选择&#xff0c;这里就为大家介绍一下如何使用ArcGIS Pro将等高线转DEM&#xff0c;希望能对你有所帮助。 创建TIN 在工具箱中选择“…

C/C++大写字母的判断 2023年5月电子学会青少年软件编程(C/C++)等级考试一级真题答案解析

目录 C/C大写字母的判断 一、题目要求 1、编程实现 2、输入输出 二、解题思路 1、案例分析 三、程序代码 四、程序说明 五、运行结果 六、考点分析 C/C大写字母的判断 2023年5月 C/C编程等级考试一级编程题 一、题目要求 1、编程实现 输入一个字符&#xff0c;判…

数组01-二分查找算法

目录 数组如何实现随机访问 两个关键词 数组的特点 根据下标随机访问数组元素 为什么数组要从0开始编号&#xff0c;而不是从1开始 LeetCode之路——704. 二分查找 Code 二分查找算法 数组如何实现随机访问 数组&#xff08;Array&#xff09;是一种线性表数据结构。它…

【计算机网络】IP协议(上)

文章目录 TCP与 IP之间的关系IP地址的认识协议报头格式1. 报头和有效载荷如何分离&#xff1f;2. 8位协议3. 4位版本4. 8位服务类型5. 16位总长度6. 8位生存时间 TTL 网段划分IP地址的划分 子网划分CIDR的提出如何理解CIDR TCP与 IP之间的关系 如&#xff1a;假设 你上高中时&…

OpenCV项目开发实战--主成分分析(PCA)的特征脸应用(附C++/Python实现源码)

什么是主成分分析? 这是理解这篇文章的先决条件。 图 1:使用蓝线和绿线显示 2D 数据的主要组成部分(红点)。 快速回顾一下,我们了解到第一个主成分是数据中最大方差的方向。第二主成分是空间中与第一主成分垂直(正交)的最大方差方向,依此类推。第一和第二主成分红点(2…

Halcon File相关算子(一)

(1) list_files( : : Directory, Options : Files) 功能&#xff1a;返回给定的目录下的所有文件。 控制输入参数&#xff1a;Directory &#xff1a;文件路径目录&#xff1b; 控制输入参数&#xff1a;Options&#xff1a;可选项&#xff0c;默认为files&#xff1b; 控制…

Linux命令行操作:使用“more“命令进行分页显示

文章目录 1. 引言1.1 介绍Linux操作系统和命令行界面什么是Linux操作系统&#xff1f;为什么命令行界面在Linux中如此重要&#xff1f; 1.2 介绍Linux中的分页显示命令分页显示命令的作用与意义不同分页显示命令的比较 2. "more"命令的基本用法2.1 安装和启动"m…

Crypto:一眼就解密

题目 根据题目给出的信息可知&#xff0c;flag的为base64编码&#xff0c;数字后面的可以知道为base64编码&#xff0c;解码可得