张雄 3 years ago
parent 7c86879345
commit 62386ca077

@ -169,6 +169,45 @@ export function getCheZhuCarBrandRanking(params) {
})
}
// 汽车品牌销量-汽车品牌销量排行榜列表-点击销量
export function getCheZhuCarBrandTimeRanking(params) {
let obj = Object.assign({action: 'getCheZhuCarBrandTimeRanking', sType: 'Marketing'}, params)
return httpService({
url: `/api/v6.ashx`,
method: 'post',
data: obj,
headers: {
'content-type': 'application/x-www-form-urlencoded'
}
})
}
// 汽车品牌销量-汽车品牌销量排行榜列表-点击销量-点击详情销量
export function getCheZhuCarBrandSeriesRanking(params) {
let obj = Object.assign({action: 'getCheZhuCarBrandSeriesRanking', sType: 'Marketing'}, params)
return httpService({
url: `/api/v6.ashx`,
method: 'post',
data: obj,
headers: {
'content-type': 'application/x-www-form-urlencoded'
}
})
}
// 汽车品牌销量-汽车品牌销量排行榜列表-点击销量-点击详情销量-点击销量
// export function getCheZhuCarSeriesList(params) {
// let obj = Object.assign({action: 'getCheZhuCarSeriesList', sType: 'Marketing'}, params)
// return httpService({
// url: `/api/v6.ashx`,
// method: 'post',
// data: obj,
// headers: {
// 'content-type': 'application/x-www-form-urlencoded'
// }
// })
// }
// 车型销量-车型销量排行榜列表
export function getCheZhuCarSeriesRanking(params) {
let obj = Object.assign({action: 'getCheZhuCarSeriesRanking', sType: 'Marketing'}, params)

@ -227,7 +227,15 @@ const router = [
},
////
{
path: 'seriesInfo', //微型车
path: 'brandInfo', //汽车品牌销量-销量
component: resolve => require(['@/views/SaleRank/BrandInfo/index.vue'], resolve),
},
{
path: 'brandInfoDetail', //汽车品牌销量-销量-详细销量
component: resolve => require(['@/views/SaleRank/BrandInfoDetail/index.vue'], resolve),
},
{
path: 'seriesInfo', //车型销量-销量
component: resolve => require(['@/views/SaleRank/SeriesInfo/index.vue'], resolve),
},
]

@ -34,6 +34,7 @@
<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 {
@ -69,6 +70,11 @@ export default {
dataIndex: "seriesname",
key: "seriesname",
},
{
title: "能源类型",
dataIndex: "energys",
key: "energys",
},
{
title: "销量",
dataIndex: "salescount",
@ -156,8 +162,19 @@ export default {
},
//
onSale(value) {
let id = value.seriesid
console.log(id)
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
}
}
);
})
}
}
}

