vue 使用echarts

本文将介绍如何在Vue项目中集成并使用ECharts库,包括安装过程、基本配置、数据绑定以及事件监听等关键步骤,帮助开发者实现交互式的数据可视化。
摘要由CSDN通过智能技术生成


需要echarts 相关插件 :<script src="http://echarts.baidu.com/gallery/vendors/echarts/echarts.min.js"></script>

html相关代码:

<!--仪表板展示-->

<section class="col-md-12" style="margin-top: 60px;">

<el-col :span="18">

<section class="col-md-6" style="padding:0 5px;">

<el-col :span="24" style="border:1px solid #eee;">

<el-col :span="24" class="fxtital">

<span>本年目标客户数 - 分销一组</span>

</el-col>

<el-col :span="24" style="padding-left:20px;">

<el-col :span="10" style="margin-top: 30px;">

<el-col :span="24">

<el-col :span="24">目标值</el-col>

<el-col :span="24" class="fxinfo">{
  {dashboardStatis.dashboard1.target}}</el-col>

</el-col>

<el-col :span="24">

<el-col :span="24">已完成</el-col>

<el-col :span="24" class="fxinfo" style="color: #8e74f1;">{
  {dashboardStatis.dashboard1.accomplish}}</el-col>

</el-col>

</el-col>

<el-col :span="14">

<div id="mychart1" class="echare1" style="border:none;height:333px;"></div>

</el-col>

</el-col>

</el-col>

</section>

<section class="col-md-6" style="padding:0 5px;">

<el-col :span="24" style="border:1px solid #eee;">

<el-col :span="24" class="fxtital">

<span>本年目标销售额 - 分销一组</span>

</el-col>

<el-col :span="24" style="padding-left:20px;">

<el-col :span="10" style="margin-top: 30px;">

<el-col :span="24">

<el-col :span="24">目标值</el-col>

<el-col :span="24" class="fxinfo">{
  {dashboardStatis.dashboard2.target}}</el-col>

</el-col>

<el-col :span="24">

<el-col :span="24">已完成</el-col>

<el-col :span="24" class="fxinfo" style="color: #8e74f1;">{
  {dashboardStatis.dashboard2.accomplish}}</el-col>

</el-col>

</el-col>

<el-col :span="14">

<div id="fxdashboard2" class="echare1" style="border:none;height:333px;"></div>

</el-col>

</el-col>

</el-col>

</section>

</el-col>

<el-col :span="6">

<section class="col-md-12" style="padding:0 5px;">

<el-col class="echare1">

<el-col :span="24" class="fxtital" style="margin-bottom: 10px;">

<span>今日工作提醒</span>

</el-col>

<el-card class="box-card" style="background: #8e75f1;margin-top:10px;">

<div class="text item" style="color:#fff;">

<el-col :span="24" class="cardtitle">你今日跟进记录</el-col>

<el-col :span="24" style="margin-bottom:20px;">

<el-col :span="16" class="cardlist">{
  {dashboardStatis.statistics.record?dashboardStatis.statistics.record:0}}条</el-col>

<el-col :span="8" style="margin-top: 9px;">

<a v-bind:href="[followurl]" class="carda">查看详情</a>

</el-col>

</el-col>

</div>

</el-card>

<el-card class="box-card" style="background: #67c23a;">

<div class="text item" style="color:#fff;">

<el-col :span="24" class="cardtitle">你今日新增客户</el-col>

<el-col :span="24" style="margin-bottom:20px;">

<el-col :span="16" class="cardlist">{
  {dashboardStatis.statistics.client?dashboardStatis.statistics.client:0}}个</el-col>

<el-col :span="8" style="margin-top: 9px;">

<a v-bind:href="[enterpriseurl]" class="carda">查看详情</a>

</el-col>

</el-col>

</div>

</el-card>

<el-card class="box-card" style="background: #f17575;">

<div class="text item" style="color:#fff;">

<el-col :span="24" class="cardtitle">你今日回访计划</el-col>

<el-col :span="24" style="margin-bottom:20px;">

<el-col :span="16" class="cardlist">{
  {dashboardStatis.statistics.visit?dashboardStatis.statistics.visit:0}}个</el-col>

<el-col :span="8" style="margin-top: 9px;">

<a v-bind:href="[returnVisit]" class="carda">查看详情</a>

</el-col>

</el-col>

</div>

</el-card>

</el-col>

</section>

</el-col>

</section>

<!--销售数据分析-->

<section class="col-md-12" style="margin-top: 20px;">

<el-col :span="24" style="border:1px solid #eee;padding-bottom: 10px;">

<el-col :span="24" class="fxtital">

<span style="padding-left:30px;color:#fff;">销售数据分析</span>

<el-form :model="form" label-width="100px" class="demo-ruleForm" style="float:right;margin-right:40px;height: 35px;color:#fff;">

<el-form-item label="品牌:" prop="typeId">

<el-select v-model="select.brand" placeholder="请选择" clearable @change="changebrand">

<el-option v-for="item in crmbrand" :label="item.typename" :value="item.typename" style="width:120px;"></el-option>

</el-select>

</el-form-item>

</el-form>

</el-col>

<el-col :span="12">

<el-col :span="24" class="shape">我的月销售额{
  {select.fxmonth}}月</el-col>

<el-col :span="24" style="margin-top:15px;">

<el-col :span="8">

<el-card class="box-card cardmonth">

<div class="text item">

<el-col :span="24" class="cardlist" style="color: #409eff;">{
  {section.month.target?section.month.target:'0'}}万</el-col>

<el-col :span="24" class="carddetail">月目标销售额</el-col>

</div>

</el-card>

</el-col>

<el-col :span="8">

<el-card class="box-card cardmonth">

<div class="text item">

<el-col :span="24" class="cardlist" style="color: #d48164;">{
  {section.month.accomplish?section.month.accomplish:'0'}}万</el-col>

<el-col :span="24" class="carddetail">月完成销售额</el-col>

</div>

</el-card>

</el-col>

<el-col :span="8">

<el-card class="box-card cardmonth">

<div class="text item">

<el-col :span="24" class="cardlist" style="color: #8e74f1;">{
  {section.month.finishingRate?section
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值