From a4ab724eabda9abe8d6ea0c50030fd1b2f0e4cbb Mon Sep 17 00:00:00 2001 From: zx <604444282@qq.com> Date: Mon, 8 Aug 2022 16:59:06 +0800 Subject: [PATCH] zx --- src/api/SaleRankMarket/index.js | 159 ++++++++++++++++++ .../MarketSaleNE/mneCountryPercent/index.vue | 112 +++++++++++- .../MarketSaleNE/mneCountryPercent/opt.js | 146 ++++++++++++++++ .../MarketSaleNE/mneEnergyType/index.vue | 112 +++++++++++- .../MarketSaleNE/mneEnergyType/opt.js | 146 ++++++++++++++++ .../MarketSaleNE/mneMainPrice/index.vue | 19 ++- .../mneMainPrice/seriesAuto/index.vue | 92 ++++++++++ .../mneMainPrice/seriesAuto/opt.js | 156 +++++++++++++++++ .../mneMainPrice/seriesMpv/index.vue | 92 ++++++++++ .../mneMainPrice/seriesMpv/opt.js | 156 +++++++++++++++++ .../mneMainPrice/seriesSuv/index.vue | 92 ++++++++++ .../mneMainPrice/seriesSuv/opt.js | 156 +++++++++++++++++ .../mneMainPrice/seriesTotal/index.vue | 126 ++++++++++++++ .../mneMainPrice/seriesTotal/opt.js | 149 ++++++++++++++++ .../MarketSaleNE/mnePrecisionType/index.vue | 17 +- .../precAutoPercent/index.vue | 106 ++++++++++++ .../mnePrecisionType/precAutoPercent/opt.js | 147 ++++++++++++++++ .../mnePrecisionType/precMpvPercent/index.vue | 106 ++++++++++++ .../mnePrecisionType/precMpvPercent/opt.js | 147 ++++++++++++++++ .../mnePrecisionType/precPercent/index.vue | 105 ++++++++++++ .../mnePrecisionType/precPercent/opt.js | 147 ++++++++++++++++ .../mnePrecisionType/precSuvPercent/index.vue | 106 ++++++++++++ .../mnePrecisionType/precSuvPercent/opt.js | 147 ++++++++++++++++ .../mstCountryPercent/index.vue | 20 ++- .../mstMPPercent/index.vue | 114 ++++++++++++- .../MarketSaleTraditional/mstMPPercent/opt.js | 146 ++++++++++++++++ .../mstMainPrice/index.vue | 11 +- .../mstMainPrice/mainBrand/index.vue | 127 ++++++++++++++ .../mstMainPrice/mainBrand/opt.js | 137 +++++++++++++++ .../mstMainPrice/mainCountry/index.vue | 126 ++++++++++++++ .../mstMainPrice/mainCountry/opt.js | 147 ++++++++++++++++ .../precAutoPercent/index.vue | 4 +- .../mstPrecisionType/precMpvPercent/index.vue | 4 +- .../mstPrecisionType/precSuvPercent/index.vue | 4 +- .../mstSeriesType/seriesAuto/index.vue | 20 ++- .../mstSeriesType/seriesMpv/index.vue | 20 ++- .../mstSeriesType/seriesSuv/index.vue | 20 ++- .../mstSeriesType/seriesTotal/index.vue | 20 ++- src/views/SaleRank/index.vue | 6 +- 39 files changed, 3639 insertions(+), 28 deletions(-) create mode 100644 src/views/SaleRank/MarketSaleNE/mneCountryPercent/opt.js create mode 100644 src/views/SaleRank/MarketSaleNE/mneEnergyType/opt.js create mode 100644 src/views/SaleRank/MarketSaleNE/mneMainPrice/seriesAuto/index.vue create mode 100644 src/views/SaleRank/MarketSaleNE/mneMainPrice/seriesAuto/opt.js create mode 100644 src/views/SaleRank/MarketSaleNE/mneMainPrice/seriesMpv/index.vue create mode 100644 src/views/SaleRank/MarketSaleNE/mneMainPrice/seriesMpv/opt.js create mode 100644 src/views/SaleRank/MarketSaleNE/mneMainPrice/seriesSuv/index.vue create mode 100644 src/views/SaleRank/MarketSaleNE/mneMainPrice/seriesSuv/opt.js create mode 100644 src/views/SaleRank/MarketSaleNE/mneMainPrice/seriesTotal/index.vue create mode 100644 src/views/SaleRank/MarketSaleNE/mneMainPrice/seriesTotal/opt.js create mode 100644 src/views/SaleRank/MarketSaleNE/mnePrecisionType/precAutoPercent/index.vue create mode 100644 src/views/SaleRank/MarketSaleNE/mnePrecisionType/precAutoPercent/opt.js create mode 100644 src/views/SaleRank/MarketSaleNE/mnePrecisionType/precMpvPercent/index.vue create mode 100644 src/views/SaleRank/MarketSaleNE/mnePrecisionType/precMpvPercent/opt.js create mode 100644 src/views/SaleRank/MarketSaleNE/mnePrecisionType/precPercent/index.vue create mode 100644 src/views/SaleRank/MarketSaleNE/mnePrecisionType/precPercent/opt.js create mode 100644 src/views/SaleRank/MarketSaleNE/mnePrecisionType/precSuvPercent/index.vue create mode 100644 src/views/SaleRank/MarketSaleNE/mnePrecisionType/precSuvPercent/opt.js create mode 100644 src/views/SaleRank/MarketSaleTraditional/mstMPPercent/opt.js create mode 100644 src/views/SaleRank/MarketSaleTraditional/mstMainPrice/mainBrand/index.vue create mode 100644 src/views/SaleRank/MarketSaleTraditional/mstMainPrice/mainBrand/opt.js create mode 100644 src/views/SaleRank/MarketSaleTraditional/mstMainPrice/mainCountry/index.vue create mode 100644 src/views/SaleRank/MarketSaleTraditional/mstMainPrice/mainCountry/opt.js diff --git a/src/api/SaleRankMarket/index.js b/src/api/SaleRankMarket/index.js index f42f44e..6240487 100644 --- a/src/api/SaleRankMarket/index.js +++ b/src/api/SaleRankMarket/index.js @@ -207,4 +207,163 @@ export function getSalesSpecNameTypesByMpv(params) { 'content-type': 'application/x-www-form-urlencoded' } }) +} + +// 传统燃油 - 主销价格区间 - 国别区间 +export function getSalesPriceRangeSTypes(params) { + let obj = Object.assign({action: 'getSalesPriceRangeSTypes', sType: 'Marketing'}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} +// 传统燃油 - 主销价格区间 - 品牌top区间 +export function getSalesPriceRangeSBrand(params) { + let obj = Object.assign({action: 'getSalesPriceRangeSBrand', sType: 'Marketing'}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} +// 传统燃油 - 主销价格区间占比 +export function getSalesSpecNameByPriceRange(params) { + let obj = Object.assign({action: 'getSalesSpecNameByPriceRange', sType: 'Marketing'}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} + +// 新能源 - 能源类型 +export function getSalesEnergyTypesE(params) { + let obj = Object.assign({action: 'getSalesEnergyTypesE', sType: 'Marketing'}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} +// 新能源 - 国别占比 +export function getSalesCountrysTypesE(params) { + let obj = Object.assign({action: 'getSalesCountrysTypesE', sType: 'Marketing'}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} +// 新能源 - 细分车型 全部类别 +export function getSalesSpecNameTypesE(params) { + let obj = Object.assign({action: 'getSalesSpecNameTypesE', sType: 'Marketing'}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} +// 新能源 - 细分车型 suv +export function getSalesSpecNameTypesBySuvE(params) { + let obj = Object.assign({action: 'getSalesSpecNameTypesBySuvE', sType: 'Marketing'}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} +// 新能源 - 细分车型 轿车 +export function getSalesSpecNameTypesBySedanE(params) { + let obj = Object.assign({action: 'getSalesSpecNameTypesBySedanE', sType: 'Marketing'}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} +// 新能源 - 细分车型 mpv +export function getSalesSpecNameTypesByMpvE(params) { + let obj = Object.assign({action: 'getSalesSpecNameTypesByMpvE', sType: 'Marketing'}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} + +// 新能源 - 车型类别 - 轿车同比 +export function getSalesSpecName1TypesBySedanE(params) { + let obj = Object.assign({action: 'getSalesSpecName1TypesBySedanE', sType: 'Marketing'}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} +// 新能源 - 车型类别 - suv同比 +export function getSalesSpecName1TypesBySuvE(params) { + let obj = Object.assign({action: 'getSalesSpecName1TypesBySuvE', sType: 'Marketing'}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} +// 新能源 - 车型类别 - mpv同比 +export function getSalesSpecName1TypesByMpvE(params) { + let obj = Object.assign({action: 'getSalesSpecName1TypesByMpvE', sType: 'Marketing'}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} +// 新能源 - 车型类别 - mpv suv 轿车对比 +export function getSalesSpecName1TypesE(params) { + let obj = Object.assign({action: 'getSalesSpecName1TypesE', sType: 'Marketing'}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) } \ No newline at end of file diff --git a/src/views/SaleRank/MarketSaleNE/mneCountryPercent/index.vue b/src/views/SaleRank/MarketSaleNE/mneCountryPercent/index.vue index 41ea477..0a6fc27 100644 --- a/src/views/SaleRank/MarketSaleNE/mneCountryPercent/index.vue +++ b/src/views/SaleRank/MarketSaleNE/mneCountryPercent/index.vue @@ -1,18 +1,124 @@ - 新能源车市场销量分析-国别占比 + + + 导出报告 + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/views/SaleRank/MarketSaleNE/mneCountryPercent/opt.js b/src/views/SaleRank/MarketSaleNE/mneCountryPercent/opt.js new file mode 100644 index 0000000..d5a1240 --- /dev/null +++ b/src/views/SaleRank/MarketSaleNE/mneCountryPercent/opt.js @@ -0,0 +1,146 @@ +/* + * @Author: your name + * @Date: 2021-10-09 11:01:19 + * @LastEditTime: 2021-12-23 16:37:35 + * @LastEditors: Please set LastEditors + * @Description: In User Settings Edit + * @FilePath: /data-show/src/views/Index/spreadTheSound/opt.js + */ +import * as echarts from "echarts"; +import {doStr} from "@/utils/gol/dataTool" +import { bigNumberTransform } from "@/utils/gol/dataTool" +let colors = ['#5B8FF9','#7DAAFF','#9AC5FF','#B9E2FF','#3A9EC0','#5BB9DB','#78D4F8','#63AECC','#19A576','#43C090','#43C090','#9DF5CA' +,'#5B8FF9','#7DAAFF','#9AC5FF','#B9E2FF','#3A9EC0','#5BB9DB','#78D4F8','#63AECC','#19A576','#43C090','#43C090','#9DF5CA'] +function createData(ds = []) { + let arr = []; + for (let i = 0; i < ds.length; i++) { + let arr1 = ds[i]; + for (let j = 0; j < arr1.length; j++) { + let n = arr.findIndex(ele => { + return ele.name === arr1[j].Key; + }) + if (n === -1) { + let obj = + { + name: arr1[j].Key, + type: 'bar', + stack: 'total', + barWidth: 48, + barGap: "-100%", + emphasis: { + focus: 'series' + }, + label: { + show: true, + position: 'inside', + color: '#FFF', + fontWeight: 600, + formatter: (res) => { + return res.data + '%' + } + }, + itemStyle: { + normal: { + //柱体的颜色 + //右,下,左,上(1,0,0,0)表示从正右开始向左渐变 + color: function () { + return new echarts.graphic.LinearGradient(0, 0, 0, 1, [ + { + offset: 0, + color: colors[j] + }, + { + offset: 1, + color: colors[j] + } + ], false); + } + } + + }, + data: [arr1[j].Value] + } + arr.push(obj) + } else { + arr[n].data.push(arr1[j].Value) + } + } + } + return arr; +} +export default function createOpt(dx = [], ds = []) { + const data = createData(ds); + return { + grid: { + left: 10, + right: 10, + bottom: 10, + containLabel: true + }, + tooltip: { + trigger: "axis", + backgroundColor: "#08182F", + color: "#fff", + borderColor: "#3373CC", + textStyle: { + color: "#fff", //设置文字颜色 + }, + extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;" + }, + color: colors, + legend: { + textStyle: { //图例文字的样式 + color: '#fff', + fontSize: 10 + }, + y: 10, + x: 10, + itemWidth: 12, + itemHeight: 12, + borderRadius: 1, //圆角半径 + }, + xAxis: { + type: 'category', + axisLabel :{ + interval:0, + formatter: (value) => { + let res = doStr(value, 8); + return res + } + }, + axisTick: { + show: false, + }, + axisLine: { + show: false, + lineStyle: { + color: "#fff", + }, + }, + data: dx + }, + yAxis: { + type: 'value', + max: 100, + axisLine: { + show: false, + lineStyle: { + color: "#fff", + }, + }, + axisLabel: { + formatter: (value) => { + return value + '%' + } + }, + splitLine: { + lineStyle: { + type: "dashed", // y轴分割线类型 + color: "#012b4b", + }, + }, + }, + series: data + } + +} \ No newline at end of file diff --git a/src/views/SaleRank/MarketSaleNE/mneEnergyType/index.vue b/src/views/SaleRank/MarketSaleNE/mneEnergyType/index.vue index 3c7a123..40cd6f5 100644 --- a/src/views/SaleRank/MarketSaleNE/mneEnergyType/index.vue +++ b/src/views/SaleRank/MarketSaleNE/mneEnergyType/index.vue @@ -1,18 +1,124 @@ - 新能源车市场销量分析-能源类型 + + + 导出报告 + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/views/SaleRank/MarketSaleNE/mneEnergyType/opt.js b/src/views/SaleRank/MarketSaleNE/mneEnergyType/opt.js new file mode 100644 index 0000000..d5a1240 --- /dev/null +++ b/src/views/SaleRank/MarketSaleNE/mneEnergyType/opt.js @@ -0,0 +1,146 @@ +/* + * @Author: your name + * @Date: 2021-10-09 11:01:19 + * @LastEditTime: 2021-12-23 16:37:35 + * @LastEditors: Please set LastEditors + * @Description: In User Settings Edit + * @FilePath: /data-show/src/views/Index/spreadTheSound/opt.js + */ +import * as echarts from "echarts"; +import {doStr} from "@/utils/gol/dataTool" +import { bigNumberTransform } from "@/utils/gol/dataTool" +let colors = ['#5B8FF9','#7DAAFF','#9AC5FF','#B9E2FF','#3A9EC0','#5BB9DB','#78D4F8','#63AECC','#19A576','#43C090','#43C090','#9DF5CA' +,'#5B8FF9','#7DAAFF','#9AC5FF','#B9E2FF','#3A9EC0','#5BB9DB','#78D4F8','#63AECC','#19A576','#43C090','#43C090','#9DF5CA'] +function createData(ds = []) { + let arr = []; + for (let i = 0; i < ds.length; i++) { + let arr1 = ds[i]; + for (let j = 0; j < arr1.length; j++) { + let n = arr.findIndex(ele => { + return ele.name === arr1[j].Key; + }) + if (n === -1) { + let obj = + { + name: arr1[j].Key, + type: 'bar', + stack: 'total', + barWidth: 48, + barGap: "-100%", + emphasis: { + focus: 'series' + }, + label: { + show: true, + position: 'inside', + color: '#FFF', + fontWeight: 600, + formatter: (res) => { + return res.data + '%' + } + }, + itemStyle: { + normal: { + //柱体的颜色 + //右,下,左,上(1,0,0,0)表示从正右开始向左渐变 + color: function () { + return new echarts.graphic.LinearGradient(0, 0, 0, 1, [ + { + offset: 0, + color: colors[j] + }, + { + offset: 1, + color: colors[j] + } + ], false); + } + } + + }, + data: [arr1[j].Value] + } + arr.push(obj) + } else { + arr[n].data.push(arr1[j].Value) + } + } + } + return arr; +} +export default function createOpt(dx = [], ds = []) { + const data = createData(ds); + return { + grid: { + left: 10, + right: 10, + bottom: 10, + containLabel: true + }, + tooltip: { + trigger: "axis", + backgroundColor: "#08182F", + color: "#fff", + borderColor: "#3373CC", + textStyle: { + color: "#fff", //设置文字颜色 + }, + extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;" + }, + color: colors, + legend: { + textStyle: { //图例文字的样式 + color: '#fff', + fontSize: 10 + }, + y: 10, + x: 10, + itemWidth: 12, + itemHeight: 12, + borderRadius: 1, //圆角半径 + }, + xAxis: { + type: 'category', + axisLabel :{ + interval:0, + formatter: (value) => { + let res = doStr(value, 8); + return res + } + }, + axisTick: { + show: false, + }, + axisLine: { + show: false, + lineStyle: { + color: "#fff", + }, + }, + data: dx + }, + yAxis: { + type: 'value', + max: 100, + axisLine: { + show: false, + lineStyle: { + color: "#fff", + }, + }, + axisLabel: { + formatter: (value) => { + return value + '%' + } + }, + splitLine: { + lineStyle: { + type: "dashed", // y轴分割线类型 + color: "#012b4b", + }, + }, + }, + series: data + } + +} \ No newline at end of file diff --git a/src/views/SaleRank/MarketSaleNE/mneMainPrice/index.vue b/src/views/SaleRank/MarketSaleNE/mneMainPrice/index.vue index 53b02c6..49d427c 100644 --- a/src/views/SaleRank/MarketSaleNE/mneMainPrice/index.vue +++ b/src/views/SaleRank/MarketSaleNE/mneMainPrice/index.vue @@ -1,10 +1,25 @@ - 新能源车市场销量分析-主销价格区间 + + + + + + + + \ No newline at end of file diff --git a/src/views/SaleRank/MarketSaleNE/mneMainPrice/seriesAuto/opt.js b/src/views/SaleRank/MarketSaleNE/mneMainPrice/seriesAuto/opt.js new file mode 100644 index 0000000..fd7721b --- /dev/null +++ b/src/views/SaleRank/MarketSaleNE/mneMainPrice/seriesAuto/opt.js @@ -0,0 +1,156 @@ + +import { bigNumberTransform } from "@/utils/gol/dataTool" +import * as echarts from "echarts"; +export default function createOpt(firstData = [], secondData = [], percent = []) { + return { + tooltip: { + trigger: "axis", + backgroundColor: "#08182F", + axisPointer: { + type: 'cross', + crossStyle: { + color: '#999' + } + }, + borderColor: "#3373CC", + textStyle: { + color: "#fff", //设置文字颜色 + }, + extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;" + }, + grid: { + left: 10, + right: 10, + bottom: 10, + containLabel: true + }, + legend: { + textStyle: { //图例文字的样式 + color: '#fff', + fontSize: 10 + }, + y: 10, + x: 10, + itemWidth: 12, + itemHeight: 12, + borderRadius: 1, //圆角半径 + }, + xAxis: [ + { + type: 'category', + data: ['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月',], + axisPointer: { + type: 'shadow' + }, + axisLabel: { + color: '#FFF' + } + } + ], + yAxis: [ + { + type: 'value', + axisLabel: { + formatter: (value) => { + return bigNumberTransform(value); + }, + color: '#FFF' + }, + splitLine:{ + show:false + }, + }, + { + type: 'value', + axisLabel: { + formatter: '{value}%', + color: '#FFF' + }, + splitLine:{ + show:false + }, + } + ], + series: [ + { + name: '2021', + type: 'bar', + barWidth: 20, + tooltip: { + valueFormatter: function (value) { + return value; + } + }, + itemStyle: { + normal: { + //柱体的颜色 + //右,下,左,上(1,0,0,0)表示从正右开始向左渐变 + color: function () { + return new echarts.graphic.LinearGradient(0, 0, 0, 1, [ + { + offset: 0, + color: '#3373CC' + }, + { + offset: 1, + color: '#3E8CF940' + } + ], false); + } + } + }, + label: { + show: true, + position: 'top', + color: '#FFF' + }, + data: firstData + }, + { + name: '2022', + type: 'bar', + barWidth: 20, + tooltip: { + valueFormatter: function (value) { + return value; + } + }, + itemStyle: { + normal: { + //柱体的颜色 + //右,下,左,上(1,0,0,0)表示从正右开始向左渐变 + color: function () { + return new echarts.graphic.LinearGradient(0, 0, 0, 1, [ + { + offset: 0, + color: '#54BF93' + }, + { + offset: 1, + color: '#61DDAA30' + } + ], false); + } + } + }, + label: { + show: true, + position: 'top', + color: '#FFF' + }, + data: secondData + }, + { + name: '同比', + type: 'line', + yAxisIndex: 1, + tooltip: { + valueFormatter: function (value) { + return value+'%'; + } + }, + data: percent + } + ] + } +} \ No newline at end of file diff --git a/src/views/SaleRank/MarketSaleNE/mneMainPrice/seriesMpv/index.vue b/src/views/SaleRank/MarketSaleNE/mneMainPrice/seriesMpv/index.vue new file mode 100644 index 0000000..4bb45b9 --- /dev/null +++ b/src/views/SaleRank/MarketSaleNE/mneMainPrice/seriesMpv/index.vue @@ -0,0 +1,92 @@ + + + + 导出报告 + + + + + + + + + + \ No newline at end of file diff --git a/src/views/SaleRank/MarketSaleNE/mneMainPrice/seriesMpv/opt.js b/src/views/SaleRank/MarketSaleNE/mneMainPrice/seriesMpv/opt.js new file mode 100644 index 0000000..fd7721b --- /dev/null +++ b/src/views/SaleRank/MarketSaleNE/mneMainPrice/seriesMpv/opt.js @@ -0,0 +1,156 @@ + +import { bigNumberTransform } from "@/utils/gol/dataTool" +import * as echarts from "echarts"; +export default function createOpt(firstData = [], secondData = [], percent = []) { + return { + tooltip: { + trigger: "axis", + backgroundColor: "#08182F", + axisPointer: { + type: 'cross', + crossStyle: { + color: '#999' + } + }, + borderColor: "#3373CC", + textStyle: { + color: "#fff", //设置文字颜色 + }, + extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;" + }, + grid: { + left: 10, + right: 10, + bottom: 10, + containLabel: true + }, + legend: { + textStyle: { //图例文字的样式 + color: '#fff', + fontSize: 10 + }, + y: 10, + x: 10, + itemWidth: 12, + itemHeight: 12, + borderRadius: 1, //圆角半径 + }, + xAxis: [ + { + type: 'category', + data: ['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月',], + axisPointer: { + type: 'shadow' + }, + axisLabel: { + color: '#FFF' + } + } + ], + yAxis: [ + { + type: 'value', + axisLabel: { + formatter: (value) => { + return bigNumberTransform(value); + }, + color: '#FFF' + }, + splitLine:{ + show:false + }, + }, + { + type: 'value', + axisLabel: { + formatter: '{value}%', + color: '#FFF' + }, + splitLine:{ + show:false + }, + } + ], + series: [ + { + name: '2021', + type: 'bar', + barWidth: 20, + tooltip: { + valueFormatter: function (value) { + return value; + } + }, + itemStyle: { + normal: { + //柱体的颜色 + //右,下,左,上(1,0,0,0)表示从正右开始向左渐变 + color: function () { + return new echarts.graphic.LinearGradient(0, 0, 0, 1, [ + { + offset: 0, + color: '#3373CC' + }, + { + offset: 1, + color: '#3E8CF940' + } + ], false); + } + } + }, + label: { + show: true, + position: 'top', + color: '#FFF' + }, + data: firstData + }, + { + name: '2022', + type: 'bar', + barWidth: 20, + tooltip: { + valueFormatter: function (value) { + return value; + } + }, + itemStyle: { + normal: { + //柱体的颜色 + //右,下,左,上(1,0,0,0)表示从正右开始向左渐变 + color: function () { + return new echarts.graphic.LinearGradient(0, 0, 0, 1, [ + { + offset: 0, + color: '#54BF93' + }, + { + offset: 1, + color: '#61DDAA30' + } + ], false); + } + } + }, + label: { + show: true, + position: 'top', + color: '#FFF' + }, + data: secondData + }, + { + name: '同比', + type: 'line', + yAxisIndex: 1, + tooltip: { + valueFormatter: function (value) { + return value+'%'; + } + }, + data: percent + } + ] + } +} \ No newline at end of file diff --git a/src/views/SaleRank/MarketSaleNE/mneMainPrice/seriesSuv/index.vue b/src/views/SaleRank/MarketSaleNE/mneMainPrice/seriesSuv/index.vue new file mode 100644 index 0000000..da7d104 --- /dev/null +++ b/src/views/SaleRank/MarketSaleNE/mneMainPrice/seriesSuv/index.vue @@ -0,0 +1,92 @@ + + + + 导出报告 + + + + + + + + + + \ No newline at end of file diff --git a/src/views/SaleRank/MarketSaleNE/mneMainPrice/seriesSuv/opt.js b/src/views/SaleRank/MarketSaleNE/mneMainPrice/seriesSuv/opt.js new file mode 100644 index 0000000..fd7721b --- /dev/null +++ b/src/views/SaleRank/MarketSaleNE/mneMainPrice/seriesSuv/opt.js @@ -0,0 +1,156 @@ + +import { bigNumberTransform } from "@/utils/gol/dataTool" +import * as echarts from "echarts"; +export default function createOpt(firstData = [], secondData = [], percent = []) { + return { + tooltip: { + trigger: "axis", + backgroundColor: "#08182F", + axisPointer: { + type: 'cross', + crossStyle: { + color: '#999' + } + }, + borderColor: "#3373CC", + textStyle: { + color: "#fff", //设置文字颜色 + }, + extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;" + }, + grid: { + left: 10, + right: 10, + bottom: 10, + containLabel: true + }, + legend: { + textStyle: { //图例文字的样式 + color: '#fff', + fontSize: 10 + }, + y: 10, + x: 10, + itemWidth: 12, + itemHeight: 12, + borderRadius: 1, //圆角半径 + }, + xAxis: [ + { + type: 'category', + data: ['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月',], + axisPointer: { + type: 'shadow' + }, + axisLabel: { + color: '#FFF' + } + } + ], + yAxis: [ + { + type: 'value', + axisLabel: { + formatter: (value) => { + return bigNumberTransform(value); + }, + color: '#FFF' + }, + splitLine:{ + show:false + }, + }, + { + type: 'value', + axisLabel: { + formatter: '{value}%', + color: '#FFF' + }, + splitLine:{ + show:false + }, + } + ], + series: [ + { + name: '2021', + type: 'bar', + barWidth: 20, + tooltip: { + valueFormatter: function (value) { + return value; + } + }, + itemStyle: { + normal: { + //柱体的颜色 + //右,下,左,上(1,0,0,0)表示从正右开始向左渐变 + color: function () { + return new echarts.graphic.LinearGradient(0, 0, 0, 1, [ + { + offset: 0, + color: '#3373CC' + }, + { + offset: 1, + color: '#3E8CF940' + } + ], false); + } + } + }, + label: { + show: true, + position: 'top', + color: '#FFF' + }, + data: firstData + }, + { + name: '2022', + type: 'bar', + barWidth: 20, + tooltip: { + valueFormatter: function (value) { + return value; + } + }, + itemStyle: { + normal: { + //柱体的颜色 + //右,下,左,上(1,0,0,0)表示从正右开始向左渐变 + color: function () { + return new echarts.graphic.LinearGradient(0, 0, 0, 1, [ + { + offset: 0, + color: '#54BF93' + }, + { + offset: 1, + color: '#61DDAA30' + } + ], false); + } + } + }, + label: { + show: true, + position: 'top', + color: '#FFF' + }, + data: secondData + }, + { + name: '同比', + type: 'line', + yAxisIndex: 1, + tooltip: { + valueFormatter: function (value) { + return value+'%'; + } + }, + data: percent + } + ] + } +} \ No newline at end of file diff --git a/src/views/SaleRank/MarketSaleNE/mneMainPrice/seriesTotal/index.vue b/src/views/SaleRank/MarketSaleNE/mneMainPrice/seriesTotal/index.vue new file mode 100644 index 0000000..5d04e5b --- /dev/null +++ b/src/views/SaleRank/MarketSaleNE/mneMainPrice/seriesTotal/index.vue @@ -0,0 +1,126 @@ + + + + 导出报告 + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/views/SaleRank/MarketSaleNE/mneMainPrice/seriesTotal/opt.js b/src/views/SaleRank/MarketSaleNE/mneMainPrice/seriesTotal/opt.js new file mode 100644 index 0000000..dec374b --- /dev/null +++ b/src/views/SaleRank/MarketSaleNE/mneMainPrice/seriesTotal/opt.js @@ -0,0 +1,149 @@ +/* + * @Author: your name + * @Date: 2021-10-09 11:01:19 + * @LastEditTime: 2021-12-23 16:37:35 + * @LastEditors: Please set LastEditors + * @Description: In User Settings Edit + * @FilePath: /data-show/src/views/Index/spreadTheSound/opt.js + */ +import * as echarts from "echarts"; +import {doStr} from "@/utils/gol/dataTool" +import { bigNumberTransform } from "@/utils/gol/dataTool" +// let colors = ['rgba(84,111,197,1)', 'rgba(145,203,116,1)', 'rgba(90,203,156,1)', 'rgba(248,200,87,1)', 'rgba(237,101,101,1)', "rgba(114,191,222,1)", 'rgba(58,162,114,1)', 'rgba(251,131,81,1)'] +let colors2 = ['#3373CC60', '#63AECC60', '#54BF9360', 'rgba(248,200,87,0.6)', 'rgba(237,101,101,0.6)', "rgba(114,191,222,0.6)", 'rgba(58,162,114,0.6)', 'rgba(251,131,81,0.6)'] +let colors = ['#3373CC','#63AECC','#54BF93','#B9E2FF','#3A9EC0','#5BB9DB','#78D4F8','#63AECC','#19A576','#43C090','#43C090','#9DF5CA'] +function createData(ds = []) { + let arr = []; + for (let i = 0; i < ds.length; i++) { + let arr1 = ds[i]; + for (let j = 0; j < arr1.length; j++) { + let n = arr.findIndex(ele => { + return ele.name === arr1[j].Key; + }) + if (n === -1) { + let obj = + { + name: arr1[j].Key, + type: 'bar', + stack: 'total', + barWidth: 36, + barGap: "-100%", + emphasis: { + focus: 'series' + }, + label: { + show: true, + position: 'inside', + color: '#FFF', + fontWeight: 600, + fontSize: 10, + formatter: (res) => { + return res.data + '%' + } + }, + itemStyle: { + normal: { + //柱体的颜色 + //右,下,左,上(1,0,0,0)表示从正右开始向左渐变 + color: function () { + return new echarts.graphic.LinearGradient(0, 0, 0, 1, [ + { + offset: 0, + color: colors[j] + }, + { + offset: 1, + color: colors2[j] + } + ], false); + } + } + + }, + data: [arr1[j].Value] + } + arr.push(obj) + } else { + arr[n].data.push(arr1[j].Value) + } + } + } + return arr; +} +export default function createOpt(dx = [], ds = []) { + const data = createData(ds); + return { + grid: { + left: 10, + right: 10, + bottom: 10, + containLabel: true + }, + tooltip: { + trigger: "axis", + backgroundColor: "#08182F", + color: "#fff", + borderColor: "#3373CC", + textStyle: { + color: "#fff", //设置文字颜色 + }, + extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;" + }, + color: colors, + legend: { + textStyle: { //图例文字的样式 + color: '#fff', + fontSize: 10 + }, + y: 10, + x: 10, + itemWidth: 12, + itemHeight: 12, + borderRadius: 1, //圆角半径 + }, + xAxis: { + type: 'category', + axisLabel :{ + interval:0, + formatter: (value) => { + let res = doStr(value, 8); + return res + } + }, + axisTick: { + show: false, + }, + axisLine: { + show: false, + lineStyle: { + color: "#fff", + }, + }, + data: dx + }, + yAxis: { + type: 'value', + min: 0, + max: 100, + axisLine: { + show: false, + lineStyle: { + color: "#fff", + }, + }, + axisLabel: { + formatter: (value) => { + return value + '%'; + } + }, + splitLine: { + lineStyle: { + type: "dashed", // y轴分割线类型 + color: "#012b4b", + }, + }, + }, + series: data + } + +} \ No newline at end of file diff --git a/src/views/SaleRank/MarketSaleNE/mnePrecisionType/index.vue b/src/views/SaleRank/MarketSaleNE/mnePrecisionType/index.vue index b0756c9..0e83e70 100644 --- a/src/views/SaleRank/MarketSaleNE/mnePrecisionType/index.vue +++ b/src/views/SaleRank/MarketSaleNE/mnePrecisionType/index.vue @@ -1,9 +1,24 @@ - 新能源车市场销量分析-细分车型 + + + + + + + + \ No newline at end of file diff --git a/src/views/SaleRank/MarketSaleNE/mnePrecisionType/precAutoPercent/opt.js b/src/views/SaleRank/MarketSaleNE/mnePrecisionType/precAutoPercent/opt.js new file mode 100644 index 0000000..5ad1a5f --- /dev/null +++ b/src/views/SaleRank/MarketSaleNE/mnePrecisionType/precAutoPercent/opt.js @@ -0,0 +1,147 @@ +/* + * @Author: your name + * @Date: 2021-10-09 11:01:19 + * @LastEditTime: 2021-12-23 16:37:35 + * @LastEditors: Please set LastEditors + * @Description: In User Settings Edit + * @FilePath: /data-show/src/views/Index/spreadTheSound/opt.js + */ +import * as echarts from "echarts"; +import {doStr} from "@/utils/gol/dataTool" +import { bigNumberTransform } from "@/utils/gol/dataTool" +let colors2 = ['#3373CC60', '#63AECC60', '#54BF9360', '#CC9D1260', '#FFDE9560', '#78D4F860', 'rgba(58,162,114,0.6)', 'rgba(251,131,81,0.6)'] +let colors = ['#3373CC','#63AECC','#54BF93','#CC9D12','#FFDE95','#78D4F8','#63AECC','#19A576','#43C090','#43C090','#9DF5CA'] +function createData(ds = []) { + let arr = []; + for (let i = 0; i < ds.length; i++) { + let arr1 = ds[i]; + for (let j = 0; j < arr1.length; j++) { + let n = arr.findIndex(ele => { + return ele.name === arr1[j].Key; + }) + if (n === -1) { + let obj = + { + name: arr1[j].Key, + type: 'bar', + stack: 'total', + barWidth: 30, + barGap: "-100%", + emphasis: { + focus: 'series' + }, + label: { + show: true, + position: 'inside', + color: '#FFF', + fontWeight: 600, + fontSize: 10, + formatter: (res) => { + return res.data + '%' + } + }, + itemStyle: { + normal: { + //柱体的颜色 + //右,下,左,上(1,0,0,0)表示从正右开始向左渐变 + color: function () { + return new echarts.graphic.LinearGradient(0, 0, 0, 1, [ + { + offset: 0, + color: colors[j] + }, + { + offset: 1, + color: colors2[j] + } + ], false); + } + } + }, + data: [arr1[j].Value] + } + arr.push(obj) + } else { + arr[n].data.push(arr1[j].Value) + } + } + } + return arr; +} +export default function createOpt(dx = [], ds = []) { + const data = createData(ds); + return { + grid: { + left: 10, + right: 10, + bottom: 10, + containLabel: true + }, + tooltip: { + trigger: "axis", + backgroundColor: "#08182F", + color: "#fff", + borderColor: "#3373CC", + textStyle: { + color: "#fff", //设置文字颜色 + }, + extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;" + }, + color: colors, + legend: { + textStyle: { //图例文字的样式 + color: '#fff', + fontSize: 10 + }, + y: 10, + x: 10, + itemWidth: 12, + itemHeight: 12, + borderRadius: 1, //圆角半径 + }, + xAxis: { + type: 'category', + axisLabel :{ + interval:0, + formatter: (value) => { + let res = doStr(value, 8); + return res + } + }, + axisTick: { + show: false, + }, + axisLine: { + show: false, + lineStyle: { + color: "#fff", + }, + }, + data: dx + }, + yAxis: { + type: 'value', + min: 0, + max: 100, + axisLine: { + show: false, + lineStyle: { + color: "#fff", + }, + }, + axisLabel: { + formatter: (value) => { + return value + '%'; + } + }, + splitLine: { + lineStyle: { + type: "dashed", // y轴分割线类型 + color: "#012b4b", + }, + }, + }, + series: data + } + +} \ No newline at end of file diff --git a/src/views/SaleRank/MarketSaleNE/mnePrecisionType/precMpvPercent/index.vue b/src/views/SaleRank/MarketSaleNE/mnePrecisionType/precMpvPercent/index.vue new file mode 100644 index 0000000..e8eba31 --- /dev/null +++ b/src/views/SaleRank/MarketSaleNE/mnePrecisionType/precMpvPercent/index.vue @@ -0,0 +1,106 @@ + + + + 导出报告 + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/views/SaleRank/MarketSaleNE/mnePrecisionType/precMpvPercent/opt.js b/src/views/SaleRank/MarketSaleNE/mnePrecisionType/precMpvPercent/opt.js new file mode 100644 index 0000000..5ad1a5f --- /dev/null +++ b/src/views/SaleRank/MarketSaleNE/mnePrecisionType/precMpvPercent/opt.js @@ -0,0 +1,147 @@ +/* + * @Author: your name + * @Date: 2021-10-09 11:01:19 + * @LastEditTime: 2021-12-23 16:37:35 + * @LastEditors: Please set LastEditors + * @Description: In User Settings Edit + * @FilePath: /data-show/src/views/Index/spreadTheSound/opt.js + */ +import * as echarts from "echarts"; +import {doStr} from "@/utils/gol/dataTool" +import { bigNumberTransform } from "@/utils/gol/dataTool" +let colors2 = ['#3373CC60', '#63AECC60', '#54BF9360', '#CC9D1260', '#FFDE9560', '#78D4F860', 'rgba(58,162,114,0.6)', 'rgba(251,131,81,0.6)'] +let colors = ['#3373CC','#63AECC','#54BF93','#CC9D12','#FFDE95','#78D4F8','#63AECC','#19A576','#43C090','#43C090','#9DF5CA'] +function createData(ds = []) { + let arr = []; + for (let i = 0; i < ds.length; i++) { + let arr1 = ds[i]; + for (let j = 0; j < arr1.length; j++) { + let n = arr.findIndex(ele => { + return ele.name === arr1[j].Key; + }) + if (n === -1) { + let obj = + { + name: arr1[j].Key, + type: 'bar', + stack: 'total', + barWidth: 30, + barGap: "-100%", + emphasis: { + focus: 'series' + }, + label: { + show: true, + position: 'inside', + color: '#FFF', + fontWeight: 600, + fontSize: 10, + formatter: (res) => { + return res.data + '%' + } + }, + itemStyle: { + normal: { + //柱体的颜色 + //右,下,左,上(1,0,0,0)表示从正右开始向左渐变 + color: function () { + return new echarts.graphic.LinearGradient(0, 0, 0, 1, [ + { + offset: 0, + color: colors[j] + }, + { + offset: 1, + color: colors2[j] + } + ], false); + } + } + }, + data: [arr1[j].Value] + } + arr.push(obj) + } else { + arr[n].data.push(arr1[j].Value) + } + } + } + return arr; +} +export default function createOpt(dx = [], ds = []) { + const data = createData(ds); + return { + grid: { + left: 10, + right: 10, + bottom: 10, + containLabel: true + }, + tooltip: { + trigger: "axis", + backgroundColor: "#08182F", + color: "#fff", + borderColor: "#3373CC", + textStyle: { + color: "#fff", //设置文字颜色 + }, + extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;" + }, + color: colors, + legend: { + textStyle: { //图例文字的样式 + color: '#fff', + fontSize: 10 + }, + y: 10, + x: 10, + itemWidth: 12, + itemHeight: 12, + borderRadius: 1, //圆角半径 + }, + xAxis: { + type: 'category', + axisLabel :{ + interval:0, + formatter: (value) => { + let res = doStr(value, 8); + return res + } + }, + axisTick: { + show: false, + }, + axisLine: { + show: false, + lineStyle: { + color: "#fff", + }, + }, + data: dx + }, + yAxis: { + type: 'value', + min: 0, + max: 100, + axisLine: { + show: false, + lineStyle: { + color: "#fff", + }, + }, + axisLabel: { + formatter: (value) => { + return value + '%'; + } + }, + splitLine: { + lineStyle: { + type: "dashed", // y轴分割线类型 + color: "#012b4b", + }, + }, + }, + series: data + } + +} \ No newline at end of file diff --git a/src/views/SaleRank/MarketSaleNE/mnePrecisionType/precPercent/index.vue b/src/views/SaleRank/MarketSaleNE/mnePrecisionType/precPercent/index.vue new file mode 100644 index 0000000..3201742 --- /dev/null +++ b/src/views/SaleRank/MarketSaleNE/mnePrecisionType/precPercent/index.vue @@ -0,0 +1,105 @@ + + + + 导出报告 + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/views/SaleRank/MarketSaleNE/mnePrecisionType/precPercent/opt.js b/src/views/SaleRank/MarketSaleNE/mnePrecisionType/precPercent/opt.js new file mode 100644 index 0000000..42d4327 --- /dev/null +++ b/src/views/SaleRank/MarketSaleNE/mnePrecisionType/precPercent/opt.js @@ -0,0 +1,147 @@ +/* + * @Author: your name + * @Date: 2021-10-09 11:01:19 + * @LastEditTime: 2021-12-23 16:37:35 + * @LastEditors: Please set LastEditors + * @Description: In User Settings Edit + * @FilePath: /data-show/src/views/Index/spreadTheSound/opt.js + */ +import * as echarts from "echarts"; +import {doStr} from "@/utils/gol/dataTool" +import { bigNumberTransform } from "@/utils/gol/dataTool" +let colors = ['#5B8FF9','#7DAAFF','#9AC5FF','#B9E2FF','#3A9EC0','#5BB9DB','#78D4F8','#63AECC','#19A576','#43C090', +'#62DDAA','#9DF5CA','#9DF5CA','#FFD470','#FFDE95','#FFEBBF','#E19D62','#F7B075','#FDC388','#FDD69B'] +function createData(ds = []) { + let arr = []; + for (let i = 0; i < ds.length; i++) { + let arr1 = ds[i]; + for (let j = 0; j < arr1.length; j++) { + let n = arr.findIndex(ele => { + return ele.name === arr1[j].Key; + }) + if (n === -1) { + let obj = + { + name: arr1[j].Key, + type: 'bar', + stack: 'total', + barWidth: 36, + barGap: "-100%", + emphasis: { + focus: 'series' + }, + label: { + show: true, + position: 'inside', + color: '#FFF', + fontWeight: 600, + fontSize: 12, + formatter: (res) => { + return res.data + '%' + } + }, + itemStyle: { + normal: { + //柱体的颜色 + //右,下,左,上(1,0,0,0)表示从正右开始向左渐变 + color: function () { + return new echarts.graphic.LinearGradient(0, 0, 0, 1, [ + { + offset: 0, + color: colors[j] + }, + { + offset: 1, + color: colors[j] + } + ], false); + } + } + }, + data: [arr1[j].Value] + } + arr.push(obj) + } else { + arr[n].data.push(arr1[j].Value) + } + } + } + return arr; +} +export default function createOpt(dx = [], ds = []) { + const data = createData(ds); + return { + grid: { + left: 10, + right: 10, + bottom: 10, + containLabel: true + }, + tooltip: { + trigger: "axis", + backgroundColor: "#08182F", + color: "#fff", + borderColor: "#3373CC", + textStyle: { + color: "#fff", //设置文字颜色 + }, + extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;" + }, + color: colors, + legend: { + textStyle: { //图例文字的样式 + color: '#fff', + fontSize: 10 + }, + y: 10, + x: 10, + itemWidth: 12, + itemHeight: 12, + borderRadius: 1, //圆角半径 + }, + xAxis: { + type: 'category', + axisLabel :{ + interval:0, + formatter: (value) => { + let res = doStr(value, 8); + return res + } + }, + axisTick: { + show: false, + }, + axisLine: { + show: false, + lineStyle: { + color: "#fff", + }, + }, + data: dx + }, + yAxis: { + type: 'value', + min: 0, + max: 100, + axisLine: { + show: false, + lineStyle: { + color: "#fff", + }, + }, + axisLabel: { + formatter: (value) => { + return value + '%'; + } + }, + splitLine: { + lineStyle: { + type: "dashed", // y轴分割线类型 + color: "#012b4b", + }, + }, + }, + series: data + } + +} \ No newline at end of file diff --git a/src/views/SaleRank/MarketSaleNE/mnePrecisionType/precSuvPercent/index.vue b/src/views/SaleRank/MarketSaleNE/mnePrecisionType/precSuvPercent/index.vue new file mode 100644 index 0000000..50e4f61 --- /dev/null +++ b/src/views/SaleRank/MarketSaleNE/mnePrecisionType/precSuvPercent/index.vue @@ -0,0 +1,106 @@ + + + + 导出报告 + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/views/SaleRank/MarketSaleNE/mnePrecisionType/precSuvPercent/opt.js b/src/views/SaleRank/MarketSaleNE/mnePrecisionType/precSuvPercent/opt.js new file mode 100644 index 0000000..b62661a --- /dev/null +++ b/src/views/SaleRank/MarketSaleNE/mnePrecisionType/precSuvPercent/opt.js @@ -0,0 +1,147 @@ +/* + * @Author: your name + * @Date: 2021-10-09 11:01:19 + * @LastEditTime: 2021-12-23 16:37:35 + * @LastEditors: Please set LastEditors + * @Description: In User Settings Edit + * @FilePath: /data-show/src/views/Index/spreadTheSound/opt.js + */ +import * as echarts from "echarts"; +import {doStr} from "@/utils/gol/dataTool" +import { bigNumberTransform } from "@/utils/gol/dataTool" +let colors2 = ['#3373CC60', '#63AECC60', '#54BF9360', '#CC9D1260', '#FFDE9560', "rgba(114,191,222,0.6)", 'rgba(58,162,114,0.6)', 'rgba(251,131,81,0.6)'] +let colors = ['#3373CC','#63AECC','#54BF93','#CC9D12','#FFDE95','#FFDE95','#78D4F8','#63AECC','#19A576','#43C090','#43C090','#9DF5CA'] +function createData(ds = []) { + let arr = []; + for (let i = 0; i < ds.length; i++) { + let arr1 = ds[i]; + for (let j = 0; j < arr1.length; j++) { + let n = arr.findIndex(ele => { + return ele.name === arr1[j].Key; + }) + if (n === -1) { + let obj = + { + name: arr1[j].Key, + type: 'bar', + stack: 'total', + barWidth: 30, + barGap: "-100%", + emphasis: { + focus: 'series' + }, + label: { + show: true, + position: 'inside', + color: '#FFF', + fontWeight: 600, + fontSize: 10, + formatter: (res) => { + return res.data + '%' + } + }, + itemStyle: { + normal: { + //柱体的颜色 + //右,下,左,上(1,0,0,0)表示从正右开始向左渐变 + color: function () { + return new echarts.graphic.LinearGradient(0, 0, 0, 1, [ + { + offset: 0, + color: colors[j] + }, + { + offset: 1, + color: colors2[j] + } + ], false); + } + } + }, + data: [arr1[j].Value] + } + arr.push(obj) + } else { + arr[n].data.push(arr1[j].Value) + } + } + } + return arr; +} +export default function createOpt(dx = [], ds = []) { + const data = createData(ds); + return { + grid: { + left: 10, + right: 10, + bottom: 10, + containLabel: true + }, + tooltip: { + trigger: "axis", + backgroundColor: "#08182F", + color: "#fff", + borderColor: "#3373CC", + textStyle: { + color: "#fff", //设置文字颜色 + }, + extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;" + }, + color: colors, + legend: { + textStyle: { //图例文字的样式 + color: '#fff', + fontSize: 10 + }, + y: 10, + x: 10, + itemWidth: 12, + itemHeight: 12, + borderRadius: 1, //圆角半径 + }, + xAxis: { + type: 'category', + axisLabel :{ + interval:0, + formatter: (value) => { + let res = doStr(value, 8); + return res + } + }, + axisTick: { + show: false, + }, + axisLine: { + show: false, + lineStyle: { + color: "#fff", + }, + }, + data: dx + }, + yAxis: { + type: 'value', + min: 0, + max: 100, + axisLine: { + show: false, + lineStyle: { + color: "#fff", + }, + }, + axisLabel: { + formatter: (value) => { + return value + '%'; + } + }, + splitLine: { + lineStyle: { + type: "dashed", // y轴分割线类型 + color: "#012b4b", + }, + }, + }, + series: data + } + +} \ No newline at end of file diff --git a/src/views/SaleRank/MarketSaleTraditional/mstCountryPercent/index.vue b/src/views/SaleRank/MarketSaleTraditional/mstCountryPercent/index.vue index 9a96c8e..e5d4948 100644 --- a/src/views/SaleRank/MarketSaleTraditional/mstCountryPercent/index.vue +++ b/src/views/SaleRank/MarketSaleTraditional/mstCountryPercent/index.vue @@ -1,6 +1,8 @@ - + + 导出报告 + @@ -83,6 +85,22 @@ export default { this.opt = createOpt(dx, ds); }) }, + report() { + let obj = { + token: this.form.token, + sTimeType: 4, + sStartTime: this.selTime[0], + sEndTime: this.selTime[1], + isExcel: 1, + }; + getSalesCountrysTypes(obj).then(() => { + this.$notification.open({ + message: `数据生成中`, + description: "请前往个人中心查看下载进度", + placement: "bottomRight", + }); + }); + } } } diff --git a/src/views/SaleRank/MarketSaleTraditional/mstMPPercent/index.vue b/src/views/SaleRank/MarketSaleTraditional/mstMPPercent/index.vue index f33c78f..32b6c82 100644 --- a/src/views/SaleRank/MarketSaleTraditional/mstMPPercent/index.vue +++ b/src/views/SaleRank/MarketSaleTraditional/mstMPPercent/index.vue @@ -1,18 +1,124 @@ - 传统燃油车市场销量分析-主销价格占比 + + + 导出报告 + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/views/SaleRank/MarketSaleTraditional/mstMPPercent/opt.js b/src/views/SaleRank/MarketSaleTraditional/mstMPPercent/opt.js new file mode 100644 index 0000000..d5a1240 --- /dev/null +++ b/src/views/SaleRank/MarketSaleTraditional/mstMPPercent/opt.js @@ -0,0 +1,146 @@ +/* + * @Author: your name + * @Date: 2021-10-09 11:01:19 + * @LastEditTime: 2021-12-23 16:37:35 + * @LastEditors: Please set LastEditors + * @Description: In User Settings Edit + * @FilePath: /data-show/src/views/Index/spreadTheSound/opt.js + */ +import * as echarts from "echarts"; +import {doStr} from "@/utils/gol/dataTool" +import { bigNumberTransform } from "@/utils/gol/dataTool" +let colors = ['#5B8FF9','#7DAAFF','#9AC5FF','#B9E2FF','#3A9EC0','#5BB9DB','#78D4F8','#63AECC','#19A576','#43C090','#43C090','#9DF5CA' +,'#5B8FF9','#7DAAFF','#9AC5FF','#B9E2FF','#3A9EC0','#5BB9DB','#78D4F8','#63AECC','#19A576','#43C090','#43C090','#9DF5CA'] +function createData(ds = []) { + let arr = []; + for (let i = 0; i < ds.length; i++) { + let arr1 = ds[i]; + for (let j = 0; j < arr1.length; j++) { + let n = arr.findIndex(ele => { + return ele.name === arr1[j].Key; + }) + if (n === -1) { + let obj = + { + name: arr1[j].Key, + type: 'bar', + stack: 'total', + barWidth: 48, + barGap: "-100%", + emphasis: { + focus: 'series' + }, + label: { + show: true, + position: 'inside', + color: '#FFF', + fontWeight: 600, + formatter: (res) => { + return res.data + '%' + } + }, + itemStyle: { + normal: { + //柱体的颜色 + //右,下,左,上(1,0,0,0)表示从正右开始向左渐变 + color: function () { + return new echarts.graphic.LinearGradient(0, 0, 0, 1, [ + { + offset: 0, + color: colors[j] + }, + { + offset: 1, + color: colors[j] + } + ], false); + } + } + + }, + data: [arr1[j].Value] + } + arr.push(obj) + } else { + arr[n].data.push(arr1[j].Value) + } + } + } + return arr; +} +export default function createOpt(dx = [], ds = []) { + const data = createData(ds); + return { + grid: { + left: 10, + right: 10, + bottom: 10, + containLabel: true + }, + tooltip: { + trigger: "axis", + backgroundColor: "#08182F", + color: "#fff", + borderColor: "#3373CC", + textStyle: { + color: "#fff", //设置文字颜色 + }, + extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;" + }, + color: colors, + legend: { + textStyle: { //图例文字的样式 + color: '#fff', + fontSize: 10 + }, + y: 10, + x: 10, + itemWidth: 12, + itemHeight: 12, + borderRadius: 1, //圆角半径 + }, + xAxis: { + type: 'category', + axisLabel :{ + interval:0, + formatter: (value) => { + let res = doStr(value, 8); + return res + } + }, + axisTick: { + show: false, + }, + axisLine: { + show: false, + lineStyle: { + color: "#fff", + }, + }, + data: dx + }, + yAxis: { + type: 'value', + max: 100, + axisLine: { + show: false, + lineStyle: { + color: "#fff", + }, + }, + axisLabel: { + formatter: (value) => { + return value + '%' + } + }, + splitLine: { + lineStyle: { + type: "dashed", // y轴分割线类型 + color: "#012b4b", + }, + }, + }, + series: data + } + +} \ No newline at end of file diff --git a/src/views/SaleRank/MarketSaleTraditional/mstMainPrice/index.vue b/src/views/SaleRank/MarketSaleTraditional/mstMainPrice/index.vue index de61e21..1643349 100644 --- a/src/views/SaleRank/MarketSaleTraditional/mstMainPrice/index.vue +++ b/src/views/SaleRank/MarketSaleTraditional/mstMainPrice/index.vue @@ -1,9 +1,18 @@ - 传统燃油车市场销量分析-主销价格区间 + + + + + + \ No newline at end of file diff --git a/src/views/SaleRank/MarketSaleTraditional/mstMainPrice/mainBrand/opt.js b/src/views/SaleRank/MarketSaleTraditional/mstMainPrice/mainBrand/opt.js new file mode 100644 index 0000000..d4af7ed --- /dev/null +++ b/src/views/SaleRank/MarketSaleTraditional/mstMainPrice/mainBrand/opt.js @@ -0,0 +1,137 @@ +/* + * @Author: your name + * @Date: 2021-10-09 11:01:19 + * @LastEditTime: 2021-12-23 16:37:35 + * @LastEditors: Please set LastEditors + * @Description: In User Settings Edit + * @FilePath: /data-show/src/views/Index/spreadTheSound/opt.js + */ +import * as echarts from "echarts"; +import {doStr} from "@/utils/gol/dataTool" +import { bigNumberTransform } from "@/utils/gol/dataTool" +let colors = ['#5B8FF9','#7DAAFF','#9AC5FF','#B9E2FF','#3A9EC0','#5BB9DB','#78D4F8','#63AECC','#19A576','#43C090','#43C090','#9DF5CA' +,'#5B8FF9','#7DAAFF','#9AC5FF','#B9E2FF','#3A9EC0','#5BB9DB','#78D4F8','#63AECC','#19A576','#43C090','#43C090','#9DF5CA'] +function createData(ds = []) { + let arr = []; + for (let i = 0; i < ds.length; i++) { + let arr1 = ds[i]; + for (let j = 0; j < arr1.length; j++) { + let n = arr.findIndex(ele => { + return ele.name === arr1[j].Key; + }) + if (n === -1) { + let obj = + { + name: arr1[j].Key, + type: 'bar', + stack: 'total', + barWidth: 24, + barGap: "-100%", + emphasis: { + focus: 'series' + }, + itemStyle: { + normal: { + //柱体的颜色 + //右,下,左,上(1,0,0,0)表示从正右开始向左渐变 + color: function () { + return new echarts.graphic.LinearGradient(0, 0, 0, 1, [ + { + offset: 0, + color: colors[j] + }, + { + offset: 1, + color: colors[j] + } + ], false); + } + } + }, + data: [arr1[j].Value] + } + arr.push(obj) + } else { + arr[n].data.push(arr1[j].Value) + } + } + } + return arr; +} +export default function createOpt(dx = [], ds = []) { + const data = createData(ds); + return { + grid: { + left: 10, + right: 10, + bottom: 10, + containLabel: true + }, + tooltip: { + trigger: "axis", + backgroundColor: "#08182F", + color: "#fff", + borderColor: "#3373CC", + textStyle: { + color: "#fff", //设置文字颜色 + }, + extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;" + }, + color: colors, + legend: { + textStyle: { //图例文字的样式 + color: '#fff', + fontSize: 10 + }, + y: 10, + x: 10, + itemWidth: 12, + itemHeight: 12, + borderRadius: 1, //圆角半径 + }, + xAxis: { + type: 'category', + axisLabel :{ + interval:0, + formatter: (value) => { + let res = doStr(value, 8); + return res + } + }, + axisTick: { + show: false, + }, + axisLine: { + show: false, + lineStyle: { + color: "#fff", + }, + }, + data: dx + }, + yAxis: { + type: 'value', + min: 0, + max: 100, + axisLine: { + show: false, + lineStyle: { + color: "#fff", + }, + }, + axisLabel: { + formatter: (value) => { + return value + '%'; + } + }, + splitLine: { + lineStyle: { + type: "dashed", // y轴分割线类型 + color: "#012b4b", + }, + }, + }, + series: data + } + +} \ No newline at end of file diff --git a/src/views/SaleRank/MarketSaleTraditional/mstMainPrice/mainCountry/index.vue b/src/views/SaleRank/MarketSaleTraditional/mstMainPrice/mainCountry/index.vue new file mode 100644 index 0000000..35e1f33 --- /dev/null +++ b/src/views/SaleRank/MarketSaleTraditional/mstMainPrice/mainCountry/index.vue @@ -0,0 +1,126 @@ + + + + 导出报告 + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/views/SaleRank/MarketSaleTraditional/mstMainPrice/mainCountry/opt.js b/src/views/SaleRank/MarketSaleTraditional/mstMainPrice/mainCountry/opt.js new file mode 100644 index 0000000..42d4327 --- /dev/null +++ b/src/views/SaleRank/MarketSaleTraditional/mstMainPrice/mainCountry/opt.js @@ -0,0 +1,147 @@ +/* + * @Author: your name + * @Date: 2021-10-09 11:01:19 + * @LastEditTime: 2021-12-23 16:37:35 + * @LastEditors: Please set LastEditors + * @Description: In User Settings Edit + * @FilePath: /data-show/src/views/Index/spreadTheSound/opt.js + */ +import * as echarts from "echarts"; +import {doStr} from "@/utils/gol/dataTool" +import { bigNumberTransform } from "@/utils/gol/dataTool" +let colors = ['#5B8FF9','#7DAAFF','#9AC5FF','#B9E2FF','#3A9EC0','#5BB9DB','#78D4F8','#63AECC','#19A576','#43C090', +'#62DDAA','#9DF5CA','#9DF5CA','#FFD470','#FFDE95','#FFEBBF','#E19D62','#F7B075','#FDC388','#FDD69B'] +function createData(ds = []) { + let arr = []; + for (let i = 0; i < ds.length; i++) { + let arr1 = ds[i]; + for (let j = 0; j < arr1.length; j++) { + let n = arr.findIndex(ele => { + return ele.name === arr1[j].Key; + }) + if (n === -1) { + let obj = + { + name: arr1[j].Key, + type: 'bar', + stack: 'total', + barWidth: 36, + barGap: "-100%", + emphasis: { + focus: 'series' + }, + label: { + show: true, + position: 'inside', + color: '#FFF', + fontWeight: 600, + fontSize: 12, + formatter: (res) => { + return res.data + '%' + } + }, + itemStyle: { + normal: { + //柱体的颜色 + //右,下,左,上(1,0,0,0)表示从正右开始向左渐变 + color: function () { + return new echarts.graphic.LinearGradient(0, 0, 0, 1, [ + { + offset: 0, + color: colors[j] + }, + { + offset: 1, + color: colors[j] + } + ], false); + } + } + }, + data: [arr1[j].Value] + } + arr.push(obj) + } else { + arr[n].data.push(arr1[j].Value) + } + } + } + return arr; +} +export default function createOpt(dx = [], ds = []) { + const data = createData(ds); + return { + grid: { + left: 10, + right: 10, + bottom: 10, + containLabel: true + }, + tooltip: { + trigger: "axis", + backgroundColor: "#08182F", + color: "#fff", + borderColor: "#3373CC", + textStyle: { + color: "#fff", //设置文字颜色 + }, + extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;" + }, + color: colors, + legend: { + textStyle: { //图例文字的样式 + color: '#fff', + fontSize: 10 + }, + y: 10, + x: 10, + itemWidth: 12, + itemHeight: 12, + borderRadius: 1, //圆角半径 + }, + xAxis: { + type: 'category', + axisLabel :{ + interval:0, + formatter: (value) => { + let res = doStr(value, 8); + return res + } + }, + axisTick: { + show: false, + }, + axisLine: { + show: false, + lineStyle: { + color: "#fff", + }, + }, + data: dx + }, + yAxis: { + type: 'value', + min: 0, + max: 100, + axisLine: { + show: false, + lineStyle: { + color: "#fff", + }, + }, + axisLabel: { + formatter: (value) => { + return value + '%'; + } + }, + splitLine: { + lineStyle: { + type: "dashed", // y轴分割线类型 + color: "#012b4b", + }, + }, + }, + series: data + } + +} \ No newline at end of file diff --git a/src/views/SaleRank/MarketSaleTraditional/mstPrecisionType/precAutoPercent/index.vue b/src/views/SaleRank/MarketSaleTraditional/mstPrecisionType/precAutoPercent/index.vue index 2faad3c..df95d6c 100644 --- a/src/views/SaleRank/MarketSaleTraditional/mstPrecisionType/precAutoPercent/index.vue +++ b/src/views/SaleRank/MarketSaleTraditional/mstPrecisionType/precAutoPercent/index.vue @@ -1,5 +1,5 @@ - + 导出报告 @@ -87,7 +87,7 @@ export default {