@ -0,0 +1,159 @@
<template>
<div class="binfo-outter">
<v-label-div :title="time">
<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" :loading="tableLoad" :data="tbData" :pagination="pagination" @change="handlerPagnation">
<template slot="about" slot-scope="text, record">
<a-button @click="onSale(record)"></a-button>
</template>
</v-table>
</div>
</div>
</template>
<script>
import {getCheZhuCarBrandTimeRanking} from "@/api/SaleRank"
import moment from "moment";
export default {
name: "BrandInfo",
data() {
return {
form: {
token: '',
sTimeType: 4,
sStartTime: '',
sEndTime: '',
iPageIndex: 1,
iPageSize: 20,
sBrand: '',
},
time: '销量',
selTime: [],
//
tableLoad: false,
columns: [
{
title: "时间",
dataIndex: "sourcetime",
key: "sourcetime",
width: 240
},
{
title: "销量",
dataIndex: "salescount",
key: "salescount",
},
{
title: "在售品牌份额(%)",
dataIndex: "percentage",
key: "percentage"
},
{
title: "详细销量",
dataIndex: "about",
key: "about",
scopedSlots: { customRender: "about" },
},
],
tbData: [],
pagination: {
current: 1,
pageSize: 20,
total: 0
},
}
},
created() {
this.time = this.$route.query.sBrand + '汽车销量'
this.form.token = this.getToken;
this.form.sBrand = this.$route.query.sBrand;
this.form.sStartTime = this.$route.query.sStartTime;
this.form.sEndTime = this.$route.query.sEndTime;
this.getData();
},
methods: {
getData() {
let obj = Object.assign(this.form, {});
getCheZhuCarBrandTimeRanking(obj).then(res => {
let data = res.data;
this.time = this.$route.query.sBrand + '汽车销量(' + data[0].sourcetime +')';
this.pagination.total = res.totalNum
this.tbData = data;
})
},
//
onSearch() {
this.tableLoad = true;
this.form.sStartTime = this.selTime[0];
this.form.sEndTime = this.selTime[1];
getCheZhuCarBrandTimeRanking(this.form).then(res => {
let data = res.data;
this.time = this.$route.query.sBrand + '汽车销量(' + data[0].sourcetime +')';
this.pagination.total = res.totalNum
this.tbData = data;
this.tableLoad = false
})
},
//
handlerPagnation(page) {
this.tableLoad = true;
let cur = page.current;
this.pagination.current = cur;
this.form.iPageIndex = cur;
getCheZhuCarBrandTimeRanking(this.form).then(res => {
let data = res.data;
this.pagination.total = res.totalNum
this.tbData = data;
this.tableLoad = false
})
},
//
onTable() {},
//
goBack() {
this.$router.go(-1);
},
disabledDate(current) {
return current > moment();
},
//
onSale(record) {
let sourcetime = record.sourcetime;
this.$router.push(
{
path: '/saleRank/brandInfoDetail',
query: {
sourcetime: sourcetime,
sBrand: this.$route.query.sBrand
}
}
);
}
}
}
</script>
<style lang="less">
.binfo-outter {
width: 1552px;
// height: 460px;
border: 2px solid #0f2a4d;
.d2 {
display: flex;
justify-content: flex-start;
padding: 16px;
}
.d3 {
padding: 16px;
}
}
</style>

@ -0,0 +1,169 @@
<template>
<div class="binfo-outter">
<v-label-div :title="time">
<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" :loading="tableLoad" :data="tbData" :pagination="pagination" @change="handlerPagnation">
<template slot="about" slot-scope="text, record">
<a-button @click="onSale(record)"></a-button>
</template>
</v-table>
</div>
</div>
</template>
<script>
import {getCheZhuCarBrandSeriesRanking} from "@/api/SaleRank"
import moment from "moment";
export default {
name: "BrandInfoDetail",
data() {
return {
form: {
token: '',
sTimeType: 4,
sStartTime: '',
sEndTime: '',
iPageIndex: 1,
iPageSize: 20,
sBrand: '',
},
time: '销量',
selTime: [],
//
tableLoad: false,
columns: [
{
title: "车型",
dataIndex: "carseries",
key: "carseries",
width: 240
},
{
title: "销量(辆)",
dataIndex: "salescount",
key: "salescount",
},
{
title: "所属级别",
dataIndex: "specname",
key: "specname"
},
{
title: "级别排名",
dataIndex: "specpm",
key: "specpm"
},
{
title: "厂商排名",
dataIndex: "salespm",
key: "salespm"
},
{
title: "车型相关",
dataIndex: "about",
key: "about",
scopedSlots: { customRender: "about" },
},
],
tbData: [],
pagination: {
current: 1,
pageSize: 20,
total: 0
},
}
},
created() {
this.time = this.$route.query.sBrand + '汽车销量'
this.form.token = this.getToken;
this.form.sBrand = this.$route.query.sBrand;
this.form.sStartTime = this.$route.query.sourcetime + '-01';
this.form.sEndTime = this.$route.query.sourcetime + '-28';
this.getData();
},
methods: {
getData() {
let obj = Object.assign(this.form, {});
getCheZhuCarBrandSeriesRanking(obj).then(res => {
let data = res.data;
this.time = this.$route.query.sBrand + '销量详情(' + data[0].sourcetime +')';
this.pagination.total = res.totalNum
this.tbData = data;
})
},
//
// onSearch() {
// this.tableLoad = true;
// this.form.sStartTime = this.selTime[0];
// this.form.sEndTime = this.selTime[1];
// getCheZhuCarBrandSeriesRanking(this.form).then(res => {
// let data = res.data;
// this.time = this.$route.query.sBrand + '(' + data[0].sourcetime +')';
// this.pagination.total = res.totalNum
// this.tbData = data;
// this.tableLoad = false
// })
// },
//
handlerPagnation(page) {
this.tableLoad = true;
let cur = page.current;
this.pagination.current = cur;
this.form.iPageIndex = cur;
getCheZhuCarBrandSeriesRanking(this.form).then(res => {
let data = res.data;
this.pagination.total = res.totalNum
this.tbData = data;
this.tableLoad = false
})
},
//
onTable() {},
//
goBack() {
this.$router.go(-1);
},
disabledDate(current) {
return current > moment();
},
//
onSale(record) {
let carseries = record.carseries
this.$router.push(
{
path: '/saleRank/seriesInfo',
query: {
sBrand: this.$route.query.sBrand,
sSeriesName: carseries
}
}
);
}
}
}
</script>
<style lang="less">
.binfo-outter {
width: 1552px;
// height: 460px;
border: 2px solid #0f2a4d;
.d2 {
display: flex;
justify-content: flex-start;
padding: 16px;
}
.d3 {
padding: 16px;
}
}
</style>

