Commit 0f95dfb6 by 前端

fixed

1 parent ef7a2781
/*
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-10-26 16:56:49
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2022-10-26 16:57:02
* @FilePath: \dj-data-view\src\bus.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import Vue from 'vue'
// export default new Vue()
const Bus = new Vue()
export default Bus
<!--
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-10-25 10:43:46
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2022-10-26 10:26:09
* @FilePath: \dj-data-view\src\components\barChart.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="line-box">
<div :id="domId" class="line-chart"></div>
<div :id="domId" class="line-chart" :style="{ height: boxHeight }"></div>
</div>
</template>
<script>
import datas from '@/utils/data'
import * as echarts from 'echarts'
import getLineOptions from './lineOptions'
import { getLineOptions } from './options'
export default {
name: 'LineChart',
name: 'lineChart',
props: {
domId: {
type: String,
default: 'line-chart'
},
revese: {
type: Boolean,
default: false
},
boxHeight: {
type: String,
default: '12.83vh'
},
storeOrBrandTxt: {
type: String,
default: '品牌'
......@@ -66,7 +82,7 @@ export default {
}
},
created() {
this.lineOptions = getLineOptions({ tooltipFormatter: this.tooltipFormatter })
this.lineOptions = getLineOptions()
},
mounted() {
this.lineDom = document.getElementById(this.domId)
......@@ -74,181 +90,21 @@ export default {
this.chartBindEvent()
},
methods: {
resetRankList() {
this.rankList = new Array(5).fill({ label: '- -', value: '- -' })
},
tooltipFormatter(obj) {
var currentItem = this.dataList[obj[0].dataIndex]
var txt = ''
txt = currentItem.statDate
this.tooltipFormatterObj.forEach(item => {
if (txt) {
txt = txt + '<br>'
}
txt = txt + item.label + ':' + currentItem[item.attrName] + (item.addSymbol || '')
})
return txt
},
chartBindEvent() {
// resize
window.addEventListener('resize', () => {
this[this.domId].resize()
})
// 鼠标划入
// this[this.domId].on('mouseover', data => {
// console.log(data,'data')
// this.moveAttr.dataIndex = data.dataIndex
// console.log(2222222222)
// this.getRankList(this.moveAttr.dataIndex, this.rankFlag + 'List')
// })
// 绑定点击事件
this[this.domId].getZr().on('mousemove', params => {
const pointInPixel = [params.offsetX, params.offsetY]
if (this[this.domId].containPixel('grid', pointInPixel)) {
this[this.domId].getZr().setCursorStyle('pointer')
var xIndex = this[this.domId].convertFromPixel({ seriesIndex: 0 }, [params.offsetX, params.offsetY])[0]
/* 事件处理代码书写位置 */
this.moveAttr.dataIndex = xIndex
this.getRankList(this.moveAttr.dataIndex, this.rankFlag + 'List')
}
})
this[this.domId].on('mouseout', params => {
var pointInPixel = [params.offsetX, params.offsetY]
if (!this[this.domId].containPixel('grid', pointInPixel)) {
this[this.domId].getZr().setCursorStyle('default')
}
})
// 移除图表
this[this.domId].on('globalout', () => {
this.chartAction()
this.moveAttr.dataIndex = this.dataList.length - 1
this.getRankList(this.moveAttr.dataIndex, this.rankFlag + 'List')
})
},
chartAction(type) {
this[this.domId].dispatchAction({
type: type || 'showTip',
seriesIndex: 0,
dataIndex: this.dataList.length - 1
})
},
getRankList(idx, attrName = 'topList') {
this.dataList[idx][attrName].length ? this.$set(this, 'rankList', this.dataList[idx][attrName]) : this.resetRankList()
},
drawLine() {
this.lineOptions.xAxis.data = []
this.dataList.map(e => {
let month = new Date(e.statDate).getMonth()
this.lineOptions.xAxis.data.push(this.queryType == 0 ? `${month == 0 ? '1月' : `${Number(month) + 1}月`}` : e.statDate.split('-').slice(1).join('-'))
})
var seriesDate = this.dataList.map(item => +item.num)
this.lineOptions.series[0].data = seriesDate
this.lineOptions.tooltip.textStyle.fontSize = this.setChartFontSize(10)
if (this.queryType == 0) {
this.lineOptions.yAxis.scale = true
} else {
this.lineOptions.yAxis.max = Math.ceil(Math.max(...seriesDate) / 10) * 10
this.lineOptions.yAxis.min = Math.floor((Math.min(...seriesDate) * 0.9) / 10) * 10
}
this[this.domId].setOption(this.lineOptions)
// 默认展示tooltip
this.chartAction()
this.moveAttr.dataIndex = this.dataList.length - 1
this.getRankList(this.moveAttr.dataIndex)
},
handleRankChange(value) {
this.rankFlag = value
this.moveAttr.dataIndex = this.dataList.length - 1
this.getRankList(this.moveAttr.dataIndex, this.rankFlag + 'List')
}
}
}
</script>
<style lang="scss" scoped>
p {
margin: 0 0;
}
.line-box {
height: 100%;
color: #ffffff;
// padding: 4px 8px;
font-size: 0.75em;
overflow: hidden;
.txt-orange {
color: #eb6001;
}
.line-chart {
width: 100%;
height: calc(100% - 3.1vh - 4.6vh);
}
.rank-box {
box-sizing: border-box;
display: flex;
height: 4.6vh;
padding: 0.5vh 0.87vh;
border-top: 1px solid #373739;
.rank-title-block {
// flex: 0 0 55px;
width: 100%;
overflow: hidden;
width: 55px;
.rank-title {
box-sizing: border-box;
width: 100%;
text-align: center;
// font-size: 0.6em;
font-size: 9px;
background: #353535;
padding: 0.2vh 5px;
height: 1.8vh;
opacity: 0.7;
cursor: pointer;
}
.rank-title-active {
opacity: 1;
width: 100%;
color: #ffffff;
background: #eb6001;
}
}
.rank-block {
width: calc(100% - 55px);
display: flex;
.rank-line {
box-sizing: border-box;
width: 20%;
padding: 0 6px;
border-left: 1px solid rgba(96, 98, 102, 0.4);
.line-item {
height: 1.8vh;
width: 100%;
font-size: 0.55vw;
padding-bottom: 0.3vh;
}
.line-item:last-of-type {
padding-bottom: 0;
}
}
.rank-line:first-of-type {
border-width: 0;
}
}
}
}
::v-deep.line-chart {
width: 100%;
height: 100%;
div {
&:nth-child(1) {
width: 100% !important;
height: 100% !important;
canvas {
width: 100% !important;
height: 100% !important;
}
}
}
}
</style>
<!--
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-10-26 10:22:41
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2022-10-26 10:28:12
* @FilePath: \dj-data-view\src\components\ViewChart.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="view-chart flex">
<div class="line-chart"></div>
<div class="line-chart">
<line-chart domId="sumChart" boxHeight="17.54vh"></line-chart>
</div>
<div class="pie-chart">
<Age></Age>
<Price></Price>
......
......@@ -2,17 +2,16 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-10-25 10:12:26
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2022-10-25 11:17:49
* @LastEditTime: 2022-10-25 16:28:06
* @FilePath: \dj-data-view\src\components\ViewSurface.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="surface box"></div>
<div class="surface box">
<line-bar domId="surfaceChart" boxHeight="19.5vh"></line-bar>
</div>
</template>
<script type="text/ecmascript-6">
import * as echarts from 'echarts'
export default {
name: 'ViewSurface',
......
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-10-25 10:43:46
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2022-10-25 15:05:23
* @LastEditTime: 2022-10-26 17:06:07
* @FilePath: \dj-data-view\src\components\barChart.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -14,7 +14,8 @@
<script>
import datas from '@/utils/data'
import * as echarts from 'echarts'
import { getBarOptions, getBarReverseOptions } from './barOptions'
import utils from '../utils/util'
import { getBarOptions, getBarReverseOptions } from './options'
export default {
name: 'barChart',
props: {
......@@ -22,13 +23,17 @@ export default {
type: String,
default: 'line-chart'
},
rotate: {
type: Number,
default: 0
},
revese: {
type: Boolean,
default: false
},
boxHeight: {
type: String,
default: '12.83vh'
default: '13.83vh'
},
storeOrBrandTxt: {
type: String,
......@@ -82,7 +87,11 @@ export default {
}
},
created() {
this.lineOptions = this.revese ? getBarReverseOptions() : getBarOptions()
const { rotate } = this
const obj = {
rotate
}
this.lineOptions = this.revese ? getBarReverseOptions() : getBarOptions(obj)
},
mounted() {
this.lineDom = document.getElementById(this.domId)
......@@ -92,6 +101,21 @@ export default {
methods: {
chartBindEvent() {
this[this.domId].setOption(this.lineOptions)
if (this.revese === false) return
this[this.domId].getZr().on(
'mousemove',
utils.debounce(params => {
console.log(params)
const pointInPixel = [params.offsetX, params.offsetY]
const pointInGrid = this[this.domId].convertFromPixel({ seriesIndex: 0 }, pointInPixel)
const yIndex = pointInGrid[1]
const op = this[this.domId].getOption()
const name = op.yAxis[0].data[yIndex]
console.log(name, yIndex)
this.$bus.$emit('drawChart', name)
}),
500
)
}
}
}
......
<!--
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-10-25 10:43:46
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2022-10-26 16:36:56
* @FilePath: \dj-data-view\src\components\barChart.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="line-box">
<div :id="domId" class="line-chart" :style="{ height: boxHeight }"></div>
</div>
</template>
<script>
import datas from '@/utils/data'
import * as echarts from 'echarts'
import { lineAndBarOptions } from './options'
export default {
name: 'lineBar',
props: {
domId: {
type: String,
default: 'line-chart'
},
revese: {
type: Boolean,
default: false
},
boxHeight: {
type: String,
default: '13.83vh'
},
storeOrBrandTxt: {
type: String,
default: '品牌'
},
dataList: {
type: Array,
default: () => []
},
// 0-月表;1-日表
queryType: {
type: Number,
default: 0
},
tooltipFormatterObj: {
type: Array,
default: () => {
return [
{
label: '数量',
attrName: 'num'
},
{
label: '环比',
attrName: 'hrate',
addSymbol: '%'
},
{
label: '同比',
attrName: 'trate',
addSymbol: '%'
}
]
}
}
},
data() {
return {
directionTimer: datas.DefaultData.directionTimer,
delayTimer: datas.DefaultData.delayTimer,
rankFlag: 'top',
lineOptions: [],
rankList: [],
echartsLine: '',
moveAttr: {
// speed: 900,
seriesIndex: 0,
dataIndex: 0
},
timer: null
}
},
created() {
this.lineOptions = lineAndBarOptions()
},
mounted() {
this.lineDom = document.getElementById(this.domId)
this[this.domId] = echarts.init(this.lineDom)
this.chartBindEvent()
},
methods: {
chartBindEvent() {
window.addEventListener('resize', () => {
this[this.domId].resize()
})
this[this.domId].setOption(this.lineOptions)
}
}
}
</script>
<style lang="scss" scoped>
.line-box {
height: 100%;
color: #ffffff;
.txt-orange {
color: #eb6001;
}
.line-chart {
width: 100%;
}
}
</style>
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-10-25 10:46:24
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2022-10-25 15:14:13
* @LastEditTime: 2022-10-26 13:48:15
* @FilePath: \dj-data-view\src\components\barOptions.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -11,9 +11,9 @@ function getBarOptions(obj) {
xAxis: {
type: 'category',
axisLabel: {
color: '#606266',
color: '#fff',
fontSize: '0.8em',
rotate: 30
rotate: obj.rotate
},
splitLine: {
show: false
......@@ -24,13 +24,13 @@ function getBarOptions(obj) {
axisLine: {
show: false
},
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
data: ['广汽本田', '广汽丰田', '一汽奥迪', '宝马', '奔驰', '其他']
},
grid: {
left: '3%',
left: '8%',
right: '6%',
top: '6%',
bottom: '0%',
top: '3%',
bottom: obj.rotate ? '4%' : '12%',
containLabel: true
},
yAxis: {
......@@ -56,7 +56,7 @@ function getBarOptions(obj) {
backgroundStyle: {
color: '#6578FF'
},
barWidth: '30%',
barWidth: '35%',
data: [120, 200, 150, 80, 70, 110, 130]
}
]
......@@ -130,4 +130,203 @@ function getBarReverseOptions(obj) {
}
return options
}
export { getBarReverseOptions, getBarOptions }
function getLineOptions() {
var options = {
tooltip: {
trigger: 'axis',
axisPointer: {
lineStyle: {
type: 'solid'
}
},
padding: 5,
borderWidth: 0,
backgroundColor: 'rgba(35, 45, 152, 1)',
borderRadius: 4,
textStyle: {
color: 'rgba(255,255,255,1)',
fontSize: 14
},
formatter: function (item) {
return `用户数:${item[0].value}`
}
},
xAxis: {
type: 'category',
axisLabel: {
color: '#fff',
fontSize: '0.8em'
},
splitLine: {
show: false
},
axisTick: {
show: false
},
axisLine: {
show: false
},
data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']
},
grid: {
left: '3%',
right: '6%',
top: '14%',
bottom: '3%',
containLabel: true
},
yAxis: {
nameGap: 30,
type: 'value',
splitLine: {
lineStyle: {
color: '#2F314F'
}
},
axisLabel: {
color: '#fff',
fontSize: '0.8em'
},
splitNumber: 4
},
series: [
{
type: 'line',
symbol: 'circle',
itemStyle: {
color: '#F5AA01'
},
// 平滑曲线
smooth: true,
showSymbol: false,
// 折线背景色
areaStyle: {
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: 'rgba(254, 84, 0, 0.3)'
},
{
offset: 1,
color: 'rgba(254, 84, 0, 0.01)'
}
]
}
},
data: [666, 200, 150, 80, 70, 110, 130, 554, 3, 44, 33, 5, 666]
}
]
}
return options
}
function lineAndBarOptions() {
var options = {
tooltip: {
trigger: 'axis',
axisPointer: {
lineStyle: {
type: 'solid'
}
},
padding: 5,
borderWidth: 0,
backgroundColor: 'rgba(35, 45, 152, 1)',
borderRadius: 4,
textStyle: {
color: 'rgba(255,255,255,1)',
fontSize: 14
},
formatter: function (item) {
return `门店数:${item[0].value}<br>新增数:${item[1].value}`
}
},
xAxis: {
type: 'category',
axisLabel: {
color: '#fff',
fontSize: '0.8em'
},
splitLine: {
show: false
},
axisTick: {
show: false
},
axisLine: {
show: false
},
data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']
},
grid: {
left: '3%',
right: '6%',
top: '6%',
bottom: '0%',
containLabel: true
},
yAxis: {
nameGap: 30,
type: 'value',
splitLine: {
lineStyle: {
color: '#2F314F'
}
},
axisLabel: {
color: '#fff',
fontSize: '0.8em'
},
splitNumber: 4
},
series: [
{
type: 'bar',
symbol: 'circle',
backgroundStyle: {
color: '#6578FF'
},
barWidth: '30%',
data: [120, 200, 150, 80, 70, 110, 130, 5, 6, 98, 4, 3, 5, 555]
},
{
type: 'line',
symbol: 'circle',
itemStyle: {
color: '#F5AA01'
},
// 平滑曲线
smooth: true,
showSymbol: false,
// 折线背景色
areaStyle: {
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: 'rgba(254, 84, 0, 0.3)'
},
{
offset: 1,
color: 'rgba(254, 84, 0, 0.01)'
}
]
}
},
data: [666, 200, 150, 80, 70, 110, 130, 554, 3, 44, 33, 5, 666]
}
]
}
return options
}
export { getBarReverseOptions, getBarOptions, lineAndBarOptions, getLineOptions }
......@@ -3,8 +3,8 @@
* @version:
* @Author: limin
* @Date: 2021-06-07 14:12:32
* @LastEditors: limin
* @LastEditTime: 2021-06-29 15:35:47
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2022-10-26 16:57:27
*/
// 兼容 IE
// https://github.com/zloirock/core-js/blob/master/docs/2019-03-19-core-js-3-babel-and-a-look-into-the-future.md#babelpolyfill
......@@ -21,6 +21,8 @@ import '@/assets/css/index.scss'
import './utils/util'
import 'components'
import * as echarts from 'echarts'
import Bus from '../src/bus' //这是我的路径,正确引用你们的路径
Vue.prototype.$bus = Bus
Vue.prototype.$echarts = echarts
Vue.prototype.to = function (name, params) {
......@@ -34,7 +36,7 @@ Vue.prototype.to = function (name, params) {
// import 'lib-flexible/flexible.js'
Vue.config.productionTip = false
const isMock = ['prod','production'].includes(process.env.NODE_ENV)
const isMock = ['prod', 'production'].includes(process.env.NODE_ENV)
fetchConfig(!isMock).then(res => {
// 从配置服务器获取动态配置
// 设置 js中可以访问 $cdn
......
<!--
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-10-25 10:12:26
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2022-10-25 15:36:41
* @FilePath: \dj-data-view\src\views\customer\area.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div>
......@@ -20,7 +28,7 @@ export default {
data() {
return {
chart: {
id: 'area',
id: 'area'
}
}
}
......
<!--
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-10-25 10:12:26
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2022-10-26 14:25:05
* @FilePath: \dj-data-view\src\views\saas\project.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="project-wrap flex">
<div class="project-item flex" v-for="(item, index) in 4" :key="index">
<div class="project-left">
<div class="project-title">新车洽谈</div>
<div class="project-icon"><img src="@/assets/images/arrow.png" alt="" /></div>
</div>
<div class="project-right flex">
<div class="project-content-item">
<div class="project-content-desc">累计展业门店数</div>
<div class="project-content-num">2,173</div>
</div>
<div class="project-content-item">
<div class="project-content-desc">当前新增</div>
<div class="project-content-num">2,173</div>
</div>
<div class="project-content-item">
<div class="project-content-desc">转化率</div>
<div class="project-content-num">2,173</div>
</div>
<div class="project-content-item">
<div class="project-content-desc">客单价</div>
<div class="project-content-num">2,173</div>
</div>
<div class="project-content-item">
<div class="project-content-desc">产值</div>
<div class="project-content-num">2,173</div>
</div>
</div>
</div>
</div>
</template>
......@@ -10,21 +45,68 @@ import datas from '../../utils/data'
export default {
name: 'Project',
data() {
return {
}
return {}
},
mounted() {},
methods: {
}
methods: {}
}
</script>
<style lang="scss" scoped>
.project-wrap{
height:11.71vh;
.project-wrap {
height: 11.71vh;
flex-wrap: wrap;
justify-content: space-between;
.project-item {
width: 49.6%;
background: #0b0e31;
.project-left {
width: 2vw;
height: 5.61vh;
background: #2436b7;
text-align: center;
.project-title {
color: #e8e8e8;
font-size: 10px;
line-height: 12px;
margin-top: 0.4vh;
}
.project-icon {
width: 1.25vw;
height: 1.22vh;
margin: 0 auto;
}
}
.project-right {
flex: 1;
.project-content-item {
&:first-child {
width: 28%;
}
&:nth-child(2) {
width: 18%;
}
&:nth-child(3) {
width: 18%;
}
&:nth-child(4) {
width: 18%;
}
&:nth-child(5) {
width: 18%;
}
padding-left: 0.5vw;
.project-content-desc {
font-size: 9px;
color: #dddddd;
}
.project-content-num {
font-weight: 700;
font-size: 12px;
color: #ffffff;
}
}
}
}
}
</style>
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-10-25 10:12:26
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2022-10-25 13:49:20
* @LastEditTime: 2022-10-26 16:58:27
* @FilePath: \dj-data-view\src\views\user\area.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -19,11 +19,15 @@
</template>
<script>
import '../../components'
export default {
name: 'Area',
data() {
return {}
},
mounted() {
this.$bus.$on('drawChart', data => {
console.log(data)
})
}
}
</script>
......
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-10-25 10:12:26
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2022-10-25 13:43:57
* @LastEditTime: 2022-10-26 16:58:18
* @FilePath: \dj-data-view\src\views\user\brand.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -13,16 +13,20 @@
<span>品牌分布</span>
</div>
<div class="container">
<bar-chart domId="brandChart"></bar-chart>
<bar-chart domId="brandChart" :rotate="30"></bar-chart>
</div>
</div>
</template>
<script>
import '../../components'
export default {
name: 'Brand',
data() {
return {}
},
mounted() {
this.$bus.$on('drawChart', data => {
console.log(data)
})
}
}
</script>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!