You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
77 lines
1.9 KiB
77 lines
1.9 KiB
<!--
|
|
* @Author: xw
|
|
* @Date: 2021-10-12 09:03:51
|
|
* @LastEditTime: 2021-11-01 09:58:03
|
|
* @LastEditors: Please set LastEditors
|
|
* @Description: 品牌TOP车型
|
|
* @FilePath: /data-show/src/views/BrandInsight/brandTop/index.vue
|
|
-->
|
|
<template>
|
|
<div class="bt-outter" v-see v-loading="load">
|
|
<v-label-div title="品牌TOP车型"></v-label-div>
|
|
<div class="bt-inner">
|
|
<v-echarts :opt="opt" @getData="clickEchars"></v-echarts>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import {getCartypeTop10} from "@/api/BrandInsight"
|
|
import createOpt from "./opt"
|
|
export default {
|
|
name: "brand-top",
|
|
props: ["brand"],
|
|
data() {
|
|
return {
|
|
load: false,
|
|
form: {
|
|
token: "",
|
|
sBrand: '奥迪',
|
|
},
|
|
opt: {},
|
|
}
|
|
},
|
|
created() {
|
|
this.form.token = this.getToken;
|
|
this.form.sBrand = this.getBrand.brandname || this.brand;
|
|
this.getData()
|
|
},
|
|
methods: {
|
|
getData() {
|
|
this.load = true;
|
|
let obj = Object.assign({},this.getCtime2, this.form);
|
|
getCartypeTop10(obj).then(res => {
|
|
let data = res.data || {};
|
|
let dx = [];
|
|
let ds = [];
|
|
for(let key in data) {
|
|
dx.push(key);
|
|
ds.push(data[key])
|
|
}
|
|
this.opt = createOpt(dx,ds);
|
|
this.load = false;
|
|
})
|
|
},
|
|
clickEchars(data) {
|
|
let ele = data;
|
|
let model = ele.axisValueLabel;
|
|
this.setModel({name: model});
|
|
this.$router.push("/modelInsight");
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="less" scoped>
|
|
.bt-outter {
|
|
width: 620px;
|
|
height: 272px;
|
|
border: 2px solid #0f2a4d;
|
|
margin-top: 16px;
|
|
.bt-inner {
|
|
width: 100%;
|
|
height: calc(100% - 48px);
|
|
}
|
|
}
|
|
</style>
|