@ -1,6 +1,6 @@
<template>
<div class="bs-outter">
<v-label-div :title="time">
<v-label-div :title="time+'('+form.sStartTime+'至'+form.sEndTime+')'">
<v-btn>查看图表</v-btn>
<v-btn @click="goBack"></v-btn>
</v-label-div>
@ -11,9 +11,9 @@
<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">
<template slot="about">
<a-button>销量</a-button>
<v-table ref="rtable" :columns="columns" :loading="tableLoad" :data="tbData" :pagination="pagination" @change="handlerPagnation">
<template slot="about" slot-scope="text, record">
<a-button @click="onSale(record)"></a-button>
</template>
</v-table>
</div>
@ -39,6 +39,7 @@ export default {
selTime: [],
time: '汽车品牌销量排行榜',
//
tableLoad: false,
columns: [
{
title: "排名",
@ -47,7 +48,12 @@ export default {
width: 120
},
{
title: "品牌",
title: "品牌logo",
dataIndex: "img",
key: "img",
},
{
title: "品牌名称",
dataIndex: "brand",
key: "brand",
},
@ -57,12 +63,12 @@ export default {
key: "salescount",
},
{
title: "占品牌份额",
title: "占品牌份额(%)",
dataIndex: "percentage",
key: "percentage"
},
{
title: "品牌相关",
title: "车型相关",
dataIndex: "about",
key: "about",
scopedSlots: { customRender: "about" },
@ -70,7 +76,9 @@ export default {
],
tbData: [],
pagination: {
current: 1,
pageSize: 20,
total: 0
},
}
},
@ -80,22 +88,25 @@ export default {
},
methods: {
getData() {
this.tableLoad = 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;
this.form.sStartTime = data.Data[0].Time + '-01';
this.form.sEndTime = data.Data[data.Data.length-1].Time + '-01';
let obj = {
token: this.getToken,
sTimeType: 4,
sStartTime: this.form.sStartTime + '-01',
sEndTime: this.form.sEndTime + '-01',
sStartTime: this.form.sStartTime,
sEndTime: this.form.sEndTime,
iPageIndex: 1,
iPageSize: 20,
}
getCheZhuCarBrandRanking(obj).then(res => {
let data = res.data;
console.log(data)
this.pagination.total = res.totalNum
this.tbData = data;
this.tableLoad = false
})
});
},
@ -108,9 +119,42 @@ export default {
},
//
onSearch() {
this.tableLoad = true;
this.form.sStartTime = this.selTime[0];
this.form.sEndTime = this.selTime[1];
this.getData();
getCheZhuCarBrandRanking(this.form).then(res => {
let data = res.data;
this.pagination.total = res.totalNum
this.tbData = data;
this.tableLoad = false
})
},
//
onSale(record) {
let sBrand = record.brand;
this.$router.push(
{
path: '/saleRank/brandInfo',
query: {
sBrand: sBrand,
sStartTime: this.form.sStartTime,
sEndTime: this.form.sEndTime
}
}
);
},
//
handlerPagnation(page) {
this.tableLoad = true;
let cur = page.current;
this.pagination.current = cur;
this.form.iPageIndex = cur;
getCheZhuCarBrandRanking(this.form).then(res => {
let data = res.data;
this.pagination.total = res.totalNum
this.tbData = data;
this.tableLoad = false
})
},
}
}

