prod
parent
579e1e2abe
commit
25e6be8212
@ -0,0 +1,72 @@
|
||||
<template>
|
||||
<div class="sfc-outter" v-loading="load">
|
||||
<v-label-div :title="'销量对比('+time+')'"> </v-label-div>
|
||||
<div class="sfc-inner">
|
||||
<v-echarts :opt="opt"></v-echarts>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getCheZhuCountTimeC} from "@/api/BrandComparison/index.js";
|
||||
import createOpt from "./opt";
|
||||
export default {
|
||||
name: "saleFormComparison",
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
token: '',
|
||||
sBrand: '',
|
||||
sSeriesName: ''
|
||||
},
|
||||
opt: {},
|
||||
load: false,
|
||||
time: ''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.initData();
|
||||
},
|
||||
methods: {
|
||||
initData() {
|
||||
this.form.token = this.getToken;
|
||||
let arr = this.getBComparison;
|
||||
let brands = [];
|
||||
arr.forEach((ele) => {
|
||||
brands.push(ele.name);
|
||||
});
|
||||
this.form.sBrand = brands.toString();
|
||||
this.getData();
|
||||
},
|
||||
getData() {
|
||||
this.load = true;
|
||||
let obj = Object.assign({}, this.form);
|
||||
getCheZhuCountTimeC(obj).then(res => {
|
||||
let data = res.data.Data;
|
||||
this.time = res.data.Time;
|
||||
let dx = [];
|
||||
let ds = [];
|
||||
data.forEach(ele => {
|
||||
let key = ele.key;
|
||||
let value = ele.value;
|
||||
dx.push(key);
|
||||
ds.push(value);
|
||||
});
|
||||
this.opt = createOpt(dx, ds);
|
||||
this.load = false;
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.sfc-outter {
|
||||
width: 1880px;
|
||||
height: 412px;
|
||||
.sfc-inner {
|
||||
width: 100%;
|
||||
height: calc(100% - 48px);
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,114 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-12 10:11:24
|
||||
* @LastEditTime: 2021-11-19 19:47:53
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/BrandInsight/titsopo/opt.js
|
||||
*/
|
||||
import { bigNumberTransform } from "@/utils/gol/dataTool"
|
||||
function createData(ds = []) {
|
||||
let testData = {}
|
||||
ds.forEach(item => {
|
||||
item.forEach(val => {
|
||||
if (testData[val.key] === undefined) {
|
||||
testData[val.key] = {
|
||||
name: val.key,
|
||||
type: 'line',
|
||||
symbol: 'none',
|
||||
areaStyle: {
|
||||
opacity: 0.2
|
||||
},
|
||||
emphasis: {
|
||||
focus: 'series'
|
||||
},
|
||||
data: [val.value],
|
||||
markPoint: {
|
||||
data: [],
|
||||
}
|
||||
};
|
||||
} else {
|
||||
testData[val.key].data.push(val.value)
|
||||
}
|
||||
})
|
||||
})
|
||||
let arr = [];
|
||||
for(let key in testData) {
|
||||
arr.push(testData[key])
|
||||
}
|
||||
return arr
|
||||
}
|
||||
export default function createOpt(dx = [], ds = []) {
|
||||
let data = createData(ds);
|
||||
return {
|
||||
grid: {
|
||||
left: 10,
|
||||
right: '5%',
|
||||
bottom: 10,
|
||||
top: 52,
|
||||
containLabel: true
|
||||
},
|
||||
tooltip: {
|
||||
trigger: "axis",
|
||||
backgroundColor: "#08182F",
|
||||
color: "#fff",
|
||||
borderColor: "#3373CC",
|
||||
textStyle: {
|
||||
color: "#fff", //设置文字颜色
|
||||
},
|
||||
extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;"
|
||||
},
|
||||
legend: {
|
||||
icon: 'roundRect',
|
||||
textStyle: { //图例文字的样式
|
||||
color: '#fff',
|
||||
fontSize: 10
|
||||
},
|
||||
y: 12,
|
||||
x: 16,
|
||||
itemWidth: 12,
|
||||
itemHeight: 12
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
axisTick: {
|
||||
show: false,
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: (value) => {
|
||||
return value
|
||||
}
|
||||
},
|
||||
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: data
|
||||
}
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
<template>
|
||||
<div class="sfc-outter">
|
||||
<v-label-div title="销量对比"> </v-label-div>
|
||||
<div class="sfc-inner">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "saleFormComparison"
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.sfc-outter {
|
||||
width: 1880px;
|
||||
height: 412px;
|
||||
.sfc-inner {
|
||||
width: 100%;
|
||||
height: calc(100% - 48px);
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,63 @@
|
||||
<template>
|
||||
<div class="sssf-outter" v-loading="load">
|
||||
<v-label-div :title="'销量态势('+time+')'" :showLine="false" :eStyle="{'border-style': 'none'}"></v-label-div>
|
||||
<div class="sf-inner">
|
||||
<v-echarts :opt="opt" ></v-echarts>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getCheZhuCountTime} from "@/api/BrandInsight"
|
||||
import createOpt from "./opt"
|
||||
export default {
|
||||
name: "saleForm",
|
||||
props: ["brand"],
|
||||
data() {
|
||||
return {
|
||||
load: false,
|
||||
form: {
|
||||
token: '',
|
||||
sBrand: '',
|
||||
sSeriesName: '',
|
||||
},
|
||||
time: '',
|
||||
opt: {}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.form.token = this.getToken;
|
||||
this.form.sBrand = this.getBrand.brandname || this.brand;
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
this.load = true
|
||||
let obj = Object.assign({}, this.form);
|
||||
getCheZhuCountTime(obj).then(res => {
|
||||
let data = res.data.Data;
|
||||
this.time = res.data.Time;
|
||||
let dx = [];
|
||||
let ds = [];
|
||||
data.forEach(ele => {
|
||||
dx.push(ele.Time);
|
||||
ds.push(ele.value);
|
||||
})
|
||||
this.opt = createOpt(dx, ds);
|
||||
this.load = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.sssf-outter {
|
||||
width: 912px;
|
||||
height: 412px;
|
||||
.sf-inner {
|
||||
width: 100%;
|
||||
height: calc(100% - 50px);
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,87 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-12 16:40:53
|
||||
* @LastEditTime: 2021-11-19 19:48:04
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/BrandInsight/forumCommunicationTrend/opt.js
|
||||
*/
|
||||
import * as echarts from "echarts";
|
||||
import { bigNumberTransform } from "@/utils/gol/dataTool"
|
||||
export default function createOpt(dx = [], ds = []) {
|
||||
return {
|
||||
grid: {
|
||||
top: "15%",
|
||||
left: "3%",
|
||||
right: "5%",
|
||||
bottom: "3%",
|
||||
containLabel: true,
|
||||
},
|
||||
tooltip: {
|
||||
trigger: "axis",
|
||||
backgroundColor: "#08182F",
|
||||
color: "#fff",
|
||||
borderColor: "#3373CC",
|
||||
textStyle: {
|
||||
color: "#fff", //设置文字颜色
|
||||
},
|
||||
extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;"
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
axisTick: {
|
||||
show: false,
|
||||
},
|
||||
axisLine: {
|
||||
show: false,
|
||||
lineStyle: {
|
||||
color: "#fff",
|
||||
},
|
||||
},
|
||||
axisLabel : {
|
||||
formatter: (value) => {
|
||||
return value
|
||||
}
|
||||
},
|
||||
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: [
|
||||
{
|
||||
data: ds,
|
||||
type: 'line',
|
||||
color: "#CC9D12",
|
||||
areaStyle: {normal: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
|
||||
offset: 0,
|
||||
color: '#CC9D12'
|
||||
}, {
|
||||
offset: 1,
|
||||
color: 'rgba(0,0,0,0)'
|
||||
}]),
|
||||
}},
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
<template>
|
||||
<div class="sf-outter">
|
||||
<v-label-div title="销量态势" :showLine="false" :eStyle="{'border-style': 'none'}"></v-label-div>
|
||||
<div class="sf-inner">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "saleFormStoken",
|
||||
props: ["brand"],
|
||||
data() {
|
||||
return {
|
||||
load: false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.sf-outter {
|
||||
width: 912px;
|
||||
height: 412px;
|
||||
.sf-inner {
|
||||
width: 100%;
|
||||
height: calc(100% - 50px);
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,68 @@
|
||||
<template>
|
||||
<div class="st-outter" v-loading="load">
|
||||
<v-label-div :title="'车型销量TOP('+time+')'" :showLine="false" :eStyle="{'border-style': 'none'}"></v-label-div>
|
||||
<div class="st-inner">
|
||||
<v-echarts :opt="opt" @getData="clickEchars"></v-echarts>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getCheZhuCarSeriesCount} from "@/api/BrandInsight"
|
||||
import createOpt from "./opt"
|
||||
export default {
|
||||
name: "saleTop",
|
||||
props: ["brand"],
|
||||
data() {
|
||||
return {
|
||||
load: false,
|
||||
form: {
|
||||
token: '',
|
||||
sBrand: '',
|
||||
},
|
||||
time: '',
|
||||
opt: {}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.form.token = this.getToken;
|
||||
this.form.sBrand = this.getBrand.brandname || this.brand;
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
this.load = true
|
||||
let obj = Object.assign({}, this.form);
|
||||
getCheZhuCarSeriesCount(obj).then(res => {
|
||||
let data = res.data.Data;
|
||||
this.time = res.data.Time;
|
||||
let dx = [];
|
||||
let ds = [];
|
||||
data.forEach(ele => {
|
||||
dx.push(ele.key);
|
||||
ds.push(ele.value)
|
||||
})
|
||||
this.opt = createOpt(dx, ds);
|
||||
this.load = false;
|
||||
})
|
||||
},
|
||||
clickEchars(data) {
|
||||
let ele = data;
|
||||
let model = ele.axisValueLabel;
|
||||
this.setModel({name: model});
|
||||
this.$router.push("/modelInsight");
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.st-outter {
|
||||
width: 912px;
|
||||
height: 412px;
|
||||
.st-inner {
|
||||
width: 100%;
|
||||
height: calc(100% - 50px);
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,111 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-12 18:23:25
|
||||
* @LastEditTime: 2021-10-12 18:31:20
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/BrandInsight/spreadTOPmodels/opt.js
|
||||
*/
|
||||
import * as echarts from "echarts";
|
||||
import { bigNumberTransform } from "@/utils/gol/dataTool"
|
||||
export default function createOpt(dx,ds) {
|
||||
return {
|
||||
grid: {
|
||||
top: "10%",
|
||||
left: "16px",
|
||||
right: "5%",
|
||||
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: "#000", // 0% 处的颜色
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: "#CC9D12", // 100% 处的颜色#3373CC
|
||||
},
|
||||
],
|
||||
false
|
||||
),
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
<template>
|
||||
<div class="st-outter">
|
||||
<v-label-div title="销量态势" :showLine="false" :eStyle="{'border-style': 'none'}"></v-label-div>
|
||||
<div class="st-inner">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "saleTopStoken",
|
||||
props: ["brand"],
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.st-outter {
|
||||
width: 912px;
|
||||
height: 412px;
|
||||
.st-inner {
|
||||
width: 100%;
|
||||
height: calc(100% - 50px);
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,75 @@
|
||||
<template>
|
||||
<div class="sfcc-outter" v-loading="load">
|
||||
<v-label-div :title="'销量对比('+time+')'"> </v-label-div>
|
||||
<div class="sfc-inner">
|
||||
<v-echarts :opt="opt"></v-echarts>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getCheZhuCountTimeC} from "@/api/ModelComparison/index.js";
|
||||
import createOpt from "./opt";
|
||||
export default {
|
||||
name: "saleFormComparison",
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
token: '',
|
||||
sBrand: '',
|
||||
sSeriesName: ''
|
||||
},
|
||||
opt: {},
|
||||
load: false,
|
||||
time: ''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.initData();
|
||||
},
|
||||
methods: {
|
||||
initData() {
|
||||
this.form.token = this.getToken;
|
||||
let arr = this.getMComparison;
|
||||
let brands = [];
|
||||
let models = [];
|
||||
arr.forEach((ele) => {
|
||||
brands.push(ele.brand);
|
||||
models.push(ele.model);
|
||||
});
|
||||
this.form.sBrand = brands.toString();
|
||||
this.form.sSeriesName = models.toString();
|
||||
this.getData();
|
||||
},
|
||||
getData() {
|
||||
this.load = true;
|
||||
let obj = Object.assign({}, this.form);
|
||||
getCheZhuCountTimeC(obj).then(res => {
|
||||
let data = res.data.Data;
|
||||
this.time = res.data.Time;
|
||||
let dx = [];
|
||||
let ds = [];
|
||||
data.forEach(ele => {
|
||||
let key = ele.key;
|
||||
let value = ele.value;
|
||||
dx.push(key);
|
||||
ds.push(value);
|
||||
});
|
||||
this.opt = createOpt(dx, ds);
|
||||
this.load = false;
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.sfcc-outter {
|
||||
width: 1880px;
|
||||
height: 412px;
|
||||
.sfc-inner {
|
||||
width: 100%;
|
||||
height: calc(100% - 48px);
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,114 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-12 10:11:24
|
||||
* @LastEditTime: 2021-11-19 19:47:53
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/BrandInsight/titsopo/opt.js
|
||||
*/
|
||||
import { bigNumberTransform } from "@/utils/gol/dataTool"
|
||||
function createData(ds = []) {
|
||||
let testData = {}
|
||||
ds.forEach(item => {
|
||||
item.forEach(val => {
|
||||
if (testData[val.key] === undefined) {
|
||||
testData[val.key] = {
|
||||
name: val.key,
|
||||
type: 'line',
|
||||
symbol: 'none',
|
||||
areaStyle: {
|
||||
opacity: 0.2
|
||||
},
|
||||
emphasis: {
|
||||
focus: 'series'
|
||||
},
|
||||
data: [val.value],
|
||||
markPoint: {
|
||||
data: [],
|
||||
}
|
||||
};
|
||||
} else {
|
||||
testData[val.key].data.push(val.value)
|
||||
}
|
||||
})
|
||||
})
|
||||
let arr = [];
|
||||
for(let key in testData) {
|
||||
arr.push(testData[key])
|
||||
}
|
||||
return arr
|
||||
}
|
||||
export default function createOpt(dx = [], ds = []) {
|
||||
let data = createData(ds);
|
||||
return {
|
||||
grid: {
|
||||
left: 10,
|
||||
right: '5%',
|
||||
bottom: 10,
|
||||
top: 52,
|
||||
containLabel: true
|
||||
},
|
||||
tooltip: {
|
||||
trigger: "axis",
|
||||
backgroundColor: "#08182F",
|
||||
color: "#fff",
|
||||
borderColor: "#3373CC",
|
||||
textStyle: {
|
||||
color: "#fff", //设置文字颜色
|
||||
},
|
||||
extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;"
|
||||
},
|
||||
legend: {
|
||||
icon: 'roundRect',
|
||||
textStyle: { //图例文字的样式
|
||||
color: '#fff',
|
||||
fontSize: 10
|
||||
},
|
||||
y: 12,
|
||||
x: 16,
|
||||
itemWidth: 12,
|
||||
itemHeight: 12
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
axisTick: {
|
||||
show: false,
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: (value) => {
|
||||
return value
|
||||
}
|
||||
},
|
||||
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: data
|
||||
}
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
<template>
|
||||
<div class="sfc-outter">
|
||||
<v-label-div title="销量对比"> </v-label-div>
|
||||
<div class="sfc-inner">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "saleFormComparison"
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.sfc-outter {
|
||||
width: 1880px;
|
||||
height: 412px;
|
||||
.sfc-inner {
|
||||
width: 100%;
|
||||
height: calc(100% - 48px);
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,71 @@
|
||||
<template>
|
||||
<div class="sf-outter" v-loading="load">
|
||||
<v-label-div :title="'销量态势('+time+')'" :showLine="false" :eStyle="{'border-style': 'none'}"></v-label-div>
|
||||
<div class="sf-inner">
|
||||
<v-echarts :opt="opt" ></v-echarts>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getCheZhuCountTime} from "@/api/BrandInsight"
|
||||
import createOpt from "./opt"
|
||||
export default {
|
||||
name: "saleForm",
|
||||
props: ["brand", "model"],
|
||||
data() {
|
||||
return {
|
||||
load: false,
|
||||
form: {
|
||||
token: '',
|
||||
sBrand: '',
|
||||
sSeriesName: '',
|
||||
},
|
||||
time: '',
|
||||
opt: {}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
model: {
|
||||
handler(val) {
|
||||
if (val) {
|
||||
this.form.token = this.getToken;
|
||||
this.form.sBrand = this.brand;
|
||||
this.form.sSeriesName = this.model;
|
||||
this.getData();
|
||||
}
|
||||
},
|
||||
immediate: true,
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
this.load = true;
|
||||
let obj = Object.assign({}, this.form);
|
||||
getCheZhuCountTime(obj).then(res => {
|
||||
let data = res.data.Data;
|
||||
this.time = res.data.Time;
|
||||
let dx = [];
|
||||
let ds = [];
|
||||
data.forEach(ele => {
|
||||
dx.push(ele.Time);
|
||||
ds.push(ele.value);
|
||||
})
|
||||
this.opt = createOpt(dx, ds);
|
||||
this.load = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.sf-outter {
|
||||
width: 1824px;
|
||||
height: 412px;
|
||||
.sf-inner {
|
||||
width: 100%;
|
||||
height: calc(100% - 50px);
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,87 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-12 16:40:53
|
||||
* @LastEditTime: 2021-11-19 19:48:04
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/BrandInsight/forumCommunicationTrend/opt.js
|
||||
*/
|
||||
import * as echarts from "echarts";
|
||||
import { bigNumberTransform } from "@/utils/gol/dataTool"
|
||||
export default function createOpt(dx = [], ds = []) {
|
||||
return {
|
||||
grid: {
|
||||
top: "15%",
|
||||
left: "3%",
|
||||
right: "5%",
|
||||
bottom: "3%",
|
||||
containLabel: true,
|
||||
},
|
||||
tooltip: {
|
||||
trigger: "axis",
|
||||
backgroundColor: "#08182F",
|
||||
color: "#fff",
|
||||
borderColor: "#3373CC",
|
||||
textStyle: {
|
||||
color: "#fff", //设置文字颜色
|
||||
},
|
||||
extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;"
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
axisTick: {
|
||||
show: false,
|
||||
},
|
||||
axisLine: {
|
||||
show: false,
|
||||
lineStyle: {
|
||||
color: "#fff",
|
||||
},
|
||||
},
|
||||
axisLabel : {
|
||||
formatter: (value) => {
|
||||
return value
|
||||
}
|
||||
},
|
||||
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: [
|
||||
{
|
||||
data: ds,
|
||||
type: 'line',
|
||||
color: "#CC9D12",
|
||||
areaStyle: {normal: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
|
||||
offset: 0,
|
||||
color: '#CC9D12'
|
||||
}, {
|
||||
offset: 1,
|
||||
color: 'rgba(0,0,0,0)'
|
||||
}]),
|
||||
}},
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
<template>
|
||||
<div class="sf-outter" v-loading="load">
|
||||
<v-label-div title="销量态势" :showLine="false" :eStyle="{'border-style': 'none'}"></v-label-div>
|
||||
<div class="sf-inner">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "saleFormStoken",
|
||||
props: ["brand"],
|
||||
data() {
|
||||
return {
|
||||
load: false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.sf-outter {
|
||||
width: 1824px;
|
||||
height: 412px;
|
||||
.sf-inner {
|
||||
width: 100%;
|
||||
height: calc(100% - 50px);
|
||||
}
|
||||
}
|
||||
</style>
|
Loading…
Reference in new issue