张雄 3 years ago
parent 2f2979d940
commit d2b5a837f5

@ -91,7 +91,7 @@ export function getCheZhuCarSpecidChart(params) {
})
}
// 按级别-汽车级别销售排行榜-各级别/更多
// 按级别-汽车级别销售排行榜-各级别/更多 价格/能源
export function getCheZhuCarCategory(params) {
let obj = Object.assign({action: 'getCheZhuCarCategory', sType: 'Marketing'}, params)
return httpService({

@ -208,7 +208,7 @@ const router = [
path: 'citySale', //城市销量
component: resolve => require(['@/views/SaleRank/CitySale'], resolve),
},
////
////级别,价格,能源
{
path: 'aLevel', //所有级别
component: resolve => require(['@/views/SaleRank/AllLevel/index.vue'], resolve),
@ -225,7 +225,75 @@ const router = [
path: 'level1', //微型车
component: resolve => require(['@/views/SaleRank/AllLevel/wxCar/index.vue'], resolve),
},
////
{
path: 'level2', //小型车
component: resolve => require(['@/views/SaleRank/AllLevel/xxCar/index.vue'], resolve),
},
{
path: 'level3', //紧凑型车
component: resolve => require(['@/views/SaleRank/AllLevel/jcCar/index.vue'], resolve),
},
{
path: 'level4', //中型车
component: resolve => require(['@/views/SaleRank/AllLevel/zxCar/index.vue'], resolve),
},
{
path: 'level5', //中大型车
component: resolve => require(['@/views/SaleRank/AllLevel/zdxCar/index.vue'], resolve),
},
{
path: 'level6', //MPV
component: resolve => require(['@/views/SaleRank/AllLevel/MPVCar/index.vue'], resolve),
},
{
path: 'level7', //SUV
component: resolve => require(['@/views/SaleRank/AllLevel/SUVCar/index.vue'], resolve),
},
{
path: 'price1', //10w以内
component: resolve => require(['@/views/SaleRank/AllPrice/Price10/index.vue'], resolve),
},
{
path: 'price2', //10-15
component: resolve => require(['@/views/SaleRank/AllPrice/Price1015/index.vue'], resolve),
},
{
path: 'price3', //15-25
component: resolve => require(['@/views/SaleRank/AllPrice/Price1525/index.vue'], resolve),
},
{
path: 'price4', //25-35
component: resolve => require(['@/views/SaleRank/AllPrice/Price2535/index.vue'], resolve),
},
{
path: 'price5', //35-50
component: resolve => require(['@/views/SaleRank/AllPrice/Price3550/index.vue'], resolve),
},
{
path: 'price6', //50+
component: resolve => require(['@/views/SaleRank/AllPrice/Price50/index.vue'], resolve),
},
{
path: 'energy1', //汽油
component: resolve => require(['@/views/SaleRank/AllEnergy/EnergyQY/index.vue'], resolve),
},
{
path: 'energy2', //柴油
component: resolve => require(['@/views/SaleRank/AllEnergy/EnergyCY/index.vue'], resolve),
},
{
path: 'energy3', //混动
component: resolve => require(['@/views/SaleRank/AllEnergy/EnergyYDH/index.vue'], resolve),
},
{
path: 'energy4', //新能源
component: resolve => require(['@/views/SaleRank/AllEnergy/EnergyNE/index.vue'], resolve),
},
{
path: 'energy5', //轻混
component: resolve => require(['@/views/SaleRank/AllEnergy/EnergyQH/index.vue'], resolve),
},
////////////////////
{
path: 'brandInfo', //汽车品牌销量-销量
component: resolve => require(['@/views/SaleRank/BrandInfo/index.vue'], resolve),

@ -0,0 +1,202 @@
<template>
<div class="ecy-outter" v-loading="load">
<v-label-div :title="time+'('+form.sStartTime+'至'+form.sEndTime+')'">
<v-btn @click="onTable"></v-btn>
<v-btn @click="goBack"></v-btn>
</v-label-div>
<div class="d2">
<a-range-picker style="width: 360px" v-model="selTime" :disabled-date="disabledDate" valueFormat="YYYY-MM-DD">
<a-icon slot="suffixIcon" type="calendar" />
</a-range-picker>
<a-button @click="onSearch" style="margin-left: 40px" type="primary">查询</a-button>
</div>
<div class="d3">
<v-table ref="rtable" :columns="columns" :data="tbData" :pagination="pagination" :loading="tableLoading">
<template slot="about" slot-scope="text, record">
<a-button type="primary" @click="onSale(record)"></a-button>
</template>
</v-table>
</div>
<a-modal title="柴油车销量排行榜趋势图(单位:辆)" width="1200px" :footer="null" @cancel="onClose" :visible="visible">
<div class="modal-table">
<a-range-picker style="width: 360px" v-model="selTime" :disabled-date="disabledDate" valueFormat="YYYY-MM-DD">
<a-icon slot="suffixIcon" type="calendar" />
</a-range-picker>
<a-button @click="onSearch" type="primary" style="margin-left: 40px">查询</a-button>
<div class="tb-inner">
<v-echarts :opt="opt"></v-echarts>
</div>
</div>
</a-modal>
</div>
</template>
<script>
import {getCheZhuCarCategory} from "@/api/SaleRank"
import {getCheZhuCountTime} from "@/api/SaleRank"
import {getBrandName} from "@/api/comm"
import createOpt from "./opt"
import moment from "moment";
export default {
name: 'EnergyCY',
data() {
return {
load: false,
time: '柴油车销量排行榜',
selTime: [],
form: {
token: '',
sStartTime: '',
sEndTime: '',
sTimeType: 4,
sEnergyType: 2
},
opt: {},
//
pagination: {
pageSize: 20,
},
tbData: [],
tableLoading: false,
columns: [
{
title: "排名",
dataIndex: "id",
key: "id",
width: 120
},
{
title: "车型",
dataIndex: "seriesname",
key: "seriesname",
},
{
title: "能源类型",
dataIndex: "energys",
key: "energys",
},
{
title: "销量",
dataIndex: "salescount",
key: "salescount",
},
{
title: "售价(万元)",
dataIndex: "price",
key: "price",
},
{
title: "车型相关",
dataIndex: "about",
key: "about",
scopedSlots: { customRender: "about" },
},
],
//
visible: false,
}
},
created() {
this.form.token = this.getToken
this.getData();
},
methods: {
getData() {
this.load = true;
let o = {token: this.getToken};
getCheZhuCountTime(o).then(res => {
let data = res.data;
this.form.sStartTime = data.Data[0].Time;
this.form.sEndTime = data.Data[data.Data.length-1].Time;
let obj = {
token: this.getToken,
sTimeType: 4,
sStartTime: this.form.sStartTime + '-01',
sEndTime: this.form.sEndTime + '-01',
sEnergyType: 2
}
getCheZhuCarCategory(obj).then(res => {
let data = res.data;
this.tbData = data;
let dx = [];
let ds = [];
data.forEach(ele => {
dx.push(ele.seriesname);
ds.push(ele.salescount);
})
this.opt = createOpt(dx,ds);
});
this.load = false
});
},
//
onSearch() {
this.form.sStartTime = this.selTime[0];
this.form.sEndTime = this.selTime[1];
let obj = Object.assign({},this.form);
getCheZhuCarCategory(obj).then(res => {
let data = res.data;
this.tbData = data;
let dx = [];
let ds = [];
data.forEach(ele => {
dx.push(ele.seriesname);
ds.push(ele.salescount);
})
this.opt = createOpt(dx,ds);
})
},
//
onTable() {
this.visible = true;
},
onClose() {
this.visible = false;
},
//
goBack() {
this.$router.go(-1);
},
disabledDate(current) {
return current > moment();
},
//
onSale(value) {
let seriesname = value.seriesname;
getBrandName({token: this.getToken, sSeriesName:seriesname}).then(res => {
let brandName = res.data;
this.$router.push(
{
path: '/saleRank/seriesInfo',
query: {
sBrand: brandName,
sSeriesName: seriesname
}
}
);
})
}
}
}
</script>
<style lang="less">
.ecy-outter {
width: 1552px;
border: 2px solid #0f2a4d;
.d2 {
display: flex;
justify-content: flex-start;
padding: 16px;
}
}
.modal-table {
width: 1200px;
height: 460px;
.tb-inner {
width: 100%;
height: calc(100% - 48px);
margin-top: 24px;
}
}
</style>

@ -0,0 +1,111 @@
/*
* @Author: your name
* @Date: 2021-10-12 09:12:13
* @LastEditTime: 2021-11-02 18:03:08
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/BrandInsight/brandTop/opt.js
*/
import * as echarts from "echarts";
import { bigNumberTransform } from "@/utils/gol/dataTool"
export default function createOpt(dx,ds) {
return {
grid: {
top: "16px",
left: "16px",
right: "28px",
bottom: "16px",
containLabel: true,
},
tooltip: {
trigger: "axis",
backgroundColor: "#08182F",
color: "#fff",
borderColor: "#3373CC",
textStyle: {
color: "#fff", //设置文字颜色
},
extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;",
formatter: function (params) {
var result = "";
var dotHtml =
'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:#1197b8"></span>';
params.forEach(function (item) {
result += item.axisValue + "</br>" + dotHtml + item.data;
});
return result;
},
},
xAxis: {
type: "category",
axisTick: {
show: false,
},
axisLine: {
show: false,
lineStyle: {
color: "#fff",
},
},
data: dx,
},
yAxis: {
type: "value",
axisLine: {
show: false,
lineStyle: {
color: "#FFF",
},
},
axisLabel: {
formatter: (value) => {
let str = bigNumberTransform(value);
return str;
}
},
splitLine: {
lineStyle: {
type: "dashed", // y轴分割线类型
color: "#012b4b",
},
},
},
series: [
{
name: "2001",
data: ds,
type: "bar",
barWidth: 24,
itemStyle: {
normal: {
label: {
show: true, //开启显示
position: 'top', //在上方显示
textStyle: { //数值样式
color: '#fff',
fontSize: 14
}
},
color: new echarts.graphic.LinearGradient(
0,
1,
0,
0,
[
{
offset: 0,
color: "rgba(91, 157, 249, 0)", // 0% 处的颜色
},
{
offset: 1,
color: "#3373CC", // 100% 处的颜色#3373CC
},
],
false
),
},
},
},
],
}
}

@ -0,0 +1,202 @@
<template>
<div class="ne-outter" v-loading="load">
<v-label-div :title="time+'('+form.sStartTime+'至'+form.sEndTime+')'">
<v-btn @click="onTable"></v-btn>
<v-btn @click="goBack"></v-btn>
</v-label-div>
<div class="d2">
<a-range-picker style="width: 360px" v-model="selTime" :disabled-date="disabledDate" valueFormat="YYYY-MM-DD">
<a-icon slot="suffixIcon" type="calendar" />
</a-range-picker>
<a-button @click="onSearch" style="margin-left: 40px" type="primary">查询</a-button>
</div>
<div class="d3">
<v-table ref="rtable" :columns="columns" :data="tbData" :pagination="pagination" :loading="tableLoading">
<template slot="about" slot-scope="text, record">
<a-button type="primary" @click="onSale(record)"></a-button>
</template>
</v-table>
</div>
<a-modal title="新能源车排行榜趋势图(单位:辆)" width="1200px" :footer="null" @cancel="onClose" :visible="visible">
<div class="modal-table">
<a-range-picker style="width: 360px" v-model="selTime" :disabled-date="disabledDate" valueFormat="YYYY-MM-DD">
<a-icon slot="suffixIcon" type="calendar" />
</a-range-picker>
<a-button @click="onSearch" type="primary" style="margin-left: 40px">查询</a-button>
<div class="tb-inner">
<v-echarts :opt="opt"></v-echarts>
</div>
</div>
</a-modal>
</div>
</template>
<script>
import {getCheZhuCarCategory} from "@/api/SaleRank"
import {getCheZhuCountTime} from "@/api/SaleRank"
import {getBrandName} from "@/api/comm"
import createOpt from "./opt"
import moment from "moment";
export default {
name: 'EnergyNE',
data() {
return {
load: false,
time: '新能源车销量排行榜',
selTime: [],
form: {
token: '',
sStartTime: '',
sEndTime: '',
sTimeType: 4,
sEnergyType: 4
},
opt: {},
//
pagination: {
pageSize: 20,
},
tbData: [],
tableLoading: false,
columns: [
{
title: "排名",
dataIndex: "id",
key: "id",
width: 120
},
{
title: "车型",
dataIndex: "seriesname",
key: "seriesname",
},
{
title: "能源类型",
dataIndex: "energys",
key: "energys",
},
{
title: "销量",
dataIndex: "salescount",
key: "salescount",
},
{
title: "售价(万元)",
dataIndex: "price",
key: "price",
},
{
title: "车型相关",
dataIndex: "about",
key: "about",
scopedSlots: { customRender: "about" },
},
],
//
visible: false,
}
},
created() {
this.form.token = this.getToken
this.getData();
},
methods: {
getData() {
this.load = true;
let o = {token: this.getToken};
getCheZhuCountTime(o).then(res => {
let data = res.data;
this.form.sStartTime = data.Data[0].Time;
this.form.sEndTime = data.Data[data.Data.length-1].Time;
let obj = {
token: this.getToken,
sTimeType: 4,
sStartTime: this.form.sStartTime + '-01',
sEndTime: this.form.sEndTime + '-01',
sEnergyType: 4
}
getCheZhuCarCategory(obj).then(res => {
let data = res.data;
this.tbData = data;
let dx = [];
let ds = [];
data.forEach(ele => {
dx.push(ele.seriesname);
ds.push(ele.salescount);
})
this.opt = createOpt(dx,ds);
});
this.load = false
});
},
//
onSearch() {
this.form.sStartTime = this.selTime[0];
this.form.sEndTime = this.selTime[1];
let obj = Object.assign({},this.form);
getCheZhuCarCategory(obj).then(res => {
let data = res.data;
this.tbData = data;
let dx = [];
let ds = [];
data.forEach(ele => {
dx.push(ele.seriesname);
ds.push(ele.salescount);
})
this.opt = createOpt(dx,ds);
})
},
//
onTable() {
this.visible = true;
},
onClose() {
this.visible = false;
},
//
goBack() {
this.$router.go(-1);
},
disabledDate(current) {
return current > moment();
},
//
onSale(value) {
let seriesname = value.seriesname;
getBrandName({token: this.getToken, sSeriesName:seriesname}).then(res => {
let brandName = res.data;
this.$router.push(
{
path: '/saleRank/seriesInfo',
query: {
sBrand: brandName,
sSeriesName: seriesname
}
}
);
})
}
}
}
</script>
<style lang="less">
.ne-outter {
width: 1552px;
border: 2px solid #0f2a4d;
.d2 {
display: flex;
justify-content: flex-start;
padding: 16px;
}
}
.modal-table {
width: 1200px;
height: 460px;
.tb-inner {
width: 100%;
height: calc(100% - 48px);
margin-top: 24px;
}
}
</style>

@ -0,0 +1,111 @@
/*
* @Author: your name
* @Date: 2021-10-12 09:12:13
* @LastEditTime: 2021-11-02 18:03:08
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/BrandInsight/brandTop/opt.js
*/
import * as echarts from "echarts";
import { bigNumberTransform } from "@/utils/gol/dataTool"
export default function createOpt(dx,ds) {
return {
grid: {
top: "16px",
left: "16px",
right: "28px",
bottom: "16px",
containLabel: true,
},
tooltip: {
trigger: "axis",
backgroundColor: "#08182F",
color: "#fff",
borderColor: "#3373CC",
textStyle: {
color: "#fff", //设置文字颜色
},
extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;",
formatter: function (params) {
var result = "";
var dotHtml =
'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:#1197b8"></span>';
params.forEach(function (item) {
result += item.axisValue + "</br>" + dotHtml + item.data;
});
return result;
},
},
xAxis: {
type: "category",
axisTick: {
show: false,
},
axisLine: {
show: false,
lineStyle: {
color: "#fff",
},
},
data: dx,
},
yAxis: {
type: "value",
axisLine: {
show: false,
lineStyle: {
color: "#FFF",
},
},
axisLabel: {
formatter: (value) => {
let str = bigNumberTransform(value);
return str;
}
},
splitLine: {
lineStyle: {
type: "dashed", // y轴分割线类型
color: "#012b4b",
},
},
},
series: [
{
name: "2001",
data: ds,
type: "bar",
barWidth: 24,
itemStyle: {
normal: {
label: {
show: true, //开启显示
position: 'top', //在上方显示
textStyle: { //数值样式
color: '#fff',
fontSize: 14
}
},
color: new echarts.graphic.LinearGradient(
0,
1,
0,
0,
[
{
offset: 0,
color: "rgba(91, 157, 249, 0)", // 0% 处的颜色
},
{
offset: 1,
color: "#3373CC", // 100% 处的颜色#3373CC
},
],
false
),
},
},
},
],
}
}

@ -0,0 +1,202 @@
<template>
<div class="qh-outter" v-loading="load">
<v-label-div :title="time+'('+form.sStartTime+'至'+form.sEndTime+')'">
<v-btn @click="onTable"></v-btn>
<v-btn @click="goBack"></v-btn>
</v-label-div>
<div class="d2">
<a-range-picker style="width: 360px" v-model="selTime" :disabled-date="disabledDate" valueFormat="YYYY-MM-DD">
<a-icon slot="suffixIcon" type="calendar" />
</a-range-picker>
<a-button @click="onSearch" style="margin-left: 40px" type="primary">查询</a-button>
</div>
<div class="d3">
<v-table ref="rtable" :columns="columns" :data="tbData" :pagination="pagination" :loading="tableLoading">
<template slot="about" slot-scope="text, record">
<a-button type="primary" @click="onSale(record)"></a-button>
</template>
</v-table>
</div>
<a-modal title="轻混系统排行榜趋势图(单位:辆)" width="1200px" :footer="null" @cancel="onClose" :visible="visible">
<div class="modal-table">
<a-range-picker style="width: 360px" v-model="selTime" :disabled-date="disabledDate" valueFormat="YYYY-MM-DD">
<a-icon slot="suffixIcon" type="calendar" />
</a-range-picker>
<a-button @click="onSearch" type="primary" style="margin-left: 40px">查询</a-button>
<div class="tb-inner">
<v-echarts :opt="opt"></v-echarts>
</div>
</div>
</a-modal>
</div>
</template>
<script>
import {getCheZhuCarCategory} from "@/api/SaleRank"
import {getCheZhuCountTime} from "@/api/SaleRank"
import {getBrandName} from "@/api/comm"
import createOpt from "./opt"
import moment from "moment";
export default {
name: 'EnergyNE',
data() {
return {
load: false,
time: '轻混系统销量排行榜',
selTime: [],
form: {
token: '',
sStartTime: '',
sEndTime: '',
sTimeType: 4,
sEnergyType: 5
},
opt: {},
//
pagination: {
pageSize: 20,
},
tbData: [],
tableLoading: false,
columns: [
{
title: "排名",
dataIndex: "id",
key: "id",
width: 120
},
{
title: "车型",
dataIndex: "seriesname",
key: "seriesname",
},
{
title: "能源类型",
dataIndex: "energys",
key: "energys",
},
{
title: "销量",
dataIndex: "salescount",
key: "salescount",
},
{
title: "售价(万元)",
dataIndex: "price",
key: "price",
},
{
title: "车型相关",
dataIndex: "about",
key: "about",
scopedSlots: { customRender: "about" },
},
],
//
visible: false,
}
},
created() {
this.form.token = this.getToken
this.getData();
},
methods: {
getData() {
this.load = true;
let o = {token: this.getToken};
getCheZhuCountTime(o).then(res => {
let data = res.data;
this.form.sStartTime = data.Data[0].Time;
this.form.sEndTime = data.Data[data.Data.length-1].Time;
let obj = {
token: this.getToken,
sTimeType: 4,
sStartTime: this.form.sStartTime + '-01',
sEndTime: this.form.sEndTime + '-01',
sEnergyType: 5
}
getCheZhuCarCategory(obj).then(res => {
let data = res.data;
this.tbData = data;
let dx = [];
let ds = [];
data.forEach(ele => {
dx.push(ele.seriesname);
ds.push(ele.salescount);
})
this.opt = createOpt(dx,ds);
});
this.load = false
});
},
//
onSearch() {
this.form.sStartTime = this.selTime[0];
this.form.sEndTime = this.selTime[1];
let obj = Object.assign({},this.form);
getCheZhuCarCategory(obj).then(res => {
let data = res.data;
this.tbData = data;
let dx = [];
let ds = [];
data.forEach(ele => {
dx.push(ele.seriesname);
ds.push(ele.salescount);
})
this.opt = createOpt(dx,ds);
})
},
//
onTable() {
this.visible = true;
},
onClose() {
this.visible = false;
},
//
goBack() {
this.$router.go(-1);
},
disabledDate(current) {
return current > moment();
},
//
onSale(value) {
let seriesname = value.seriesname;
getBrandName({token: this.getToken, sSeriesName:seriesname}).then(res => {
let brandName = res.data;
this.$router.push(
{
path: '/saleRank/seriesInfo',
query: {
sBrand: brandName,
sSeriesName: seriesname
}
}
);
})
}
}
}
</script>
<style lang="less">
.qh-outter {
width: 1552px;
border: 2px solid #0f2a4d;
.d2 {
display: flex;
justify-content: flex-start;
padding: 16px;
}
}
.modal-table {
width: 1200px;
height: 460px;
.tb-inner {
width: 100%;
height: calc(100% - 48px);
margin-top: 24px;
}
}
</style>

@ -0,0 +1,111 @@
/*
* @Author: your name
* @Date: 2021-10-12 09:12:13
* @LastEditTime: 2021-11-02 18:03:08
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/BrandInsight/brandTop/opt.js
*/
import * as echarts from "echarts";
import { bigNumberTransform } from "@/utils/gol/dataTool"
export default function createOpt(dx,ds) {
return {
grid: {
top: "16px",
left: "16px",
right: "28px",
bottom: "16px",
containLabel: true,
},
tooltip: {
trigger: "axis",
backgroundColor: "#08182F",
color: "#fff",
borderColor: "#3373CC",
textStyle: {
color: "#fff", //设置文字颜色
},
extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;",
formatter: function (params) {
var result = "";
var dotHtml =
'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:#1197b8"></span>';
params.forEach(function (item) {
result += item.axisValue + "</br>" + dotHtml + item.data;
});
return result;
},
},
xAxis: {
type: "category",
axisTick: {
show: false,
},
axisLine: {
show: false,
lineStyle: {
color: "#fff",
},
},
data: dx,
},
yAxis: {
type: "value",
axisLine: {
show: false,
lineStyle: {
color: "#FFF",
},
},
axisLabel: {
formatter: (value) => {
let str = bigNumberTransform(value);
return str;
}
},
splitLine: {
lineStyle: {
type: "dashed", // y轴分割线类型
color: "#012b4b",
},
},
},
series: [
{
name: "2001",
data: ds,
type: "bar",
barWidth: 24,
itemStyle: {
normal: {
label: {
show: true, //开启显示
position: 'top', //在上方显示
textStyle: { //数值样式
color: '#fff',
fontSize: 14
}
},
color: new echarts.graphic.LinearGradient(
0,
1,
0,
0,
[
{
offset: 0,
color: "rgba(91, 157, 249, 0)", // 0% 处的颜色
},
{
offset: 1,
color: "#3373CC", // 100% 处的颜色#3373CC
},
],
false
),
},
},
},
],
}
}

@ -0,0 +1,202 @@
<template>
<div class="eqy-outter" v-loading="load">
<v-label-div :title="time+'('+form.sStartTime+'至'+form.sEndTime+')'">
<v-btn @click="onTable"></v-btn>
<v-btn @click="goBack"></v-btn>
</v-label-div>
<div class="d2">
<a-range-picker style="width: 360px" v-model="selTime" :disabled-date="disabledDate" valueFormat="YYYY-MM-DD">
<a-icon slot="suffixIcon" type="calendar" />
</a-range-picker>
<a-button @click="onSearch" style="margin-left: 40px" type="primary">查询</a-button>
</div>
<div class="d3">
<v-table ref="rtable" :columns="columns" :data="tbData" :pagination="pagination" :loading="tableLoading">
<template slot="about" slot-scope="text, record">
<a-button type="primary" @click="onSale(record)"></a-button>
</template>
</v-table>
</div>
<a-modal title="汽油车销量排行榜趋势图(单位:辆)" width="1200px" :footer="null" @cancel="onClose" :visible="visible">
<div class="modal-table">
<a-range-picker style="width: 360px" v-model="selTime" :disabled-date="disabledDate" valueFormat="YYYY-MM-DD">
<a-icon slot="suffixIcon" type="calendar" />
</a-range-picker>
<a-button @click="onSearch" type="primary" style="margin-left: 40px">查询</a-button>
<div class="tb-inner">
<v-echarts :opt="opt"></v-echarts>
</div>
</div>
</a-modal>
</div>
</template>
<script>
import {getCheZhuCarCategory} from "@/api/SaleRank"
import {getCheZhuCountTime} from "@/api/SaleRank"
import {getBrandName} from "@/api/comm"
import createOpt from "./opt"
import moment from "moment";
export default {
name: 'EnergyQY',
data() {
return {
load: false,
time: '汽油车销量排行榜',
selTime: [],
form: {
token: '',
sStartTime: '',
sEndTime: '',
sTimeType: 4,
sEnergyType: 1
},
opt: {},
//
pagination: {
pageSize: 20,
},
tbData: [],
tableLoading: false,
columns: [
{
title: "排名",
dataIndex: "id",
key: "id",
width: 120
},
{
title: "车型",
dataIndex: "seriesname",
key: "seriesname",
},
{
title: "能源类型",
dataIndex: "energys",
key: "energys",
},
{
title: "销量",
dataIndex: "salescount",
key: "salescount",
},
{
title: "售价(万元)",
dataIndex: "price",
key: "price",
},
{
title: "车型相关",
dataIndex: "about",
key: "about",
scopedSlots: { customRender: "about" },
},
],
//
visible: false,
}
},
created() {
this.form.token = this.getToken
this.getData();
},
methods: {
getData() {
this.load = true;
let o = {token: this.getToken};
getCheZhuCountTime(o).then(res => {
let data = res.data;
this.form.sStartTime = data.Data[0].Time;
this.form.sEndTime = data.Data[data.Data.length-1].Time;
let obj = {
token: this.getToken,
sTimeType: 4,
sStartTime: this.form.sStartTime + '-01',
sEndTime: this.form.sEndTime + '-01',
sEnergyType: 1
}
getCheZhuCarCategory(obj).then(res => {
let data = res.data;
this.tbData = data;
let dx = [];
let ds = [];
data.forEach(ele => {
dx.push(ele.seriesname);
ds.push(ele.salescount);
})
this.opt = createOpt(dx,ds);
});
this.load = false
});
},
//
onSearch() {
this.form.sStartTime = this.selTime[0];
this.form.sEndTime = this.selTime[1];
let obj = Object.assign({},this.form);
getCheZhuCarCategory(obj).then(res => {
let data = res.data;
this.tbData = data;
let dx = [];
let ds = [];
data.forEach(ele => {
dx.push(ele.seriesname);
ds.push(ele.salescount);
})
this.opt = createOpt(dx,ds);
})
},
//
onTable() {
this.visible = true;
},
onClose() {
this.visible = false;
},
//
goBack() {
this.$router.go(-1);
},
disabledDate(current) {
return current > moment();
},
//
onSale(value) {
let seriesname = value.seriesname;
getBrandName({token: this.getToken, sSeriesName:seriesname}).then(res => {
let brandName = res.data;
this.$router.push(
{
path: '/saleRank/seriesInfo',
query: {
sBrand: brandName,
sSeriesName: seriesname
}
}
);
})
}
}
}
</script>
<style lang="less">
.eqy-outter {
width: 1552px;
border: 2px solid #0f2a4d;
.d2 {
display: flex;
justify-content: flex-start;
padding: 16px;
}
}
.modal-table {
width: 1200px;
height: 460px;
.tb-inner {
width: 100%;
height: calc(100% - 48px);
margin-top: 24px;
}
}
</style>

@ -0,0 +1,111 @@
/*
* @Author: your name
* @Date: 2021-10-12 09:12:13
* @LastEditTime: 2021-11-02 18:03:08
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/BrandInsight/brandTop/opt.js
*/
import * as echarts from "echarts";
import { bigNumberTransform } from "@/utils/gol/dataTool"
export default function createOpt(dx,ds) {
return {
grid: {
top: "16px",
left: "16px",
right: "28px",
bottom: "16px",
containLabel: true,
},
tooltip: {
trigger: "axis",
backgroundColor: "#08182F",
color: "#fff",
borderColor: "#3373CC",
textStyle: {
color: "#fff", //设置文字颜色
},
extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;",
formatter: function (params) {
var result = "";
var dotHtml =
'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:#1197b8"></span>';
params.forEach(function (item) {
result += item.axisValue + "</br>" + dotHtml + item.data;
});
return result;
},
},
xAxis: {
type: "category",
axisTick: {
show: false,
},
axisLine: {
show: false,
lineStyle: {
color: "#fff",
},
},
data: dx,
},
yAxis: {
type: "value",
axisLine: {
show: false,
lineStyle: {
color: "#FFF",
},
},
axisLabel: {
formatter: (value) => {
let str = bigNumberTransform(value);
return str;
}
},
splitLine: {
lineStyle: {
type: "dashed", // y轴分割线类型
color: "#012b4b",
},
},
},
series: [
{
name: "2001",
data: ds,
type: "bar",
barWidth: 24,
itemStyle: {
normal: {
label: {
show: true, //开启显示
position: 'top', //在上方显示
textStyle: { //数值样式
color: '#fff',
fontSize: 14
}
},
color: new echarts.graphic.LinearGradient(
0,
1,
0,
0,
[
{
offset: 0,
color: "rgba(91, 157, 249, 0)", // 0% 处的颜色
},
{
offset: 1,
color: "#3373CC", // 100% 处的颜色#3373CC
},
],
false
),
},
},
},
],
}
}

@ -0,0 +1,202 @@
<template>
<div class="ydh-outter" v-loading="load">
<v-label-div :title="time+'('+form.sStartTime+'至'+form.sEndTime+')'">
<v-btn @click="onTable"></v-btn>
<v-btn @click="goBack"></v-btn>
</v-label-div>
<div class="d2">
<a-range-picker style="width: 360px" v-model="selTime" :disabled-date="disabledDate" valueFormat="YYYY-MM-DD">
<a-icon slot="suffixIcon" type="calendar" />
</a-range-picker>
<a-button @click="onSearch" style="margin-left: 40px" type="primary">查询</a-button>
</div>
<div class="d3">
<v-table ref="rtable" :columns="columns" :data="tbData" :pagination="pagination" :loading="tableLoading">
<template slot="about" slot-scope="text, record">
<a-button type="primary" @click="onSale(record)"></a-button>
</template>
</v-table>
</div>
<a-modal title="油电混动销量排行榜趋势图(单位:辆)" width="1200px" :footer="null" @cancel="onClose" :visible="visible">
<div class="modal-table">
<a-range-picker style="width: 360px" v-model="selTime" :disabled-date="disabledDate" valueFormat="YYYY-MM-DD">
<a-icon slot="suffixIcon" type="calendar" />
</a-range-picker>
<a-button @click="onSearch" type="primary" style="margin-left: 40px">查询</a-button>
<div class="tb-inner">
<v-echarts :opt="opt"></v-echarts>
</div>
</div>
</a-modal>
</div>
</template>
<script>
import {getCheZhuCarCategory} from "@/api/SaleRank"
import {getCheZhuCountTime} from "@/api/SaleRank"
import {getBrandName} from "@/api/comm"
import createOpt from "./opt"
import moment from "moment";
export default {
name: 'EnergyYDH',
data() {
return {
load: false,
time: '油电混动销量排行榜',
selTime: [],
form: {
token: '',
sStartTime: '',
sEndTime: '',
sTimeType: 4,
sEnergyType: 3
},
opt: {},
//
pagination: {
pageSize: 20,
},
tbData: [],
tableLoading: false,
columns: [
{
title: "排名",
dataIndex: "id",
key: "id",
width: 120
},
{
title: "车型",
dataIndex: "seriesname",
key: "seriesname",
},
{
title: "能源类型",
dataIndex: "energys",
key: "energys",
},
{
title: "销量",
dataIndex: "salescount",
key: "salescount",
},
{
title: "售价(万元)",
dataIndex: "price",
key: "price",
},
{
title: "车型相关",
dataIndex: "about",
key: "about",
scopedSlots: { customRender: "about" },
},
],
//
visible: false,
}
},
created() {
this.form.token = this.getToken
this.getData();
},
methods: {
getData() {
this.load = true;
let o = {token: this.getToken};
getCheZhuCountTime(o).then(res => {
let data = res.data;
this.form.sStartTime = data.Data[0].Time;
this.form.sEndTime = data.Data[data.Data.length-1].Time;
let obj = {
token: this.getToken,
sTimeType: 4,
sStartTime: this.form.sStartTime + '-01',
sEndTime: this.form.sEndTime + '-01',
sEnergyType: 3
}
getCheZhuCarCategory(obj).then(res => {
let data = res.data;
this.tbData = data;
let dx = [];
let ds = [];
data.forEach(ele => {
dx.push(ele.seriesname);
ds.push(ele.salescount);
})
this.opt = createOpt(dx,ds);
});
this.load = false
});
},
//
onSearch() {
this.form.sStartTime = this.selTime[0];
this.form.sEndTime = this.selTime[1];
let obj = Object.assign({},this.form);
getCheZhuCarCategory(obj).then(res => {
let data = res.data;
this.tbData = data;
let dx = [];
let ds = [];
data.forEach(ele => {
dx.push(ele.seriesname);
ds.push(ele.salescount);
})
this.opt = createOpt(dx,ds);
})
},
//
onTable() {
this.visible = true;
},
onClose() {
this.visible = false;
},
//
goBack() {
this.$router.go(-1);
},
disabledDate(current) {
return current > moment();
},
//
onSale(value) {
let seriesname = value.seriesname;
getBrandName({token: this.getToken, sSeriesName:seriesname}).then(res => {
let brandName = res.data;
this.$router.push(
{
path: '/saleRank/seriesInfo',
query: {
sBrand: brandName,
sSeriesName: seriesname
}
}
);
})
}
}
}
</script>
<style lang="less">
.ydh-outter {
width: 1552px;
border: 2px solid #0f2a4d;
.d2 {
display: flex;
justify-content: flex-start;
padding: 16px;
}
}
.modal-table {
width: 1200px;
height: 460px;
.tb-inner {
width: 100%;
height: calc(100% - 48px);
margin-top: 24px;
}
}
</style>

@ -0,0 +1,111 @@
/*
* @Author: your name
* @Date: 2021-10-12 09:12:13
* @LastEditTime: 2021-11-02 18:03:08
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/BrandInsight/brandTop/opt.js
*/
import * as echarts from "echarts";
import { bigNumberTransform } from "@/utils/gol/dataTool"
export default function createOpt(dx,ds) {
return {
grid: {
top: "16px",
left: "16px",
right: "28px",
bottom: "16px",
containLabel: true,
},
tooltip: {
trigger: "axis",
backgroundColor: "#08182F",
color: "#fff",
borderColor: "#3373CC",
textStyle: {
color: "#fff", //设置文字颜色
},
extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;",
formatter: function (params) {
var result = "";
var dotHtml =
'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:#1197b8"></span>';
params.forEach(function (item) {
result += item.axisValue + "</br>" + dotHtml + item.data;
});
return result;
},
},
xAxis: {
type: "category",
axisTick: {
show: false,
},
axisLine: {
show: false,
lineStyle: {
color: "#fff",
},
},
data: dx,
},
yAxis: {
type: "value",
axisLine: {
show: false,
lineStyle: {
color: "#FFF",
},
},
axisLabel: {
formatter: (value) => {
let str = bigNumberTransform(value);
return str;
}
},
splitLine: {
lineStyle: {
type: "dashed", // y轴分割线类型
color: "#012b4b",
},
},
},
series: [
{
name: "2001",
data: ds,
type: "bar",
barWidth: 24,
itemStyle: {
normal: {
label: {
show: true, //开启显示
position: 'top', //在上方显示
textStyle: { //数值样式
color: '#fff',
fontSize: 14
}
},
color: new echarts.graphic.LinearGradient(
0,
1,
0,
0,
[
{
offset: 0,
color: "rgba(91, 157, 249, 0)", // 0% 处的颜色
},
{
offset: 1,
color: "#3373CC", // 100% 处的颜色#3373CC
},
],
false
),
},
},
},
],
}
}

@ -0,0 +1,202 @@
<template>
<div class="mpv-outter" v-loading="load">
<v-label-div :title="time+'('+form.sStartTime+'至'+form.sEndTime+')'">
<v-btn @click="onTable"></v-btn>
<v-btn @click="goBack"></v-btn>
</v-label-div>
<div class="d2">
<a-range-picker style="width: 360px" v-model="selTime" :disabled-date="disabledDate" valueFormat="YYYY-MM-DD">
<a-icon slot="suffixIcon" type="calendar" />
</a-range-picker>
<a-button @click="onSearch" style="margin-left: 40px" type="primary">查询</a-button>
</div>
<div class="d3">
<v-table ref="rtable" :columns="columns" :data="tbData" :pagination="pagination" :loading="tableLoading">
<template slot="about" slot-scope="text, record">
<a-button type="primary" @click="onSale(record)"></a-button>
</template>
</v-table>
</div>
<a-modal title="MPV销量排行榜趋势图(单位:辆)" width="1200px" :footer="null" @cancel="onClose" :visible="visible">
<div class="modal-table">
<a-range-picker style="width: 360px" v-model="selTime" :disabled-date="disabledDate" valueFormat="YYYY-MM-DD">
<a-icon slot="suffixIcon" type="calendar" />
</a-range-picker>
<a-button @click="onSearch" type="primary" style="margin-left: 40px">查询</a-button>
<div class="tb-inner">
<v-echarts :opt="opt"></v-echarts>
</div>
</div>
</a-modal>
</div>
</template>
<script>
import {getCheZhuCarCategory} from "@/api/SaleRank"
import {getCheZhuCountTime} from "@/api/SaleRank"
import {getBrandName} from "@/api/comm"
import createOpt from "./opt"
import moment from "moment";
export default {
name: 'MPVCar',
data() {
return {
load: false,
time: 'MPV销量排行榜',
selTime: [],
form: {
token: '',
sStartTime: '',
sEndTime: '',
sTimeType: 4,
sSpec: 'mpv'
},
opt: {},
//
pagination: {
pageSize: 20,
},
tbData: [],
tableLoading: false,
columns: [
{
title: "排名",
dataIndex: "id",
key: "id",
width: 120
},
{
title: "车型",
dataIndex: "seriesname",
key: "seriesname",
},
{
title: "能源类型",
dataIndex: "energys",
key: "energys",
},
{
title: "销量",
dataIndex: "salescount",
key: "salescount",
},
{
title: "售价(万元)",
dataIndex: "price",
key: "price",
},
{
title: "车型相关",
dataIndex: "about",
key: "about",
scopedSlots: { customRender: "about" },
},
],
//
visible: false,
}
},
created() {
this.form.token = this.getToken
this.getData();
},
methods: {
getData() {
this.load = true;
let o = {token: this.getToken};
getCheZhuCountTime(o).then(res => {
let data = res.data;
this.form.sStartTime = data.Data[0].Time;
this.form.sEndTime = data.Data[data.Data.length-1].Time;
let obj = {
token: this.getToken,
sTimeType: 4,
sStartTime: this.form.sStartTime + '-01',
sEndTime: this.form.sEndTime + '-01',
sSpec: 'mpv'
}
getCheZhuCarCategory(obj).then(res => {
let data = res.data;
this.tbData = data;
let dx = [];
let ds = [];
data.forEach(ele => {
dx.push(ele.seriesname);
ds.push(ele.salescount);
})
this.opt = createOpt(dx,ds);
});
this.load = false
});
},
//
onSearch() {
this.form.sStartTime = this.selTime[0];
this.form.sEndTime = this.selTime[1];
let obj = Object.assign({},this.form);
getCheZhuCarCategory(obj).then(res => {
let data = res.data;
this.tbData = data;
let dx = [];
let ds = [];
data.forEach(ele => {
dx.push(ele.seriesname);
ds.push(ele.salescount);
})
this.opt = createOpt(dx,ds);
})
},
//
onTable() {
this.visible = true;
},
onClose() {
this.visible = false;
},
//
goBack() {
this.$router.go(-1);
},
disabledDate(current) {
return current > moment();
},
//
onSale(value) {
let seriesname = value.seriesname;
getBrandName({token: this.getToken, sSeriesName:seriesname}).then(res => {
let brandName = res.data;
this.$router.push(
{
path: '/saleRank/seriesInfo',
query: {
sBrand: brandName,
sSeriesName: seriesname
}
}
);
})
}
}
}
</script>
<style lang="less">
.mpv-outter {
width: 1552px;
border: 2px solid #0f2a4d;
.d2 {
display: flex;
justify-content: flex-start;
padding: 16px;
}
}
.modal-table {
width: 1200px;
height: 460px;
.tb-inner {
width: 100%;
height: calc(100% - 48px);
margin-top: 24px;
}
}
</style>

@ -0,0 +1,111 @@
/*
* @Author: your name
* @Date: 2021-10-12 09:12:13
* @LastEditTime: 2021-11-02 18:03:08
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/BrandInsight/brandTop/opt.js
*/
import * as echarts from "echarts";
import { bigNumberTransform } from "@/utils/gol/dataTool"
export default function createOpt(dx,ds) {
return {
grid: {
top: "16px",
left: "16px",
right: "28px",
bottom: "16px",
containLabel: true,
},
tooltip: {
trigger: "axis",
backgroundColor: "#08182F",
color: "#fff",
borderColor: "#3373CC",
textStyle: {
color: "#fff", //设置文字颜色
},
extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;",
formatter: function (params) {
var result = "";
var dotHtml =
'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:#1197b8"></span>';
params.forEach(function (item) {
result += item.axisValue + "</br>" + dotHtml + item.data;
});
return result;
},
},
xAxis: {
type: "category",
axisTick: {
show: false,
},
axisLine: {
show: false,
lineStyle: {
color: "#fff",
},
},
data: dx,
},
yAxis: {
type: "value",
axisLine: {
show: false,
lineStyle: {
color: "#FFF",
},
},
axisLabel: {
formatter: (value) => {
let str = bigNumberTransform(value);
return str;
}
},
splitLine: {
lineStyle: {
type: "dashed", // y轴分割线类型
color: "#012b4b",
},
},
},
series: [
{
name: "2001",
data: ds,
type: "bar",
barWidth: 24,
itemStyle: {
normal: {
label: {
show: true, //开启显示
position: 'top', //在上方显示
textStyle: { //数值样式
color: '#fff',
fontSize: 14
}
},
color: new echarts.graphic.LinearGradient(
0,
1,
0,
0,
[
{
offset: 0,
color: "rgba(91, 157, 249, 0)", // 0% 处的颜色
},
{
offset: 1,
color: "#3373CC", // 100% 处的颜色#3373CC
},
],
false
),
},
},
},
],
}
}

@ -0,0 +1,202 @@
<template>
<div class="suv-outter" v-loading="load">
<v-label-div :title="time+'('+form.sStartTime+'至'+form.sEndTime+')'">
<v-btn @click="onTable"></v-btn>
<v-btn @click="goBack"></v-btn>
</v-label-div>
<div class="d2">
<a-range-picker style="width: 360px" v-model="selTime" :disabled-date="disabledDate" valueFormat="YYYY-MM-DD">
<a-icon slot="suffixIcon" type="calendar" />
</a-range-picker>
<a-button @click="onSearch" style="margin-left: 40px" type="primary">查询</a-button>
</div>
<div class="d3">
<v-table ref="rtable" :columns="columns" :data="tbData" :pagination="pagination" :loading="tableLoading">
<template slot="about" slot-scope="text, record">
<a-button type="primary" @click="onSale(record)"></a-button>
</template>
</v-table>
</div>
<a-modal title="SUV销量排行榜趋势图(单位:辆)" width="1200px" :footer="null" @cancel="onClose" :visible="visible">
<div class="modal-table">
<a-range-picker style="width: 360px" v-model="selTime" :disabled-date="disabledDate" valueFormat="YYYY-MM-DD">
<a-icon slot="suffixIcon" type="calendar" />
</a-range-picker>
<a-button @click="onSearch" type="primary" style="margin-left: 40px">查询</a-button>
<div class="tb-inner">
<v-echarts :opt="opt"></v-echarts>
</div>
</div>
</a-modal>
</div>
</template>
<script>
import {getCheZhuCarCategory} from "@/api/SaleRank"
import {getCheZhuCountTime} from "@/api/SaleRank"
import {getBrandName} from "@/api/comm"
import createOpt from "./opt"
import moment from "moment";
export default {
name: 'SUVCar',
data() {
return {
load: false,
time: 'SUV销量排行榜',
selTime: [],
form: {
token: '',
sStartTime: '',
sEndTime: '',
sTimeType: 4,
sSpec: 'suv'
},
opt: {},
//
pagination: {
pageSize: 20,
},
tbData: [],
tableLoading: false,
columns: [
{
title: "排名",
dataIndex: "id",
key: "id",
width: 120
},
{
title: "车型",
dataIndex: "seriesname",
key: "seriesname",
},
{
title: "能源类型",
dataIndex: "energys",
key: "energys",
},
{
title: "销量",
dataIndex: "salescount",
key: "salescount",
},
{
title: "售价(万元)",
dataIndex: "price",
key: "price",
},
{
title: "车型相关",
dataIndex: "about",
key: "about",
scopedSlots: { customRender: "about" },
},
],
//
visible: false,
}
},
created() {
this.form.token = this.getToken
this.getData();
},
methods: {
getData() {
this.load = true;
let o = {token: this.getToken};
getCheZhuCountTime(o).then(res => {
let data = res.data;
this.form.sStartTime = data.Data[0].Time;
this.form.sEndTime = data.Data[data.Data.length-1].Time;
let obj = {
token: this.getToken,
sTimeType: 4,
sStartTime: this.form.sStartTime + '-01',
sEndTime: this.form.sEndTime + '-01',
sSpec: 'suv'
}
getCheZhuCarCategory(obj).then(res => {
let data = res.data;
this.tbData = data;
let dx = [];
let ds = [];
data.forEach(ele => {
dx.push(ele.seriesname);
ds.push(ele.salescount);
})
this.opt = createOpt(dx,ds);
});
this.load = false
});
},
//
onSearch() {
this.form.sStartTime = this.selTime[0];
this.form.sEndTime = this.selTime[1];
let obj = Object.assign({},this.form);
getCheZhuCarCategory(obj).then(res => {
let data = res.data;
this.tbData = data;
let dx = [];
let ds = [];
data.forEach(ele => {
dx.push(ele.seriesname);
ds.push(ele.salescount);
})
this.opt = createOpt(dx,ds);
})
},
//
onTable() {
this.visible = true;
},
onClose() {
this.visible = false;
},
//
goBack() {
this.$router.go(-1);
},
disabledDate(current) {
return current > moment();
},
//
onSale(value) {
let seriesname = value.seriesname;
getBrandName({token: this.getToken, sSeriesName:seriesname}).then(res => {
let brandName = res.data;
this.$router.push(
{
path: '/saleRank/seriesInfo',
query: {
sBrand: brandName,
sSeriesName: seriesname
}
}
);
})
}
}
}
</script>
<style lang="less">
.suv-outter {
width: 1552px;
border: 2px solid #0f2a4d;
.d2 {
display: flex;
justify-content: flex-start;
padding: 16px;
}
}
.modal-table {
width: 1200px;
height: 460px;
.tb-inner {
width: 100%;
height: calc(100% - 48px);
margin-top: 24px;
}
}
</style>

@ -0,0 +1,111 @@
/*
* @Author: your name
* @Date: 2021-10-12 09:12:13
* @LastEditTime: 2021-11-02 18:03:08
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/BrandInsight/brandTop/opt.js
*/
import * as echarts from "echarts";
import { bigNumberTransform } from "@/utils/gol/dataTool"
export default function createOpt(dx,ds) {
return {
grid: {
top: "16px",
left: "16px",
right: "28px",
bottom: "16px",
containLabel: true,
},
tooltip: {
trigger: "axis",
backgroundColor: "#08182F",
color: "#fff",
borderColor: "#3373CC",
textStyle: {
color: "#fff", //设置文字颜色
},
extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;",
formatter: function (params) {
var result = "";
var dotHtml =
'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:#1197b8"></span>';
params.forEach(function (item) {
result += item.axisValue + "</br>" + dotHtml + item.data;
});
return result;
},
},
xAxis: {
type: "category",
axisTick: {
show: false,
},
axisLine: {
show: false,
lineStyle: {
color: "#fff",
},
},
data: dx,
},
yAxis: {
type: "value",
axisLine: {
show: false,
lineStyle: {
color: "#FFF",
},
},
axisLabel: {
formatter: (value) => {
let str = bigNumberTransform(value);
return str;
}
},
splitLine: {
lineStyle: {
type: "dashed", // y轴分割线类型
color: "#012b4b",
},
},
},
series: [
{
name: "2001",
data: ds,
type: "bar",
barWidth: 24,
itemStyle: {
normal: {
label: {
show: true, //开启显示
position: 'top', //在上方显示
textStyle: { //数值样式
color: '#fff',
fontSize: 14
}
},
color: new echarts.graphic.LinearGradient(
0,
1,
0,
0,
[
{
offset: 0,
color: "rgba(91, 157, 249, 0)", // 0% 处的颜色
},
{
offset: 1,
color: "#3373CC", // 100% 处的颜色#3373CC
},
],
false
),
},
},
},
],
}
}

@ -0,0 +1,202 @@
<template>
<div class="jc-outter" v-loading="load">
<v-label-div :title="time+'('+form.sStartTime+'至'+form.sEndTime+')'">
<v-btn @click="onTable"></v-btn>
<v-btn @click="goBack"></v-btn>
</v-label-div>
<div class="d2">
<a-range-picker style="width: 360px" v-model="selTime" :disabled-date="disabledDate" valueFormat="YYYY-MM-DD">
<a-icon slot="suffixIcon" type="calendar" />
</a-range-picker>
<a-button @click="onSearch" style="margin-left: 40px" type="primary">查询</a-button>
</div>
<div class="d3">
<v-table ref="rtable" :columns="columns" :data="tbData" :pagination="pagination" :loading="tableLoading">
<template slot="about" slot-scope="text, record">
<a-button type="primary" @click="onSale(record)"></a-button>
</template>
</v-table>
</div>
<a-modal title="紧凑型车销量排行榜趋势图(单位:辆)" width="1200px" :footer="null" @cancel="onClose" :visible="visible">
<div class="modal-table">
<a-range-picker style="width: 360px" v-model="selTime" :disabled-date="disabledDate" valueFormat="YYYY-MM-DD">
<a-icon slot="suffixIcon" type="calendar" />
</a-range-picker>
<a-button @click="onSearch" type="primary" style="margin-left: 40px">查询</a-button>
<div class="tb-inner">
<v-echarts :opt="opt"></v-echarts>
</div>
</div>
</a-modal>
</div>
</template>
<script>
import {getCheZhuCarCategory} from "@/api/SaleRank"
import {getCheZhuCountTime} from "@/api/SaleRank"
import {getBrandName} from "@/api/comm"
import createOpt from "./opt"
import moment from "moment";
export default {
name: 'jcCar',
data() {
return {
load: false,
time: '紧凑型车销量排行榜',
selTime: [],
form: {
token: '',
sStartTime: '',
sEndTime: '',
sTimeType: 4,
sSpec: 'a'
},
opt: {},
//
pagination: {
pageSize: 20,
},
tbData: [],
tableLoading: false,
columns: [
{
title: "排名",
dataIndex: "id",
key: "id",
width: 120
},
{
title: "车型",
dataIndex: "seriesname",
key: "seriesname",
},
{
title: "能源类型",
dataIndex: "energys",
key: "energys",
},
{
title: "销量",
dataIndex: "salescount",
key: "salescount",
},
{
title: "售价(万元)",
dataIndex: "price",
key: "price",
},
{
title: "车型相关",
dataIndex: "about",
key: "about",
scopedSlots: { customRender: "about" },
},
],
//
visible: false,
}
},
created() {
this.form.token = this.getToken
this.getData();
},
methods: {
getData() {
this.load = true;
let o = {token: this.getToken};
getCheZhuCountTime(o).then(res => {
let data = res.data;
this.form.sStartTime = data.Data[0].Time;
this.form.sEndTime = data.Data[data.Data.length-1].Time;
let obj = {
token: this.getToken,
sTimeType: 4,
sStartTime: this.form.sStartTime + '-01',
sEndTime: this.form.sEndTime + '-01',
sSpec: 'a'
}
getCheZhuCarCategory(obj).then(res => {
let data = res.data;
this.tbData = data;
let dx = [];
let ds = [];
data.forEach(ele => {
dx.push(ele.seriesname);
ds.push(ele.salescount);
})
this.opt = createOpt(dx,ds);
});
this.load = false
});
},
//
onSearch() {
this.form.sStartTime = this.selTime[0];
this.form.sEndTime = this.selTime[1];
let obj = Object.assign({},this.form);
getCheZhuCarCategory(obj).then(res => {
let data = res.data;
this.tbData = data;
let dx = [];
let ds = [];
data.forEach(ele => {
dx.push(ele.seriesname);
ds.push(ele.salescount);
})
this.opt = createOpt(dx,ds);
})
},
//
onTable() {
this.visible = true;
},
onClose() {
this.visible = false;
},
//
goBack() {
this.$router.go(-1);
},
disabledDate(current) {
return current > moment();
},
//
onSale(value) {
let seriesname = value.seriesname;
getBrandName({token: this.getToken, sSeriesName:seriesname}).then(res => {
let brandName = res.data;
this.$router.push(
{
path: '/saleRank/seriesInfo',
query: {
sBrand: brandName,
sSeriesName: seriesname
}
}
);
})
}
}
}
</script>
<style lang="less">
.jc-outter {
width: 1552px;
border: 2px solid #0f2a4d;
.d2 {
display: flex;
justify-content: flex-start;
padding: 16px;
}
}
.modal-table {
width: 1200px;
height: 460px;
.tb-inner {
width: 100%;
height: calc(100% - 48px);
margin-top: 24px;
}
}
</style>

@ -0,0 +1,111 @@
/*
* @Author: your name
* @Date: 2021-10-12 09:12:13
* @LastEditTime: 2021-11-02 18:03:08
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/BrandInsight/brandTop/opt.js
*/
import * as echarts from "echarts";
import { bigNumberTransform } from "@/utils/gol/dataTool"
export default function createOpt(dx,ds) {
return {
grid: {
top: "16px",
left: "16px",
right: "28px",
bottom: "16px",
containLabel: true,
},
tooltip: {
trigger: "axis",
backgroundColor: "#08182F",
color: "#fff",
borderColor: "#3373CC",
textStyle: {
color: "#fff", //设置文字颜色
},
extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;",
formatter: function (params) {
var result = "";
var dotHtml =
'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:#1197b8"></span>';
params.forEach(function (item) {
result += item.axisValue + "</br>" + dotHtml + item.data;
});
return result;
},
},
xAxis: {
type: "category",
axisTick: {
show: false,
},
axisLine: {
show: false,
lineStyle: {
color: "#fff",
},
},
data: dx,
},
yAxis: {
type: "value",
axisLine: {
show: false,
lineStyle: {
color: "#FFF",
},
},
axisLabel: {
formatter: (value) => {
let str = bigNumberTransform(value);
return str;
}
},
splitLine: {
lineStyle: {
type: "dashed", // y轴分割线类型
color: "#012b4b",
},
},
},
series: [
{
name: "2001",
data: ds,
type: "bar",
barWidth: 24,
itemStyle: {
normal: {
label: {
show: true, //开启显示
position: 'top', //在上方显示
textStyle: { //数值样式
color: '#fff',
fontSize: 14
}
},
color: new echarts.graphic.LinearGradient(
0,
1,
0,
0,
[
{
offset: 0,
color: "rgba(91, 157, 249, 0)", // 0% 处的颜色
},
{
offset: 1,
color: "#3373CC", // 100% 处的颜色#3373CC
},
],
false
),
},
},
},
],
}
}

@ -0,0 +1,202 @@
<template>
<div class="xxc-outter" v-loading="load">
<v-label-div :title="time+'('+form.sStartTime+'至'+form.sEndTime+')'">
<v-btn @click="onTable"></v-btn>
<v-btn @click="goBack"></v-btn>
</v-label-div>
<div class="d2">
<a-range-picker style="width: 360px" v-model="selTime" :disabled-date="disabledDate" valueFormat="YYYY-MM-DD">
<a-icon slot="suffixIcon" type="calendar" />
</a-range-picker>
<a-button @click="onSearch" style="margin-left: 40px" type="primary">查询</a-button>
</div>
<div class="d3">
<v-table ref="rtable" :columns="columns" :data="tbData" :pagination="pagination" :loading="tableLoading">
<template slot="about" slot-scope="text, record">
<a-button type="primary" @click="onSale(record)"></a-button>
</template>
</v-table>
</div>
<a-modal title="小型车销量排行榜趋势图(单位:辆)" width="1200px" :footer="null" @cancel="onClose" :visible="visible">
<div class="modal-table">
<a-range-picker style="width: 360px" v-model="selTime" :disabled-date="disabledDate" valueFormat="YYYY-MM-DD">
<a-icon slot="suffixIcon" type="calendar" />
</a-range-picker>
<a-button @click="onSearch" type="primary" style="margin-left: 40px">查询</a-button>
<div class="tb-inner">
<v-echarts :opt="opt"></v-echarts>
</div>
</div>
</a-modal>
</div>
</template>
<script>
import {getCheZhuCarCategory} from "@/api/SaleRank"
import {getCheZhuCountTime} from "@/api/SaleRank"
import {getBrandName} from "@/api/comm"
import createOpt from "./opt"
import moment from "moment";
export default {
name: 'xxCar',
data() {
return {
load: false,
time: '小型车销量排行榜',
selTime: [],
form: {
token: '',
sStartTime: '',
sEndTime: '',
sTimeType: 4,
sSpec: 'a0'
},
opt: {},
//
pagination: {
pageSize: 20,
},
tbData: [],
tableLoading: false,
columns: [
{
title: "排名",
dataIndex: "id",
key: "id",
width: 120
},
{
title: "车型",
dataIndex: "seriesname",
key: "seriesname",
},
{
title: "能源类型",
dataIndex: "energys",
key: "energys",
},
{
title: "销量",
dataIndex: "salescount",
key: "salescount",
},
{
title: "售价(万元)",
dataIndex: "price",
key: "price",
},
{
title: "车型相关",
dataIndex: "about",
key: "about",
scopedSlots: { customRender: "about" },
},
],
//
visible: false,
}
},
created() {
this.form.token = this.getToken
this.getData();
},
methods: {
getData() {
this.load = true;
let o = {token: this.getToken};
getCheZhuCountTime(o).then(res => {
let data = res.data;
this.form.sStartTime = data.Data[0].Time;
this.form.sEndTime = data.Data[data.Data.length-1].Time;
let obj = {
token: this.getToken,
sTimeType: 4,
sStartTime: this.form.sStartTime + '-01',
sEndTime: this.form.sEndTime + '-01',
sSpec: 'a0'
}
getCheZhuCarCategory(obj).then(res => {
let data = res.data;
this.tbData = data;
let dx = [];
let ds = [];
data.forEach(ele => {
dx.push(ele.seriesname);
ds.push(ele.salescount);
})
this.opt = createOpt(dx,ds);
});
this.load = false
});
},
//
onSearch() {
this.form.sStartTime = this.selTime[0];
this.form.sEndTime = this.selTime[1];
let obj = Object.assign({},this.form);
getCheZhuCarCategory(obj).then(res => {
let data = res.data;
this.tbData = data;
let dx = [];
let ds = [];
data.forEach(ele => {
dx.push(ele.seriesname);
ds.push(ele.salescount);
})
this.opt = createOpt(dx,ds);
})
},
//
onTable() {
this.visible = true;
},
onClose() {
this.visible = false;
},
//
goBack() {
this.$router.go(-1);
},
disabledDate(current) {
return current > moment();
},
//
onSale(value) {
let seriesname = value.seriesname;
getBrandName({token: this.getToken, sSeriesName:seriesname}).then(res => {
let brandName = res.data;
this.$router.push(
{
path: '/saleRank/seriesInfo',
query: {
sBrand: brandName,
sSeriesName: seriesname
}
}
);
})
}
}
}
</script>
<style lang="less">
.xxc-outter {
width: 1552px;
border: 2px solid #0f2a4d;
.d2 {
display: flex;
justify-content: flex-start;
padding: 16px;
}
}
.modal-table {
width: 1200px;
height: 460px;
.tb-inner {
width: 100%;
height: calc(100% - 48px);
margin-top: 24px;
}
}
</style>

@ -0,0 +1,111 @@
/*
* @Author: your name
* @Date: 2021-10-12 09:12:13
* @LastEditTime: 2021-11-02 18:03:08
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/BrandInsight/brandTop/opt.js
*/
import * as echarts from "echarts";
import { bigNumberTransform } from "@/utils/gol/dataTool"
export default function createOpt(dx,ds) {
return {
grid: {
top: "16px",
left: "16px",
right: "28px",
bottom: "16px",
containLabel: true,
},
tooltip: {
trigger: "axis",
backgroundColor: "#08182F",
color: "#fff",
borderColor: "#3373CC",
textStyle: {
color: "#fff", //设置文字颜色
},
extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;",
formatter: function (params) {
var result = "";
var dotHtml =
'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:#1197b8"></span>';
params.forEach(function (item) {
result += item.axisValue + "</br>" + dotHtml + item.data;
});
return result;
},
},
xAxis: {
type: "category",
axisTick: {
show: false,
},
axisLine: {
show: false,
lineStyle: {
color: "#fff",
},
},
data: dx,
},
yAxis: {
type: "value",
axisLine: {
show: false,
lineStyle: {
color: "#FFF",
},
},
axisLabel: {
formatter: (value) => {
let str = bigNumberTransform(value);
return str;
}
},
splitLine: {
lineStyle: {
type: "dashed", // y轴分割线类型
color: "#012b4b",
},
},
},
series: [
{
name: "2001",
data: ds,
type: "bar",
barWidth: 24,
itemStyle: {
normal: {
label: {
show: true, //开启显示
position: 'top', //在上方显示
textStyle: { //数值样式
color: '#fff',
fontSize: 14
}
},
color: new echarts.graphic.LinearGradient(
0,
1,
0,
0,
[
{
offset: 0,
color: "rgba(91, 157, 249, 0)", // 0% 处的颜色
},
{
offset: 1,
color: "#3373CC", // 100% 处的颜色#3373CC
},
],
false
),
},
},
},
],
}
}

@ -0,0 +1,202 @@
<template>
<div class="zdx-outter" v-loading="load">
<v-label-div :title="time+'('+form.sStartTime+'至'+form.sEndTime+')'">
<v-btn @click="onTable"></v-btn>
<v-btn @click="goBack"></v-btn>
</v-label-div>
<div class="d2">
<a-range-picker style="width: 360px" v-model="selTime" :disabled-date="disabledDate" valueFormat="YYYY-MM-DD">
<a-icon slot="suffixIcon" type="calendar" />
</a-range-picker>
<a-button @click="onSearch" style="margin-left: 40px" type="primary">查询</a-button>
</div>
<div class="d3">
<v-table ref="rtable" :columns="columns" :data="tbData" :pagination="pagination" :loading="tableLoading">
<template slot="about" slot-scope="text, record">
<a-button type="primary" @click="onSale(record)"></a-button>
</template>
</v-table>
</div>
<a-modal title="中大型车销量排行榜趋势图(单位:辆)" width="1200px" :footer="null" @cancel="onClose" :visible="visible">
<div class="modal-table">
<a-range-picker style="width: 360px" v-model="selTime" :disabled-date="disabledDate" valueFormat="YYYY-MM-DD">
<a-icon slot="suffixIcon" type="calendar" />
</a-range-picker>
<a-button @click="onSearch" type="primary" style="margin-left: 40px">查询</a-button>
<div class="tb-inner">
<v-echarts :opt="opt"></v-echarts>
</div>
</div>
</a-modal>
</div>
</template>
<script>
import {getCheZhuCarCategory} from "@/api/SaleRank"
import {getCheZhuCountTime} from "@/api/SaleRank"
import {getBrandName} from "@/api/comm"
import createOpt from "./opt"
import moment from "moment";
export default {
name: 'zdxCar',
data() {
return {
load: false,
time: '中大型车销量排行榜',
selTime: [],
form: {
token: '',
sStartTime: '',
sEndTime: '',
sTimeType: 4,
sSpec: 'c'
},
opt: {},
//
pagination: {
pageSize: 20,
},
tbData: [],
tableLoading: false,
columns: [
{
title: "排名",
dataIndex: "id",
key: "id",
width: 120
},
{
title: "车型",
dataIndex: "seriesname",
key: "seriesname",
},
{
title: "能源类型",
dataIndex: "energys",
key: "energys",
},
{
title: "销量",
dataIndex: "salescount",
key: "salescount",
},
{
title: "售价(万元)",
dataIndex: "price",
key: "price",
},
{
title: "车型相关",
dataIndex: "about",
key: "about",
scopedSlots: { customRender: "about" },
},
],
//
visible: false,
}
},
created() {
this.form.token = this.getToken
this.getData();
},
methods: {
getData() {
this.load = true;
let o = {token: this.getToken};
getCheZhuCountTime(o).then(res => {
let data = res.data;
this.form.sStartTime = data.Data[0].Time;
this.form.sEndTime = data.Data[data.Data.length-1].Time;
let obj = {
token: this.getToken,
sTimeType: 4,
sStartTime: this.form.sStartTime + '-01',
sEndTime: this.form.sEndTime + '-01',
sSpec: 'c'
}
getCheZhuCarCategory(obj).then(res => {
let data = res.data;
this.tbData = data;
let dx = [];
let ds = [];
data.forEach(ele => {
dx.push(ele.seriesname);
ds.push(ele.salescount);
})
this.opt = createOpt(dx,ds);
});
this.load = false
});
},
//
onSearch() {
this.form.sStartTime = this.selTime[0];
this.form.sEndTime = this.selTime[1];
let obj = Object.assign({},this.form);
getCheZhuCarCategory(obj).then(res => {
let data = res.data;
this.tbData = data;
let dx = [];
let ds = [];
data.forEach(ele => {
dx.push(ele.seriesname);
ds.push(ele.salescount);
})
this.opt = createOpt(dx,ds);
})
},
//
onTable() {
this.visible = true;
},
onClose() {
this.visible = false;
},
//
goBack() {
this.$router.go(-1);
},
disabledDate(current) {
return current > moment();
},
//
onSale(value) {
let seriesname = value.seriesname;
getBrandName({token: this.getToken, sSeriesName:seriesname}).then(res => {
let brandName = res.data;
this.$router.push(
{
path: '/saleRank/seriesInfo',
query: {
sBrand: brandName,
sSeriesName: seriesname
}
}
);
})
}
}
}
</script>
<style lang="less">
.zdx-outter {
width: 1552px;
border: 2px solid #0f2a4d;
.d2 {
display: flex;
justify-content: flex-start;
padding: 16px;
}
}
.modal-table {
width: 1200px;
height: 460px;
.tb-inner {
width: 100%;
height: calc(100% - 48px);
margin-top: 24px;
}
}
</style>

@ -0,0 +1,111 @@
/*
* @Author: your name
* @Date: 2021-10-12 09:12:13
* @LastEditTime: 2021-11-02 18:03:08
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/BrandInsight/brandTop/opt.js
*/
import * as echarts from "echarts";
import { bigNumberTransform } from "@/utils/gol/dataTool"
export default function createOpt(dx,ds) {
return {
grid: {
top: "16px",
left: "16px",
right: "28px",
bottom: "16px",
containLabel: true,
},
tooltip: {
trigger: "axis",
backgroundColor: "#08182F",
color: "#fff",
borderColor: "#3373CC",
textStyle: {
color: "#fff", //设置文字颜色
},
extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;",
formatter: function (params) {
var result = "";
var dotHtml =
'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:#1197b8"></span>';
params.forEach(function (item) {
result += item.axisValue + "</br>" + dotHtml + item.data;
});
return result;
},
},
xAxis: {
type: "category",
axisTick: {
show: false,
},
axisLine: {
show: false,
lineStyle: {
color: "#fff",
},
},
data: dx,
},
yAxis: {
type: "value",
axisLine: {
show: false,
lineStyle: {
color: "#FFF",
},
},
axisLabel: {
formatter: (value) => {
let str = bigNumberTransform(value);
return str;
}
},
splitLine: {
lineStyle: {
type: "dashed", // y轴分割线类型
color: "#012b4b",
},
},
},
series: [
{
name: "2001",
data: ds,
type: "bar",
barWidth: 24,
itemStyle: {
normal: {
label: {
show: true, //开启显示
position: 'top', //在上方显示
textStyle: { //数值样式
color: '#fff',
fontSize: 14
}
},
color: new echarts.graphic.LinearGradient(
0,
1,
0,
0,
[
{
offset: 0,
color: "rgba(91, 157, 249, 0)", // 0% 处的颜色
},
{
offset: 1,
color: "#3373CC", // 100% 处的颜色#3373CC
},
],
false
),
},
},
},
],
}
}

@ -0,0 +1,202 @@
<template>
<div class="zx-outter" v-loading="load">
<v-label-div :title="time+'('+form.sStartTime+'至'+form.sEndTime+')'">
<v-btn @click="onTable"></v-btn>
<v-btn @click="goBack"></v-btn>
</v-label-div>
<div class="d2">
<a-range-picker style="width: 360px" v-model="selTime" :disabled-date="disabledDate" valueFormat="YYYY-MM-DD">
<a-icon slot="suffixIcon" type="calendar" />
</a-range-picker>
<a-button @click="onSearch" style="margin-left: 40px" type="primary">查询</a-button>
</div>
<div class="d3">
<v-table ref="rtable" :columns="columns" :data="tbData" :pagination="pagination" :loading="tableLoading">
<template slot="about" slot-scope="text, record">
<a-button type="primary" @click="onSale(record)"></a-button>
</template>
</v-table>
</div>
<a-modal title="中型车销量排行榜趋势图(单位:辆)" width="1200px" :footer="null" @cancel="onClose" :visible="visible">
<div class="modal-table">
<a-range-picker style="width: 360px" v-model="selTime" :disabled-date="disabledDate" valueFormat="YYYY-MM-DD">
<a-icon slot="suffixIcon" type="calendar" />
</a-range-picker>
<a-button @click="onSearch" type="primary" style="margin-left: 40px">查询</a-button>
<div class="tb-inner">
<v-echarts :opt="opt"></v-echarts>
</div>
</div>
</a-modal>
</div>
</template>
<script>
import {getCheZhuCarCategory} from "@/api/SaleRank"
import {getCheZhuCountTime} from "@/api/SaleRank"
import {getBrandName} from "@/api/comm"
import createOpt from "./opt"
import moment from "moment";
export default {
name: 'ZXCar',
data() {
return {
load: false,
time: '中型车销量排行榜',
selTime: [],
form: {
token: '',
sStartTime: '',
sEndTime: '',
sTimeType: 4,
sSpec: 'b'
},
opt: {},
//
pagination: {
pageSize: 20,
},
tbData: [],
tableLoading: false,
columns: [
{
title: "排名",
dataIndex: "id",
key: "id",
width: 120
},
{
title: "车型",
dataIndex: "seriesname",
key: "seriesname",
},
{
title: "能源类型",
dataIndex: "energys",
key: "energys",
},
{
title: "销量",
dataIndex: "salescount",
key: "salescount",
},
{
title: "售价(万元)",
dataIndex: "price",
key: "price",
},
{
title: "车型相关",
dataIndex: "about",
key: "about",
scopedSlots: { customRender: "about" },
},
],
//
visible: false,
}
},
created() {
this.form.token = this.getToken
this.getData();
},
methods: {
getData() {
this.load = true;
let o = {token: this.getToken};
getCheZhuCountTime(o).then(res => {
let data = res.data;
this.form.sStartTime = data.Data[0].Time;
this.form.sEndTime = data.Data[data.Data.length-1].Time;
let obj = {
token: this.getToken,
sTimeType: 4,
sStartTime: this.form.sStartTime + '-01',
sEndTime: this.form.sEndTime + '-01',
sSpec: 'b'
}
getCheZhuCarCategory(obj).then(res => {
let data = res.data;
this.tbData = data;
let dx = [];
let ds = [];
data.forEach(ele => {
dx.push(ele.seriesname);
ds.push(ele.salescount);
})
this.opt = createOpt(dx,ds);
});
this.load = false
});
},
//
onSearch() {
this.form.sStartTime = this.selTime[0];
this.form.sEndTime = this.selTime[1];
let obj = Object.assign({},this.form);
getCheZhuCarCategory(obj).then(res => {
let data = res.data;
this.tbData = data;
let dx = [];
let ds = [];
data.forEach(ele => {
dx.push(ele.seriesname);
ds.push(ele.salescount);
})
this.opt = createOpt(dx,ds);
})
},
//
onTable() {
this.visible = true;
},
onClose() {
this.visible = false;
},
//
goBack() {
this.$router.go(-1);
},
disabledDate(current) {
return current > moment();
},
//
onSale(value) {
let seriesname = value.seriesname;
getBrandName({token: this.getToken, sSeriesName:seriesname}).then(res => {
let brandName = res.data;
this.$router.push(
{
path: '/saleRank/seriesInfo',
query: {
sBrand: brandName,
sSeriesName: seriesname
}
}
);
})
}
}
}
</script>
<style lang="less">
.zx-outter {
width: 1552px;
border: 2px solid #0f2a4d;
.d2 {
display: flex;
justify-content: flex-start;
padding: 16px;
}
}
.modal-table {
width: 1200px;
height: 460px;
.tb-inner {
width: 100%;
height: calc(100% - 48px);
margin-top: 24px;
}
}
</style>

@ -0,0 +1,111 @@
/*
* @Author: your name
* @Date: 2021-10-12 09:12:13
* @LastEditTime: 2021-11-02 18:03:08
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/BrandInsight/brandTop/opt.js
*/
import * as echarts from "echarts";
import { bigNumberTransform } from "@/utils/gol/dataTool"
export default function createOpt(dx,ds) {
return {
grid: {
top: "16px",
left: "16px",
right: "28px",
bottom: "16px",
containLabel: true,
},
tooltip: {
trigger: "axis",
backgroundColor: "#08182F",
color: "#fff",
borderColor: "#3373CC",
textStyle: {
color: "#fff", //设置文字颜色
},
extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;",
formatter: function (params) {
var result = "";
var dotHtml =
'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:#1197b8"></span>';
params.forEach(function (item) {
result += item.axisValue + "</br>" + dotHtml + item.data;
});
return result;
},
},
xAxis: {
type: "category",
axisTick: {
show: false,
},
axisLine: {
show: false,
lineStyle: {
color: "#fff",
},
},
data: dx,
},
yAxis: {
type: "value",
axisLine: {
show: false,
lineStyle: {
color: "#FFF",
},
},
axisLabel: {
formatter: (value) => {
let str = bigNumberTransform(value);
return str;
}
},
splitLine: {
lineStyle: {
type: "dashed", // y轴分割线类型
color: "#012b4b",
},
},
},
series: [
{
name: "2001",
data: ds,
type: "bar",
barWidth: 24,
itemStyle: {
normal: {
label: {
show: true, //开启显示
position: 'top', //在上方显示
textStyle: { //数值样式
color: '#fff',
fontSize: 14
}
},
color: new echarts.graphic.LinearGradient(
0,
1,
0,
0,
[
{
offset: 0,
color: "rgba(91, 157, 249, 0)", // 0% 处的颜色
},
{
offset: 1,
color: "#3373CC", // 100% 处的颜色#3373CC
},
],
false
),
},
},
},
],
}
}

@ -0,0 +1,202 @@
<template>
<div class="p10-outter" v-loading="load">
<v-label-div :title="time+'('+form.sStartTime+'至'+form.sEndTime+')'">
<v-btn @click="onTable"></v-btn>
<v-btn @click="goBack"></v-btn>
</v-label-div>
<div class="d2">
<a-range-picker style="width: 360px" v-model="selTime" :disabled-date="disabledDate" valueFormat="YYYY-MM-DD">
<a-icon slot="suffixIcon" type="calendar" />
</a-range-picker>
<a-button @click="onSearch" style="margin-left: 40px" type="primary">查询</a-button>
</div>
<div class="d3">
<v-table ref="rtable" :columns="columns" :data="tbData" :pagination="pagination" :loading="tableLoading">
<template slot="about" slot-scope="text, record">
<a-button type="primary" @click="onSale(record)"></a-button>
</template>
</v-table>
</div>
<a-modal title="10万以内销量排行榜趋势图(单位:辆)" width="1200px" :footer="null" @cancel="onClose" :visible="visible">
<div class="modal-table">
<a-range-picker style="width: 360px" v-model="selTime" :disabled-date="disabledDate" valueFormat="YYYY-MM-DD">
<a-icon slot="suffixIcon" type="calendar" />
</a-range-picker>
<a-button @click="onSearch" type="primary" style="margin-left: 40px">查询</a-button>
<div class="tb-inner">
<v-echarts :opt="opt"></v-echarts>
</div>
</div>
</a-modal>
</div>
</template>
<script>
import {getCheZhuCarCategory} from "@/api/SaleRank"
import {getCheZhuCountTime} from "@/api/SaleRank"
import {getBrandName} from "@/api/comm"
import createOpt from "./opt"
import moment from "moment";
export default {
name: 'Price10',
data() {
return {
load: false,
time: '10万以内销量排行榜',
selTime: [],
form: {
token: '',
sStartTime: '',
sEndTime: '',
sTimeType: 4,
sPriceType: 1
},
opt: {},
//
pagination: {
pageSize: 20,
},
tbData: [],
tableLoading: false,
columns: [
{
title: "排名",
dataIndex: "id",
key: "id",
width: 120
},
{
title: "车型",
dataIndex: "seriesname",
key: "seriesname",
},
{
title: "能源类型",
dataIndex: "energys",
key: "energys",
},
{
title: "销量",
dataIndex: "salescount",
key: "salescount",
},
{
title: "售价(万元)",
dataIndex: "price",
key: "price",
},
{
title: "车型相关",
dataIndex: "about",
key: "about",
scopedSlots: { customRender: "about" },
},
],
//
visible: false,
}
},
created() {
this.form.token = this.getToken
this.getData();
},
methods: {
getData() {
this.load = true;
let o = {token: this.getToken};
getCheZhuCountTime(o).then(res => {
let data = res.data;
this.form.sStartTime = data.Data[0].Time;
this.form.sEndTime = data.Data[data.Data.length-1].Time;
let obj = {
token: this.getToken,
sTimeType: 4,
sStartTime: this.form.sStartTime + '-01',
sEndTime: this.form.sEndTime + '-01',
sPriceType: 1
}
getCheZhuCarCategory(obj).then(res => {
let data = res.data;
this.tbData = data;
let dx = [];
let ds = [];
data.forEach(ele => {
dx.push(ele.seriesname);
ds.push(ele.salescount);
})
this.opt = createOpt(dx,ds);
});
this.load = false
});
},
//
onSearch() {
this.form.sStartTime = this.selTime[0];
this.form.sEndTime = this.selTime[1];
let obj = Object.assign({},this.form);
getCheZhuCarCategory(obj).then(res => {
let data = res.data;
this.tbData = data;
let dx = [];
let ds = [];
data.forEach(ele => {
dx.push(ele.seriesname);
ds.push(ele.salescount);
})
this.opt = createOpt(dx,ds);
})
},
//
onTable() {
this.visible = true;
},
onClose() {
this.visible = false;
},
//
goBack() {
this.$router.go(-1);
},
disabledDate(current) {
return current > moment();
},
//
onSale(value) {
let seriesname = value.seriesname;
getBrandName({token: this.getToken, sSeriesName:seriesname}).then(res => {
let brandName = res.data;
this.$router.push(
{
path: '/saleRank/seriesInfo',
query: {
sBrand: brandName,
sSeriesName: seriesname
}
}
);
})
}
}
}
</script>
<style lang="less">
.p10-outter {
width: 1552px;
border: 2px solid #0f2a4d;
.d2 {
display: flex;
justify-content: flex-start;
padding: 16px;
}
}
.modal-table {
width: 1200px;
height: 460px;
.tb-inner {
width: 100%;
height: calc(100% - 48px);
margin-top: 24px;
}
}
</style>

@ -0,0 +1,111 @@
/*
* @Author: your name
* @Date: 2021-10-12 09:12:13
* @LastEditTime: 2021-11-02 18:03:08
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/BrandInsight/brandTop/opt.js
*/
import * as echarts from "echarts";
import { bigNumberTransform } from "@/utils/gol/dataTool"
export default function createOpt(dx,ds) {
return {
grid: {
top: "16px",
left: "16px",
right: "28px",
bottom: "16px",
containLabel: true,
},
tooltip: {
trigger: "axis",
backgroundColor: "#08182F",
color: "#fff",
borderColor: "#3373CC",
textStyle: {
color: "#fff", //设置文字颜色
},
extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;",
formatter: function (params) {
var result = "";
var dotHtml =
'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:#1197b8"></span>';
params.forEach(function (item) {
result += item.axisValue + "</br>" + dotHtml + item.data;
});
return result;
},
},
xAxis: {
type: "category",
axisTick: {
show: false,
},
axisLine: {
show: false,
lineStyle: {
color: "#fff",
},
},
data: dx,
},
yAxis: {
type: "value",
axisLine: {
show: false,
lineStyle: {
color: "#FFF",
},
},
axisLabel: {
formatter: (value) => {
let str = bigNumberTransform(value);
return str;
}
},
splitLine: {
lineStyle: {
type: "dashed", // y轴分割线类型
color: "#012b4b",
},
},
},
series: [
{
name: "2001",
data: ds,
type: "bar",
barWidth: 24,
itemStyle: {
normal: {
label: {
show: true, //开启显示
position: 'top', //在上方显示
textStyle: { //数值样式
color: '#fff',
fontSize: 14
}
},
color: new echarts.graphic.LinearGradient(
0,
1,
0,
0,
[
{
offset: 0,
color: "rgba(91, 157, 249, 0)", // 0% 处的颜色
},
{
offset: 1,
color: "#3373CC", // 100% 处的颜色#3373CC
},
],
false
),
},
},
},
],
}
}

@ -0,0 +1,202 @@
<template>
<div class="p1015-outter" v-loading="load">
<v-label-div :title="time+'('+form.sStartTime+'至'+form.sEndTime+')'">
<v-btn @click="onTable"></v-btn>
<v-btn @click="goBack"></v-btn>
</v-label-div>
<div class="d2">
<a-range-picker style="width: 360px" v-model="selTime" :disabled-date="disabledDate" valueFormat="YYYY-MM-DD">
<a-icon slot="suffixIcon" type="calendar" />
</a-range-picker>
<a-button @click="onSearch" style="margin-left: 40px" type="primary">查询</a-button>
</div>
<div class="d3">
<v-table ref="rtable" :columns="columns" :data="tbData" :pagination="pagination" :loading="tableLoading">
<template slot="about" slot-scope="text, record">
<a-button type="primary" @click="onSale(record)"></a-button>
</template>
</v-table>
</div>
<a-modal title="10万-15万销量排行榜销量排行榜趋势图(单位:辆)" width="1200px" :footer="null" @cancel="onClose" :visible="visible">
<div class="modal-table">
<a-range-picker style="width: 360px" v-model="selTime" :disabled-date="disabledDate" valueFormat="YYYY-MM-DD">
<a-icon slot="suffixIcon" type="calendar" />
</a-range-picker>
<a-button @click="onSearch" type="primary" style="margin-left: 40px">查询</a-button>
<div class="tb-inner">
<v-echarts :opt="opt"></v-echarts>
</div>
</div>
</a-modal>
</div>
</template>
<script>
import {getCheZhuCarCategory} from "@/api/SaleRank"
import {getCheZhuCountTime} from "@/api/SaleRank"
import {getBrandName} from "@/api/comm"
import createOpt from "./opt"
import moment from "moment";
export default {
name: 'Price1015',
data() {
return {
load: false,
time: '10万-15万销量排行榜',
selTime: [],
form: {
token: '',
sStartTime: '',
sEndTime: '',
sTimeType: 4,
sPriceType: 2
},
opt: {},
//
pagination: {
pageSize: 20,
},
tbData: [],
tableLoading: false,
columns: [
{
title: "排名",
dataIndex: "id",
key: "id",
width: 120
},
{
title: "车型",
dataIndex: "seriesname",
key: "seriesname",
},
{
title: "能源类型",
dataIndex: "energys",
key: "energys",
},
{
title: "销量",
dataIndex: "salescount",
key: "salescount",
},
{
title: "售价(万元)",
dataIndex: "price",
key: "price",
},
{
title: "车型相关",
dataIndex: "about",
key: "about",
scopedSlots: { customRender: "about" },
},
],
//
visible: false,
}
},
created() {
this.form.token = this.getToken
this.getData();
},
methods: {
getData() {
this.load = true;
let o = {token: this.getToken};
getCheZhuCountTime(o).then(res => {
let data = res.data;
this.form.sStartTime = data.Data[0].Time;
this.form.sEndTime = data.Data[data.Data.length-1].Time;
let obj = {
token: this.getToken,
sTimeType: 4,
sStartTime: this.form.sStartTime + '-01',
sEndTime: this.form.sEndTime + '-01',
sPriceType: 2
}
getCheZhuCarCategory(obj).then(res => {
let data = res.data;
this.tbData = data;
let dx = [];
let ds = [];
data.forEach(ele => {
dx.push(ele.seriesname);
ds.push(ele.salescount);
})
this.opt = createOpt(dx,ds);
});
this.load = false
});
},
//
onSearch() {
this.form.sStartTime = this.selTime[0];
this.form.sEndTime = this.selTime[1];
let obj = Object.assign({},this.form);
getCheZhuCarCategory(obj).then(res => {
let data = res.data;
this.tbData = data;
let dx = [];
let ds = [];
data.forEach(ele => {
dx.push(ele.seriesname);
ds.push(ele.salescount);
})
this.opt = createOpt(dx,ds);
})
},
//
onTable() {
this.visible = true;
},
onClose() {
this.visible = false;
},
//
goBack() {
this.$router.go(-1);
},
disabledDate(current) {
return current > moment();
},
//
onSale(value) {
let seriesname = value.seriesname;
getBrandName({token: this.getToken, sSeriesName:seriesname}).then(res => {
let brandName = res.data;
this.$router.push(
{
path: '/saleRank/seriesInfo',
query: {
sBrand: brandName,
sSeriesName: seriesname
}
}
);
})
}
}
}
</script>
<style lang="less">
.p1015-outter {
width: 1552px;
border: 2px solid #0f2a4d;
.d2 {
display: flex;
justify-content: flex-start;
padding: 16px;
}
}
.modal-table {
width: 1200px;
height: 460px;
.tb-inner {
width: 100%;
height: calc(100% - 48px);
margin-top: 24px;
}
}
</style>

@ -0,0 +1,111 @@
/*
* @Author: your name
* @Date: 2021-10-12 09:12:13
* @LastEditTime: 2021-11-02 18:03:08
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/BrandInsight/brandTop/opt.js
*/
import * as echarts from "echarts";
import { bigNumberTransform } from "@/utils/gol/dataTool"
export default function createOpt(dx,ds) {
return {
grid: {
top: "16px",
left: "16px",
right: "28px",
bottom: "16px",
containLabel: true,
},
tooltip: {
trigger: "axis",
backgroundColor: "#08182F",
color: "#fff",
borderColor: "#3373CC",
textStyle: {
color: "#fff", //设置文字颜色
},
extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;",
formatter: function (params) {
var result = "";
var dotHtml =
'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:#1197b8"></span>';
params.forEach(function (item) {
result += item.axisValue + "</br>" + dotHtml + item.data;
});
return result;
},
},
xAxis: {
type: "category",
axisTick: {
show: false,
},
axisLine: {
show: false,
lineStyle: {
color: "#fff",
},
},
data: dx,
},
yAxis: {
type: "value",
axisLine: {
show: false,
lineStyle: {
color: "#FFF",
},
},
axisLabel: {
formatter: (value) => {
let str = bigNumberTransform(value);
return str;
}
},
splitLine: {
lineStyle: {
type: "dashed", // y轴分割线类型
color: "#012b4b",
},
},
},
series: [
{
name: "2001",
data: ds,
type: "bar",
barWidth: 24,
itemStyle: {
normal: {
label: {
show: true, //开启显示
position: 'top', //在上方显示
textStyle: { //数值样式
color: '#fff',
fontSize: 14
}
},
color: new echarts.graphic.LinearGradient(
0,
1,
0,
0,
[
{
offset: 0,
color: "rgba(91, 157, 249, 0)", // 0% 处的颜色
},
{
offset: 1,
color: "#3373CC", // 100% 处的颜色#3373CC
},
],
false
),
},
},
},
],
}
}

@ -0,0 +1,202 @@
<template>
<div class="p1525-outter" v-loading="load">
<v-label-div :title="time+'('+form.sStartTime+'至'+form.sEndTime+')'">
<v-btn @click="onTable"></v-btn>
<v-btn @click="goBack"></v-btn>
</v-label-div>
<div class="d2">
<a-range-picker style="width: 360px" v-model="selTime" :disabled-date="disabledDate" valueFormat="YYYY-MM-DD">
<a-icon slot="suffixIcon" type="calendar" />
</a-range-picker>
<a-button @click="onSearch" style="margin-left: 40px" type="primary">查询</a-button>
</div>
<div class="d3">
<v-table ref="rtable" :columns="columns" :data="tbData" :pagination="pagination" :loading="tableLoading">
<template slot="about" slot-scope="text, record">
<a-button type="primary" @click="onSale(record)"></a-button>
</template>
</v-table>
</div>
<a-modal title="15万-25万销量排行榜趋势图(单位:辆)" width="1200px" :footer="null" @cancel="onClose" :visible="visible">
<div class="modal-table">
<a-range-picker style="width: 360px" v-model="selTime" :disabled-date="disabledDate" valueFormat="YYYY-MM-DD">
<a-icon slot="suffixIcon" type="calendar" />
</a-range-picker>
<a-button @click="onSearch" type="primary" style="margin-left: 40px">查询</a-button>
<div class="tb-inner">
<v-echarts :opt="opt"></v-echarts>
</div>
</div>
</a-modal>
</div>
</template>
<script>
import {getCheZhuCarCategory} from "@/api/SaleRank"
import {getCheZhuCountTime} from "@/api/SaleRank"
import {getBrandName} from "@/api/comm"
import createOpt from "./opt"
import moment from "moment";
export default {
name: 'Price1525',
data() {
return {
load: false,
time: '15万-25万销量排行榜',
selTime: [],
form: {
token: '',
sStartTime: '',
sEndTime: '',
sTimeType: 4,
sPriceType: 3
},
opt: {},
//
pagination: {
pageSize: 20,
},
tbData: [],
tableLoading: false,
columns: [
{
title: "排名",
dataIndex: "id",
key: "id",
width: 120
},
{
title: "车型",
dataIndex: "seriesname",
key: "seriesname",
},
{
title: "能源类型",
dataIndex: "energys",
key: "energys",
},
{
title: "销量",
dataIndex: "salescount",
key: "salescount",
},
{
title: "售价(万元)",
dataIndex: "price",
key: "price",
},
{
title: "车型相关",
dataIndex: "about",
key: "about",
scopedSlots: { customRender: "about" },
},
],
//
visible: false,
}
},
created() {
this.form.token = this.getToken
this.getData();
},
methods: {
getData() {
this.load = true;
let o = {token: this.getToken};
getCheZhuCountTime(o).then(res => {
let data = res.data;
this.form.sStartTime = data.Data[0].Time;
this.form.sEndTime = data.Data[data.Data.length-1].Time;
let obj = {
token: this.getToken,
sTimeType: 4,
sStartTime: this.form.sStartTime + '-01',
sEndTime: this.form.sEndTime + '-01',
sPriceType: 3
}
getCheZhuCarCategory(obj).then(res => {
let data = res.data;
this.tbData = data;
let dx = [];
let ds = [];
data.forEach(ele => {
dx.push(ele.seriesname);
ds.push(ele.salescount);
})
this.opt = createOpt(dx,ds);
});
this.load = false
});
},
//
onSearch() {
this.form.sStartTime = this.selTime[0];
this.form.sEndTime = this.selTime[1];
let obj = Object.assign({},this.form);
getCheZhuCarCategory(obj).then(res => {
let data = res.data;
this.tbData = data;
let dx = [];
let ds = [];
data.forEach(ele => {
dx.push(ele.seriesname);
ds.push(ele.salescount);
})
this.opt = createOpt(dx,ds);
})
},
//
onTable() {
this.visible = true;
},
onClose() {
this.visible = false;
},
//
goBack() {
this.$router.go(-1);
},
disabledDate(current) {
return current > moment();
},
//
onSale(value) {
let seriesname = value.seriesname;
getBrandName({token: this.getToken, sSeriesName:seriesname}).then(res => {
let brandName = res.data;
this.$router.push(
{
path: '/saleRank/seriesInfo',
query: {
sBrand: brandName,
sSeriesName: seriesname
}
}
);
})
}
}
}
</script>
<style lang="less">
.p1525-outter {
width: 1552px;
border: 2px solid #0f2a4d;
.d2 {
display: flex;
justify-content: flex-start;
padding: 16px;
}
}
.modal-table {
width: 1200px;
height: 460px;
.tb-inner {
width: 100%;
height: calc(100% - 48px);
margin-top: 24px;
}
}
</style>

@ -0,0 +1,111 @@
/*
* @Author: your name
* @Date: 2021-10-12 09:12:13
* @LastEditTime: 2021-11-02 18:03:08
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/BrandInsight/brandTop/opt.js
*/
import * as echarts from "echarts";
import { bigNumberTransform } from "@/utils/gol/dataTool"
export default function createOpt(dx,ds) {
return {
grid: {
top: "16px",
left: "16px",
right: "28px",
bottom: "16px",
containLabel: true,
},
tooltip: {
trigger: "axis",
backgroundColor: "#08182F",
color: "#fff",
borderColor: "#3373CC",
textStyle: {
color: "#fff", //设置文字颜色
},
extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;",
formatter: function (params) {
var result = "";
var dotHtml =
'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:#1197b8"></span>';
params.forEach(function (item) {
result += item.axisValue + "</br>" + dotHtml + item.data;
});
return result;
},
},
xAxis: {
type: "category",
axisTick: {
show: false,
},
axisLine: {
show: false,
lineStyle: {
color: "#fff",
},
},
data: dx,
},
yAxis: {
type: "value",
axisLine: {
show: false,
lineStyle: {
color: "#FFF",
},
},
axisLabel: {
formatter: (value) => {
let str = bigNumberTransform(value);
return str;
}
},
splitLine: {
lineStyle: {
type: "dashed", // y轴分割线类型
color: "#012b4b",
},
},
},
series: [
{
name: "2001",
data: ds,
type: "bar",
barWidth: 24,
itemStyle: {
normal: {
label: {
show: true, //开启显示
position: 'top', //在上方显示
textStyle: { //数值样式
color: '#fff',
fontSize: 14
}
},
color: new echarts.graphic.LinearGradient(
0,
1,
0,
0,
[
{
offset: 0,
color: "rgba(91, 157, 249, 0)", // 0% 处的颜色
},
{
offset: 1,
color: "#3373CC", // 100% 处的颜色#3373CC
},
],
false
),
},
},
},
],
}
}

@ -0,0 +1,202 @@
<template>
<div class="p2535-outter" v-loading="load">
<v-label-div :title="time+'('+form.sStartTime+'至'+form.sEndTime+')'">
<v-btn @click="onTable"></v-btn>
<v-btn @click="goBack"></v-btn>
</v-label-div>
<div class="d2">
<a-range-picker style="width: 360px" v-model="selTime" :disabled-date="disabledDate" valueFormat="YYYY-MM-DD">
<a-icon slot="suffixIcon" type="calendar" />
</a-range-picker>
<a-button @click="onSearch" style="margin-left: 40px" type="primary">查询</a-button>
</div>
<div class="d3">
<v-table ref="rtable" :columns="columns" :data="tbData" :pagination="pagination" :loading="tableLoading">
<template slot="about" slot-scope="text, record">
<a-button type="primary" @click="onSale(record)"></a-button>
</template>
</v-table>
</div>
<a-modal title="25万-35万销量排行榜趋势图(单位:辆)" width="1200px" :footer="null" @cancel="onClose" :visible="visible">
<div class="modal-table">
<a-range-picker style="width: 360px" v-model="selTime" :disabled-date="disabledDate" valueFormat="YYYY-MM-DD">
<a-icon slot="suffixIcon" type="calendar" />
</a-range-picker>
<a-button @click="onSearch" type="primary" style="margin-left: 40px">查询</a-button>
<div class="tb-inner">
<v-echarts :opt="opt"></v-echarts>
</div>
</div>
</a-modal>
</div>
</template>
<script>
import {getCheZhuCarCategory} from "@/api/SaleRank"
import {getCheZhuCountTime} from "@/api/SaleRank"
import {getBrandName} from "@/api/comm"
import createOpt from "./opt"
import moment from "moment";
export default {
name: 'Price2535',
data() {
return {
load: false,
time: '25万-35万销量排行榜',
selTime: [],
form: {
token: '',
sStartTime: '',
sEndTime: '',
sTimeType: 4,
sPriceType: 4
},
opt: {},
//
pagination: {
pageSize: 20,
},
tbData: [],
tableLoading: false,
columns: [
{
title: "排名",
dataIndex: "id",
key: "id",
width: 120
},
{
title: "车型",
dataIndex: "seriesname",
key: "seriesname",
},
{
title: "能源类型",
dataIndex: "energys",
key: "energys",
},
{
title: "销量",
dataIndex: "salescount",
key: "salescount",
},
{
title: "售价(万元)",
dataIndex: "price",
key: "price",
},
{
title: "车型相关",
dataIndex: "about",
key: "about",
scopedSlots: { customRender: "about" },
},
],
//
visible: false,
}
},
created() {
this.form.token = this.getToken
this.getData();
},
methods: {
getData() {
this.load = true;
let o = {token: this.getToken};
getCheZhuCountTime(o).then(res => {
let data = res.data;
this.form.sStartTime = data.Data[0].Time;
this.form.sEndTime = data.Data[data.Data.length-1].Time;
let obj = {
token: this.getToken,
sTimeType: 4,
sStartTime: this.form.sStartTime + '-01',
sEndTime: this.form.sEndTime + '-01',
sPriceType: 4
}
getCheZhuCarCategory(obj).then(res => {
let data = res.data;
this.tbData = data;
let dx = [];
let ds = [];
data.forEach(ele => {
dx.push(ele.seriesname);
ds.push(ele.salescount);
})
this.opt = createOpt(dx,ds);
});
this.load = false
});
},
//
onSearch() {
this.form.sStartTime = this.selTime[0];
this.form.sEndTime = this.selTime[1];
let obj = Object.assign({},this.form);
getCheZhuCarCategory(obj).then(res => {
let data = res.data;
this.tbData = data;
let dx = [];
let ds = [];
data.forEach(ele => {
dx.push(ele.seriesname);
ds.push(ele.salescount);
})
this.opt = createOpt(dx,ds);
})
},
//
onTable() {
this.visible = true;
},
onClose() {
this.visible = false;
},
//
goBack() {
this.$router.go(-1);
},
disabledDate(current) {
return current > moment();
},
//
onSale(value) {
let seriesname = value.seriesname;
getBrandName({token: this.getToken, sSeriesName:seriesname}).then(res => {
let brandName = res.data;
this.$router.push(
{
path: '/saleRank/seriesInfo',
query: {
sBrand: brandName,
sSeriesName: seriesname
}
}
);
})
}
}
}
</script>
<style lang="less">
.p2535-outter {
width: 1552px;
border: 2px solid #0f2a4d;
.d2 {
display: flex;
justify-content: flex-start;
padding: 16px;
}
}
.modal-table {
width: 1200px;
height: 460px;
.tb-inner {
width: 100%;
height: calc(100% - 48px);
margin-top: 24px;
}
}
</style>

@ -0,0 +1,111 @@
/*
* @Author: your name
* @Date: 2021-10-12 09:12:13
* @LastEditTime: 2021-11-02 18:03:08
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/BrandInsight/brandTop/opt.js
*/
import * as echarts from "echarts";
import { bigNumberTransform } from "@/utils/gol/dataTool"
export default function createOpt(dx,ds) {
return {
grid: {
top: "16px",
left: "16px",
right: "28px",
bottom: "16px",
containLabel: true,
},
tooltip: {
trigger: "axis",
backgroundColor: "#08182F",
color: "#fff",
borderColor: "#3373CC",
textStyle: {
color: "#fff", //设置文字颜色
},
extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;",
formatter: function (params) {
var result = "";
var dotHtml =
'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:#1197b8"></span>';
params.forEach(function (item) {
result += item.axisValue + "</br>" + dotHtml + item.data;
});
return result;
},
},
xAxis: {
type: "category",
axisTick: {
show: false,
},
axisLine: {
show: false,
lineStyle: {
color: "#fff",
},
},
data: dx,
},
yAxis: {
type: "value",
axisLine: {
show: false,
lineStyle: {
color: "#FFF",
},
},
axisLabel: {
formatter: (value) => {
let str = bigNumberTransform(value);
return str;
}
},
splitLine: {
lineStyle: {
type: "dashed", // y轴分割线类型
color: "#012b4b",
},
},
},
series: [
{
name: "2001",
data: ds,
type: "bar",
barWidth: 24,
itemStyle: {
normal: {
label: {
show: true, //开启显示
position: 'top', //在上方显示
textStyle: { //数值样式
color: '#fff',
fontSize: 14
}
},
color: new echarts.graphic.LinearGradient(
0,
1,
0,
0,
[
{
offset: 0,
color: "rgba(91, 157, 249, 0)", // 0% 处的颜色
},
{
offset: 1,
color: "#3373CC", // 100% 处的颜色#3373CC
},
],
false
),
},
},
},
],
}
}

@ -0,0 +1,202 @@
<template>
<div class="p3550-outter" v-loading="load">
<v-label-div :title="time+'('+form.sStartTime+'至'+form.sEndTime+')'">
<v-btn @click="onTable"></v-btn>
<v-btn @click="goBack"></v-btn>
</v-label-div>
<div class="d2">
<a-range-picker style="width: 360px" v-model="selTime" :disabled-date="disabledDate" valueFormat="YYYY-MM-DD">
<a-icon slot="suffixIcon" type="calendar" />
</a-range-picker>
<a-button @click="onSearch" style="margin-left: 40px" type="primary">查询</a-button>
</div>
<div class="d3">
<v-table ref="rtable" :columns="columns" :data="tbData" :pagination="pagination" :loading="tableLoading">
<template slot="about" slot-scope="text, record">
<a-button type="primary" @click="onSale(record)"></a-button>
</template>
</v-table>
</div>
<a-modal title="35万-50万销量排行榜趋势图(单位:辆)" width="1200px" :footer="null" @cancel="onClose" :visible="visible">
<div class="modal-table">
<a-range-picker style="width: 360px" v-model="selTime" :disabled-date="disabledDate" valueFormat="YYYY-MM-DD">
<a-icon slot="suffixIcon" type="calendar" />
</a-range-picker>
<a-button @click="onSearch" type="primary" style="margin-left: 40px">查询</a-button>
<div class="tb-inner">
<v-echarts :opt="opt"></v-echarts>
</div>
</div>
</a-modal>
</div>
</template>
<script>
import {getCheZhuCarCategory} from "@/api/SaleRank"
import {getCheZhuCountTime} from "@/api/SaleRank"
import {getBrandName} from "@/api/comm"
import createOpt from "./opt"
import moment from "moment";
export default {
name: 'Price3550',
data() {
return {
load: false,
time: '35万-50万销量排行榜',
selTime: [],
form: {
token: '',
sStartTime: '',
sEndTime: '',
sTimeType: 4,
sPriceType: 1
},
opt: {},
//
pagination: {
pageSize: 20,
},
tbData: [],
tableLoading: false,
columns: [
{
title: "排名",
dataIndex: "id",
key: "id",
width: 120
},
{
title: "车型",
dataIndex: "seriesname",
key: "seriesname",
},
{
title: "能源类型",
dataIndex: "energys",
key: "energys",
},
{
title: "销量",
dataIndex: "salescount",
key: "salescount",
},
{
title: "售价(万元)",
dataIndex: "price",
key: "price",
},
{
title: "车型相关",
dataIndex: "about",
key: "about",
scopedSlots: { customRender: "about" },
},
],
//
visible: false,
}
},
created() {
this.form.token = this.getToken
this.getData();
},
methods: {
getData() {
this.load = true;
let o = {token: this.getToken};
getCheZhuCountTime(o).then(res => {
let data = res.data;
this.form.sStartTime = data.Data[0].Time;
this.form.sEndTime = data.Data[data.Data.length-1].Time;
let obj = {
token: this.getToken,
sTimeType: 4,
sStartTime: this.form.sStartTime + '-01',
sEndTime: this.form.sEndTime + '-01',
sPriceType: 1
}
getCheZhuCarCategory(obj).then(res => {
let data = res.data;
this.tbData = data;
let dx = [];
let ds = [];
data.forEach(ele => {
dx.push(ele.seriesname);
ds.push(ele.salescount);
})
this.opt = createOpt(dx,ds);
});
this.load = false
});
},
//
onSearch() {
this.form.sStartTime = this.selTime[0];
this.form.sEndTime = this.selTime[1];
let obj = Object.assign({},this.form);
getCheZhuCarCategory(obj).then(res => {
let data = res.data;
this.tbData = data;
let dx = [];
let ds = [];
data.forEach(ele => {
dx.push(ele.seriesname);
ds.push(ele.salescount);
})
this.opt = createOpt(dx,ds);
})
},
//
onTable() {
this.visible = true;
},
onClose() {
this.visible = false;
},
//
goBack() {
this.$router.go(-1);
},
disabledDate(current) {
return current > moment();
},
//
onSale(value) {
let seriesname = value.seriesname;
getBrandName({token: this.getToken, sSeriesName:seriesname}).then(res => {
let brandName = res.data;
this.$router.push(
{
path: '/saleRank/seriesInfo',
query: {
sBrand: brandName,
sSeriesName: seriesname
}
}
);
})
}
}
}
</script>
<style lang="less">
.p3550-outter {
width: 1552px;
border: 2px solid #0f2a4d;
.d2 {
display: flex;
justify-content: flex-start;
padding: 16px;
}
}
.modal-table {
width: 1200px;
height: 460px;
.tb-inner {
width: 100%;
height: calc(100% - 48px);
margin-top: 24px;
}
}
</style>

@ -0,0 +1,111 @@
/*
* @Author: your name
* @Date: 2021-10-12 09:12:13
* @LastEditTime: 2021-11-02 18:03:08
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/BrandInsight/brandTop/opt.js
*/
import * as echarts from "echarts";
import { bigNumberTransform } from "@/utils/gol/dataTool"
export default function createOpt(dx,ds) {
return {
grid: {
top: "16px",
left: "16px",
right: "28px",
bottom: "16px",
containLabel: true,
},
tooltip: {
trigger: "axis",
backgroundColor: "#08182F",
color: "#fff",
borderColor: "#3373CC",
textStyle: {
color: "#fff", //设置文字颜色
},
extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;",
formatter: function (params) {
var result = "";
var dotHtml =
'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:#1197b8"></span>';
params.forEach(function (item) {
result += item.axisValue + "</br>" + dotHtml + item.data;
});
return result;
},
},
xAxis: {
type: "category",
axisTick: {
show: false,
},
axisLine: {
show: false,
lineStyle: {
color: "#fff",
},
},
data: dx,
},
yAxis: {
type: "value",
axisLine: {
show: false,
lineStyle: {
color: "#FFF",
},
},
axisLabel: {
formatter: (value) => {
let str = bigNumberTransform(value);
return str;
}
},
splitLine: {
lineStyle: {
type: "dashed", // y轴分割线类型
color: "#012b4b",
},
},
},
series: [
{
name: "2001",
data: ds,
type: "bar",
barWidth: 24,
itemStyle: {
normal: {
label: {
show: true, //开启显示
position: 'top', //在上方显示
textStyle: { //数值样式
color: '#fff',
fontSize: 14
}
},
color: new echarts.graphic.LinearGradient(
0,
1,
0,
0,
[
{
offset: 0,
color: "rgba(91, 157, 249, 0)", // 0% 处的颜色
},
{
offset: 1,
color: "#3373CC", // 100% 处的颜色#3373CC
},
],
false
),
},
},
},
],
}
}

@ -0,0 +1,202 @@
<template>
<div class="p10-outter" v-loading="load">
<v-label-div :title="time+'('+form.sStartTime+'至'+form.sEndTime+')'">
<v-btn @click="onTable"></v-btn>
<v-btn @click="goBack"></v-btn>
</v-label-div>
<div class="d2">
<a-range-picker style="width: 360px" v-model="selTime" :disabled-date="disabledDate" valueFormat="YYYY-MM-DD">
<a-icon slot="suffixIcon" type="calendar" />
</a-range-picker>
<a-button @click="onSearch" style="margin-left: 40px" type="primary">查询</a-button>
</div>
<div class="d3">
<v-table ref="rtable" :columns="columns" :data="tbData" :pagination="pagination" :loading="tableLoading">
<template slot="about" slot-scope="text, record">
<a-button type="primary" @click="onSale(record)"></a-button>
</template>
</v-table>
</div>
<a-modal title="50万以上销量排行榜趋势图(单位:辆)" width="1200px" :footer="null" @cancel="onClose" :visible="visible">
<div class="modal-table">
<a-range-picker style="width: 360px" v-model="selTime" :disabled-date="disabledDate" valueFormat="YYYY-MM-DD">
<a-icon slot="suffixIcon" type="calendar" />
</a-range-picker>
<a-button @click="onSearch" type="primary" style="margin-left: 40px">查询</a-button>
<div class="tb-inner">
<v-echarts :opt="opt"></v-echarts>
</div>
</div>
</a-modal>
</div>
</template>
<script>
import {getCheZhuCarCategory} from "@/api/SaleRank"
import {getCheZhuCountTime} from "@/api/SaleRank"
import {getBrandName} from "@/api/comm"
import createOpt from "./opt"
import moment from "moment";
export default {
name: 'Price50',
data() {
return {
load: false,
time: '50万以上销量排行榜',
selTime: [],
form: {
token: '',
sStartTime: '',
sEndTime: '',
sTimeType: 4,
sPriceType: 6
},
opt: {},
//
pagination: {
pageSize: 20,
},
tbData: [],
tableLoading: false,
columns: [
{
title: "排名",
dataIndex: "id",
key: "id",
width: 120
},
{
title: "车型",
dataIndex: "seriesname",
key: "seriesname",
},
{
title: "能源类型",
dataIndex: "energys",
key: "energys",
},
{
title: "销量",
dataIndex: "salescount",
key: "salescount",
},
{
title: "售价(万元)",
dataIndex: "price",
key: "price",
},
{
title: "车型相关",
dataIndex: "about",
key: "about",
scopedSlots: { customRender: "about" },
},
],
//
visible: false,
}
},
created() {
this.form.token = this.getToken
this.getData();
},
methods: {
getData() {
this.load = true;
let o = {token: this.getToken};
getCheZhuCountTime(o).then(res => {
let data = res.data;
this.form.sStartTime = data.Data[0].Time;
this.form.sEndTime = data.Data[data.Data.length-1].Time;
let obj = {
token: this.getToken,
sTimeType: 4,
sStartTime: this.form.sStartTime + '-01',
sEndTime: this.form.sEndTime + '-01',
sPriceType: 6
}
getCheZhuCarCategory(obj).then(res => {
let data = res.data;
this.tbData = data;
let dx = [];
let ds = [];
data.forEach(ele => {
dx.push(ele.seriesname);
ds.push(ele.salescount);
})
this.opt = createOpt(dx,ds);
});
this.load = false
});
},
//
onSearch() {
this.form.sStartTime = this.selTime[0];
this.form.sEndTime = this.selTime[1];
let obj = Object.assign({},this.form);
getCheZhuCarCategory(obj).then(res => {
let data = res.data;
this.tbData = data;
let dx = [];
let ds = [];
data.forEach(ele => {
dx.push(ele.seriesname);
ds.push(ele.salescount);
})
this.opt = createOpt(dx,ds);
})
},
//
onTable() {
this.visible = true;
},
onClose() {
this.visible = false;
},
//
goBack() {
this.$router.go(-1);
},
disabledDate(current) {
return current > moment();
},
//
onSale(value) {
let seriesname = value.seriesname;
getBrandName({token: this.getToken, sSeriesName:seriesname}).then(res => {
let brandName = res.data;
this.$router.push(
{
path: '/saleRank/seriesInfo',
query: {
sBrand: brandName,
sSeriesName: seriesname
}
}
);
})
}
}
}
</script>
<style lang="less">
.p10-outter {
width: 1552px;
border: 2px solid #0f2a4d;
.d2 {
display: flex;
justify-content: flex-start;
padding: 16px;
}
}
.modal-table {
width: 1200px;
height: 460px;
.tb-inner {
width: 100%;
height: calc(100% - 48px);
margin-top: 24px;
}
}
</style>

@ -0,0 +1,111 @@
/*
* @Author: your name
* @Date: 2021-10-12 09:12:13
* @LastEditTime: 2021-11-02 18:03:08
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/BrandInsight/brandTop/opt.js
*/
import * as echarts from "echarts";
import { bigNumberTransform } from "@/utils/gol/dataTool"
export default function createOpt(dx,ds) {
return {
grid: {
top: "16px",
left: "16px",
right: "28px",
bottom: "16px",
containLabel: true,
},
tooltip: {
trigger: "axis",
backgroundColor: "#08182F",
color: "#fff",
borderColor: "#3373CC",
textStyle: {
color: "#fff", //设置文字颜色
},
extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;",
formatter: function (params) {
var result = "";
var dotHtml =
'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:#1197b8"></span>';
params.forEach(function (item) {
result += item.axisValue + "</br>" + dotHtml + item.data;
});
return result;
},
},
xAxis: {
type: "category",
axisTick: {
show: false,
},
axisLine: {
show: false,
lineStyle: {
color: "#fff",
},
},
data: dx,
},
yAxis: {
type: "value",
axisLine: {
show: false,
lineStyle: {
color: "#FFF",
},
},
axisLabel: {
formatter: (value) => {
let str = bigNumberTransform(value);
return str;
}
},
splitLine: {
lineStyle: {
type: "dashed", // y轴分割线类型
color: "#012b4b",
},
},
},
series: [
{
name: "2001",
data: ds,
type: "bar",
barWidth: 24,
itemStyle: {
normal: {
label: {
show: true, //开启显示
position: 'top', //在上方显示
textStyle: { //数值样式
color: '#fff',
fontSize: 14
}
},
color: new echarts.graphic.LinearGradient(
0,
1,
0,
0,
[
{
offset: 0,
color: "rgba(91, 157, 249, 0)", // 0% 处的颜色
},
{
offset: 1,
color: "#3373CC", // 100% 处的颜色#3373CC
},
],
false
),
},
},
},
],
}
}

@ -181,7 +181,15 @@ export default {
},
//
onSalePro(record) {
let obj = Object.assign(this.form, {sProv: record.key})
let obj = {
token: this.form.token,
sTimeType: 4,
sStartTime: this.form.sStartTime,
sEndTime: this.form.sEndTime,
sBrandType: '',
iPageIndex: 1,
sProv: record.key
}
getSalesType0(obj).then(res => {
let data = res.data;
this.dataProCity = data
@ -197,7 +205,15 @@ export default {
this.visible = true;
},
onSaleCity(record) {
let obj = Object.assign(this.form, {sCity: record.key})
let obj = {
token: this.form.token,
sTimeType: 4,
sStartTime: this.form.sStartTime,
sEndTime: this.form.sEndTime,
sBrandType: '',
iPageIndex: 1,
sCity: record.key
}
getSalesType6(obj).then(res => {
let data = res.data;
this.dataCityBrand = data

Loading…
Cancel
Save