@ -4,6 +4,10 @@
<v-btn @click="onTable"></v-btn>
<v-btn @click="goBack"></v-btn>
</v-label-div>
<div class="d3">
<v-table ref="rtable" :columns="columns" :loading="tableLoad" :data="tbData" :pagination="pagination" @change="handlerPagnation">
</v-table>
</div>
</div>
</template>
@ -20,20 +24,59 @@ export default {
sBrand: '',
sSeriesName: '',
},
time: '销量'
time: '销量',
//
tableLoad: false,
columns: [
{
title: "日期",
dataIndex: "sourcetime",
key: "sourcetime",
width: 240
},
{
title: "销量(辆)",
dataIndex: "salescount",
key: "salescount",
},
{
title: "所属级别",
dataIndex: "specname",
key: "specname"
},
{
title: "级别排名",
dataIndex: "specpm",
key: "specpm"
},
{
title: "厂商排名",
dataIndex: "salespm",
key: "salespm"
},
],
tbData: [],
pagination: {
current: 1,
pageSize: 20,
total: 0
},
}
},
created() {
this.form.token = this.getToken;
// this.form.sBrand = this.$route.query.sBrand || "";
// this.form.sSeriesName = this.$route.query.sSeriesName || "";
this.time = this.$route.query.sSeriesName + '销量'
this.form.sBrand = this.$route.query.sBrand || "";
this.form.sSeriesName = this.$route.query.sSeriesName || "";
this.getData();
},
methods: {
getData() {
let obj = Object.assign(this.form, {});
getCheZhuCarSeriesList(obj).then(res => {
console.log(res)
let data = res.data;
this.pagination.total = res.totalNum;
this.tbData = data;
})
},
//
@ -42,6 +85,23 @@ export default {
goBack() {
this.$router.go(-1);
},
//
handlerPagnation(page) {
this.tableLoad = true;
let cur = page.current;
this.pagination.current = cur;
this.form.iPageIndex = cur;
getCheZhuCarSeriesList(this.form).then(res => {
let data = res.data;
this.pagination.total = res.totalNum
this.tbData = data;
this.tableLoad = false
})
},
//
onTable() {
}
}
}
</script>
@ -51,5 +111,8 @@ export default {
width: 1552px;
// height: 460px;
border: 2px solid #0f2a4d;
.d3 {
padding: 16px;
}
}
</style>

@ -1,6 +1,6 @@
<template>
<div class="ses-outter">
<v-label-div :title="time">
<v-label-div :title="time+'('+form.sStartTime+'至'+form.sEndTime+')'">
<v-btn @click="onTable"></v-btn>
<v-btn @click="goBack"></v-btn>
</v-label-div>
@ -141,7 +141,6 @@ export default {
},
//
onSale(record) {
console.log(record)
let sBrand = record.brand;
let sSeriesName = record.seriesname;
this.$router.push(

Loading…
Cancel
Save