prod
parent
62386ca077
commit
2f2979d940
@ -0,0 +1,64 @@
|
||||
import httpService from "@/request"
|
||||
|
||||
// 城市-获取时间
|
||||
export function getExcleTime(params) {
|
||||
let obj = Object.assign({action: 'getExcleTime', sType: 'ExcleSales'}, params)
|
||||
return httpService({
|
||||
url: `/api/v6.ashx`,
|
||||
method: 'post',
|
||||
data: obj,
|
||||
headers: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 城市-省份排行
|
||||
export function getSalesType1(params) {
|
||||
let obj = Object.assign({action: 'getSalesType1', sType: 'ExcleSales'}, params)
|
||||
return httpService({
|
||||
url: `/api/v6.ashx`,
|
||||
method: 'post',
|
||||
data: obj,
|
||||
headers: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 城市-城市排行
|
||||
export function getSalesType0(params) {
|
||||
let obj = Object.assign({action: 'getSalesType0', sType: 'ExcleSales'}, params)
|
||||
return httpService({
|
||||
url: `/api/v6.ashx`,
|
||||
method: 'post',
|
||||
data: obj,
|
||||
headers: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
}
|
||||
})
|
||||
}
|
||||
// 城市-品牌销量排行
|
||||
export function getSalesType6(params) {
|
||||
let obj = Object.assign({action: 'getSalesType6', sType: 'ExcleSales'}, params)
|
||||
return httpService({
|
||||
url: `/api/v6.ashx`,
|
||||
method: 'post',
|
||||
data: obj,
|
||||
headers: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
}
|
||||
})
|
||||
}
|
||||
// 城市-车型销量排行
|
||||
export function getSalesType7(params) {
|
||||
let obj = Object.assign({action: 'getSalesType7', sType: 'ExcleSales'}, params)
|
||||
return httpService({
|
||||
url: `/api/v6.ashx`,
|
||||
method: 'post',
|
||||
data: obj,
|
||||
headers: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
}
|
||||
})
|
||||
}
|
@ -0,0 +1,111 @@
|
||||
/*
|
||||
* @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],
|
||||
};
|
||||
} 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
|
||||
}
|
||||
}
|
Loading…
Reference in new issue