|
|
|
@ -10,7 +10,7 @@
|
|
|
|
|
<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">
|
|
|
|
|
<v-table ref="rtable" :columns="columns" :data="tbData" :pagination="pagination" @change="handlerPagnation" :loading="tableLoading">
|
|
|
|
|
<template slot="about" slot-scope="text, record">
|
|
|
|
|
<a-button type="primary" @click="onSale(record)">销量</a-button>
|
|
|
|
|
</template>
|
|
|
|
@ -47,12 +47,15 @@ export default {
|
|
|
|
|
sStartTime: '',
|
|
|
|
|
sEndTime: '',
|
|
|
|
|
sTimeType: 4,
|
|
|
|
|
sEnergyType: 2
|
|
|
|
|
sEnergyType: 2,
|
|
|
|
|
iPageIndex: 1,
|
|
|
|
|
},
|
|
|
|
|
opt: {},
|
|
|
|
|
//表格
|
|
|
|
|
pagination: {
|
|
|
|
|
current: 1,
|
|
|
|
|
pageSize: 20,
|
|
|
|
|
total: 0,
|
|
|
|
|
},
|
|
|
|
|
tbData: [],
|
|
|
|
|
tableLoading: false,
|
|
|
|
@ -67,16 +70,19 @@ export default {
|
|
|
|
|
title: "车型",
|
|
|
|
|
dataIndex: "seriesname",
|
|
|
|
|
key: "seriesname",
|
|
|
|
|
width: 240
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "能源类型",
|
|
|
|
|
dataIndex: "energys",
|
|
|
|
|
key: "energys",
|
|
|
|
|
width: 240
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "销量",
|
|
|
|
|
dataIndex: "salescount",
|
|
|
|
|
key: "salescount",
|
|
|
|
|
width: 240
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "售价(万元)",
|
|
|
|
@ -117,6 +123,7 @@ export default {
|
|
|
|
|
sEnergyType: 2
|
|
|
|
|
}
|
|
|
|
|
getCheZhuCarCategory(obj).then(res => {
|
|
|
|
|
this.pagination.total = res.totalNum
|
|
|
|
|
let data = res.data;
|
|
|
|
|
this.tbData = data;
|
|
|
|
|
let dx = [];
|
|
|
|
@ -130,6 +137,26 @@ export default {
|
|
|
|
|
this.load = false
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
//改变页面数据
|
|
|
|
|
handlerPagnation(page) {
|
|
|
|
|
this.tableLoad = true;
|
|
|
|
|
let cur = page.current;
|
|
|
|
|
this.pagination.current = cur;
|
|
|
|
|
this.form.iPageIndex = cur;
|
|
|
|
|
getCheZhuCarCategory(this.form).then(res => {
|
|
|
|
|
let data = res.data;
|
|
|
|
|
this.pagination.total = res.totalNum
|
|
|
|
|
this.tbData = data;
|
|
|
|
|
let dx = [];
|
|
|
|
|
let ds = [];
|
|
|
|
|
data.forEach(ele => {
|
|
|
|
|
dx.push(ele.seriesname);
|
|
|
|
|
ds.push(ele.salescount);
|
|
|
|
|
})
|
|
|
|
|
this.opt = createOpt(dx,ds);
|
|
|
|
|
this.tableLoad = false
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
//查询
|
|
|
|
|
onSearch() {
|
|
|
|
|
this.form.sStartTime = this.selTime[0];
|
|
|
|
|