张雄 3 years ago
parent d66676f8ca
commit 70b69c1c54

@ -7,7 +7,13 @@
* @FilePath: /data-show/src/components/v-tab-group/index.vue
-->
<template>
<div class="v-t-g-container" ref="V-t-g">
<div v-if="!getIsLight" class="v-t-g-container" ref="V-t-g">
<template v-for="(item,index) in btns">
<span v-if="activeInex === index" class="v-g-item v-g-item-active" :key="index" @click="handlerClick(index)">{{item}}</span>
<span v-else class="v-g-item" :key="index" @click="handlerClick(index)">{{item}}</span>
</template>
</div>
<div v-else class="v-light-container" ref="V-l-g">
<template v-for="(item,index) in btns">
<span v-if="activeInex === index" class="v-g-item v-g-item-active" :key="index" @click="handlerClick(index)">{{item}}</span>
<span v-else class="v-g-item" :key="index" @click="handlerClick(index)">{{item}}</span>
@ -58,18 +64,38 @@ export default {
padding: 3px;
border-radius: 2px;
font-size: 14px;
.v-g-item {
display: inline-block;
padding: 2px 10px;
color: #63AECC;
text-align: center;
cursor: pointer;
border-radius: 2px;
}
.v-g-item-active {
background: linear-gradient(180deg, #00498C 0%, #002343 100%);
border: 1px solid #63AECC;
}
}
.v-g-item {
display: inline-block;
padding: 2px 10px;
color: #63AECC;
text-align: center;
cursor: pointer;
.v-light-container {
display: inline-block;
background: #FFF;
padding: 3px;
border-radius: 2px;
}
.v-g-item-active {
background: linear-gradient(180deg, #00498C 0%, #002343 100%);
border: 1px solid #63AECC;
font-size: 14px;
border: 1px solid #1EC8FA;
.v-g-item {
display: inline-block;
padding: 2px 10px;
text-align: center;
color: #000;
cursor: pointer;
border-radius: 2px;
}
.v-g-item-active {
background: #E7F1FF;
border: 1px solid #63AECC;
color: #000
}
}
</style>

@ -11,7 +11,7 @@ import router from "@/router"
import NProgress from "nprogress"
import "nprogress/nprogress.css"
const whitePath = ['/', '/login', '/industryDataExport','/index']
const whitePath = ['/', '/login', '/industryDataExport','/index','/keyMediaHome']
router.beforeEach((to, from, next) => {
NProgress.start()
const token = store.getters.getToken;

@ -49,6 +49,7 @@ import KeyMediaBrand from "@/views/KeyMediaBrand"
import KeyMediaSeries from "@/views/KeyMediaSeries"
import KeyMediaEvent from "@/views/KeyMediaEvent"
import KeyMediaTheme from "@/views/KeyMediaTheme"
import KeyMediaHome from "@/views/KeyMediaHome"
const router = [
{
path: '/login',
@ -67,6 +68,12 @@ const router = [
desc: "行业洞察",
component: Index
},
{
path: "/keyMediaHome",
name: "keyMediaHome",
desc: "行业洞察",
component: KeyMediaHome
},
{
path: "/myself",
name: "myself",

@ -1,5 +1,5 @@
.ant-select-selection {
.ant-select-selection {
background: #1B4163 !important;
border: 1px solid #63AECC !important;
&:hover {
@ -7,6 +7,19 @@
color: #fff !important;
}
}
.lightSy { //选择器浅色模式
.ant-select-selection {
background: #E7F1FF !important;
border: 1px solid #63AECC !important;
&:hover {
background-color: #E7F1FF !important;
color: #000 !important;
}
};
.ant-select {
color: #000 !important;
}
}
.ant-select-arrow .ant-select-arrow-icon svg {
color: #63AECC;
}
@ -40,6 +53,14 @@
.ant-input {
background-color: #1B4163 !important;
border: 1px solid #63AECC !important;
color: #fff !important;
}
.lightSy {
.ant-input {
background-color: #E7F1FF !important;
border: 1px solid #63AECC !important;
color: #000 !important;
}
}
.ant-cascader-picker {
@ -80,6 +101,11 @@
.ant-calendar-picker-icon {
color: #fff !important;
}
.lightSy {
.ant-calendar-picker-icon {
color: #45BCF4 !important;
}
}
.ant-calendar-month-panel {
box-shadow: 0px 0px 10px 0px #3373CC !important;
border-radius: 2px !important;
@ -148,7 +174,14 @@
color: #4f95b7 !important;
background: linear-gradient(180deg, #00498C 0%, #002343 100%) !important;
border: 1px solid #4f95b7 !important;
}
}
.lightSy {
.ant-btn-primary {
color: #0F2A4D !important;
background: #E7F1FF !important;
border: 1px solid #4f95b7 !important;
}
}
.ant-steps-item-wait .ant-steps-item-icon > .ant-steps-icon {
color: #3373CC !important;
}
@ -174,8 +207,10 @@
.ant-form-item-label > label {
color: #fff !important;
}
.ant-input {
color: #fff !important;
.lightSy {
.ant-form-item-label > label {
color: #000 !important;
}
}
.ant-input-group-addon {
background: transparent !important;
@ -467,4 +502,14 @@ li.ant-calendar-time-picker-select-option-selected {
}
.ant-select-selection--multiple .ant-select-selection__choice__remove {
color: #63AECC !important;
}
}
.lightSy {
.ant-select-selection--multiple .ant-select-selection__choice {
color: #000000 !important;
border: 0.0625rem solid #63AECC !important;
background-color: #E7F1FF !important;
};
.ant-select-selection--multiple .ant-select-selection__choice__remove {
color: #000000 !important;
}
}

@ -61,7 +61,12 @@ export default {
});
},
goKeyMedia(item) {
console.log(item)
this.$router.push({
path: '/keyMediaHome',
query: {
source: item.label
}
})
}
},
};

@ -84,12 +84,12 @@ export default {
})
})
},
handlerItem(row) {
let ele = this.darr[row.rowIndex];
if(row.columnIndex === 0) {
let id = ele[4];
this.$router.push({path: '/eventDEC', query: {events_id: id}});
}
handlerItem(row) {
// let ele = this.darr[row.rowIndex];
// if(row.columnIndex === 0) {
// let id = ele[4];
// this.$router.push({path: '/eventDEC', query: {events_id: id}});
// }
}
},
};

@ -85,11 +85,11 @@ export default {
})
},
handlerItem(row) {
let ele = this.darr[row.rowIndex];
if(row.columnIndex === 0) {
let id = ele[4];
this.$router.push({path: '/eventDEC', query: {events_id: id}});
}
// let ele = this.darr[row.rowIndex];
// if(row.columnIndex === 0) {
// let id = ele[4];
// this.$router.push({path: '/eventDEC', query: {events_id: id}});
// }
}
},
};

@ -0,0 +1,321 @@
<!--
* @Author: your name
* @Date: 2021-10-14 09:00:09
* @LastEditTime: 2021-10-16 15:54:30
* @LastEditors: Please set LastEditors
* @Description: 微博详情
* @FilePath: /data-show/src/views/WeiboDetails/index.vue
-->
<template>
<div class="d-container">
<div class="wd-outter">
<div class="wd-d1">
<v-label-div title="详情数据">
<v-tab-group-control v-if="form.sSource == ''"
:btns="['全部', '车友圈']"
:active="getCarCircle"
@change="handlerTab" style="margin-right: 24px"
></v-tab-group-control>
<v-btn @click="goback"></v-btn>
</v-label-div>
<div class="wd-d1-bd">
<div class="d1"> {{ form.sSource }} </div>
<div class="d2" style="margin-left: 114px">
<img class="dd1" src="../../assets/images/BrandInsight/ic_xxzl.png" />
<div class="dd2">
<span class="s1">{{ total }}</span>
<span class="s2">信息总量</span>
</div>
</div>
<div class="d2">
<img class="dd1" src="../../assets/images/BrandInsight/ic_dvsl.png" />
<div class="dd2">
<span class="s1">{{ totalRep }}</span>
<span class="s2">评论总数</span>
</div>
</div>
<!-- <div class="d2">
<img class="dd1" src="../../assets/images/BrandInsight/ic_yhs.png" />
<div class="dd2">
<span class="s1">{{ countObj.userCount }}</span>
<span class="s2">参与用户数</span>
</div>
</div> -->
<div class="d2">
<img class="dd1" src="../../assets/images/BrandInsight/ic_yqdx.png" />
<a-popover title="舆情调性">
<template slot="content">
<template v-for="(item, key) in countObj2">
<div class="pd-item" :key="key">
<span >{{key}}</span>
<span>{{item}}</span>
</div>
</template>
</template>
<div class="dd3">
<span class="s3" :style="{ width: (countObj2['正面'] / total) * width + 'px' }" ></span>
<span class="s3" :style="{ width: (countObj2['中性'] / total) * width + 'px', background: '#54BF93',}"></span>
<span class="s3" :style="{ width: (countObj2['负面'] / total) * width + 'px', background: '#CC9D12',}"></span>
</div>
</a-popover>
</div>
</div>
</div>
<div class="wd-d2" v-if="form.sSource == '新浪微博' || form.sSource == '汽车之家' || (form.sSource == '懂车帝' && getCarCircle == 1)">
<vue-lazy-component>
<weibo-communication-trend-long></weibo-communication-trend-long>
<weiboCommunicationTrendLongStoken slot="skeleton"></weiboCommunicationTrendLongStoken>
</vue-lazy-component>
</div>
<div class="wd-d2" v-else>
<vue-lazy-component>
<weibo-communication-trend></weibo-communication-trend>
<weiboCommunicationTrendStoken slot="skeleton"></weiboCommunicationTrendStoken>
</vue-lazy-component>
<vue-lazy-component>
<weiboContentTOPVolume></weiboContentTOPVolume>
<weiboContentTOPVolumeStoken slot="skeleton"></weiboContentTOPVolumeStoken>
</vue-lazy-component>
</div>
<div class="wd-d3">
<!-- <subscribeSeries></subscribeSeries> -->
<spreadTOPbrands></spreadTOPbrands>
<spreadTOPmodels></spreadTOPmodels>
</div>
<div class="wd-d4">
<vue-lazy-component>
<weiboContentType></weiboContentType>
<weiboContentTypeStoken slot="skeleton"></weiboContentTypeStoken>
</vue-lazy-component>
<vue-lazy-component>
<weiboCharacters></weiboCharacters>
<weiboCharactersStoken slot="skeleton"></weiboCharactersStoken>
</vue-lazy-component>
<vue-lazy-component>
<weiboWordCloud></weiboWordCloud>
<weiboWordCloudStoken slot="skeleton"></weiboWordCloudStoken>
</vue-lazy-component>
</div>
<div class="wd-d3" v-if="form.sSource == '新浪微博' || form.sSource == '汽车之家' || (form.sSource == '懂车帝' && getCarCircle == 1)">
<vue-lazy-component v-if="form.sSource == '新浪微博' || form.sSource == '汽车之家'">
<weiboUserActiveArea></weiboUserActiveArea>
<weiboUserActiveAreaStoken slot="skeleton"></weiboUserActiveAreaStoken>
</vue-lazy-component>
<popularEventsList v-if="form.sSource == '懂车帝' && getCarCircle == 1"></popularEventsList>
<vue-lazy-component>
<weiboContentTOPVolume></weiboContentTOPVolume>
<weiboContentTOPVolumeStoken slot="skeleton"></weiboContentTOPVolumeStoken>
</vue-lazy-component>
</div>
</div>
</div>
</template>
<script>
import weiboCommunicationTrend from "./weiboCommunicationTrend";
import weiboCommunicationTrendLong from "./weiboCommunicationTrendLong";
import weiboContentType from "./weiboContentType";
import weiboCharacters from "./weiboCharacters";
import weiboUserActiveArea from "./weiboUserActiveArea";
import weiboContentTOPVolume from "./weiboContentTOPVolume";
import weiboWordCloud from "./weiboWordCloud";
import spreadTOPmodels from "./spreadTOPmodels";
import spreadTOPbrands from "./spreadTOPbrands"
import subscribeSeries from "./subscribeSeries";
import popularEventsList from "./popularEventsList";
//
import weiboCommunicationTrendStoken from "./weiboCommunicationTrendStoken";
import weiboCommunicationTrendLongStoken from "./weiboCommunicationTrendLongStoken";
import weiboContentTypeStoken from "./weiboContentTypeStoken";
import weiboCharactersStoken from "./weiboCharactersStoken";
import weiboUserActiveAreaStoken from "./weiboUserActiveAreaStoken";
import weiboContentTOPVolumeStoken from "./weiboContentTOPVolumeStoken";
import weiboWordCloudStoken from "./weiboWordCloudStoken";
import {getHomeCountAndaffections} from "@/api/KeyMediaHome/index.js"
export default {
name: "WeiboDetails",
inject: ['reload'],
components: {
weiboCommunicationTrend, //
weiboCommunicationTrendLong,
weiboContentType, //
weiboCharacters, //
weiboUserActiveArea, //
weiboContentTOPVolume, // TOP
weiboWordCloud, //
spreadTOPmodels, // TOP
subscribeSeries, // TOP
spreadTOPbrands, // top
popularEventsList, //
//
weiboCommunicationTrendStoken, //
weiboCommunicationTrendLongStoken,
weiboContentTypeStoken, //
weiboCharactersStoken, //
weiboUserActiveAreaStoken, //
weiboContentTOPVolumeStoken, // TOP
weiboWordCloudStoken, //
},
data() {
return {
width: 200,
form: {
sSource: '',
ilimitType: 0,
},
countObj: {
carseriesCount: 0,
count: 0,
userCount: 0,
vCount: 0,
},
countObj2: {
正面: 0,
中性: 0,
负面: 0,
},
total: 0,
totalRep: 0,
};
},
created() {
this.form.sSource = this.$route.query.source || "抖音";
if(this.form.sSource == '汽车之家') {
this.form.ilimitType = 1;
} else if (this.form.sSource == '懂车帝' && this.getCarCircle == 1) {
this.form.ilimitType = 2;
}
this.getData();
},
methods: {
goback() {
this.$router.go(-1);
},
getData() {
let obj = Object.assign({}, this.getCtime2, this.form);
// getBrandWeiBoCount0528(obj).then((res) => {
// let data = res.data;
// this.countObj = Object.assign(this.countObj, data);
// });
getHomeCountAndaffections(obj).then(res => {
let data = res.data.Affections || {};
this.total = res.data.Count;
this.totalRep = res.data.ReplyCount;
this.countObj2 = {
正面: data[0].Value,
中性: data[1].Value,
负面: data[2].Value,
}
})
},
handlerTab(val) {
this.setCarCircle(val);
this.reload();
}
},
};
</script>
<style lang="less" scoped>
.wd-outter {
padding: 0px 16px 16px 16px;
}
.wd-d1 {
width: 100%;
height: 222px;
border: 2px solid #0f2a4d;
.wd-d1-bd {
width: 100%;
height: calc(100% - 48px);
display: flex;
justify-content: flex-start;
align-items: center;
.d1 {
width: 150px;
height: 150px;
background-image: url("../../assets/images/BrandInsight/img_lq.png");
background-repeat: no-repeat;
background-size: cover;
margin-left: 114px;
text-align: center;
line-height: 150px;
font-size: 24px;
color: #b2daf7;
}
.d2 {
width: 378px;
height: 82px;
display: flex;
justify-content: flex-start;
.dd1 {
width: 80px;
height: 80px;
}
.dd2 {
margin-left: 20px;
height: 100%;
.s1 {
display: block;
font-size: 34px;
font-family: Bebas;
color: #ffffff;
}
.s2 {
display: block;
font-size: 20px;
color: #8f969c;
}
}
.dd3 {
margin-left: 20px;
height: 100%;
display: flex;
justify-content: flex-start;
align-items: center;
.s3 {
width: 87px;
height: 33px;
display: inline-block;
margin-right: 2px;
background: #3373cc;
}
}
}
}
}
.wd-d2 {
width: 100%;
height: auto;
display: flex;
justify-content: flex-start;
margin-top: 16px;
}
.wd-d3 {
width: 100%;
height: auto;
display: flex;
justify-content: flex-start;
margin-top: 16px;
}
.wd-d4 {
width: 100%;
height: auto;
display: flex;
justify-content: flex-start;
margin-top: 16px;
}
.wd-d5 {
width: 100%;
height: auto;
display: flex;
justify-content: flex-start;
margin-top: 16px;
}
.pd-item {
display: flex;
justify-content: space-between;
color: #fff;
border-bottom: 1px solid #173b6d;
padding: 10px;
}
</style>

@ -0,0 +1,105 @@
<!--
* @Author: xw
* @Date: 2021-10-12 10:50:44
* @LastEditTime: 2021-11-17 15:56:14
* @LastEditors: Please set LastEditors
* @Description: 热门事件列表
* @FilePath: /data-show/src/views/BrandInsight/popularEventsList/index.vue
-->
<template>
<div class="pe-ouuter" v-loading="load">
<v-label-div title="消息数据" :showLine="false" :eStyle="{'border-style': 'none'}"></v-label-div>
<div class="pe-inner">
<dv-scroll-board :config="config" :style="{ width: '100%', height: '25rem' }" @click="handlerItem"/>
</div>
</div>
</template>
<script>
// import { getHotEventsList0528 } from "@/api/BrandInsight";
import {getHomeList} from "@/api/KeyMediaHome/index.js"
export default {
name: "popularEventsList",
props: ["brand"],
data() {
return {
load: false,
form: {
sSource: '',
ilimitType: 0,
iPageIndex: 1,
iPageSize: 100,
},
config: {},
darr: []
};
},
created() {
this.form.sSource = this.$route.query.source || "抖音";
if(this.form.sSource == '汽车之家') {
this.form.ilimitType = 1;
} else if (this.form.sSource == '懂车帝' && this.getCarCircle == 1) {
this.form.ilimitType = 2;
}
this.getData();
},
methods: {
getData() {
let obj = Object.assign({}, this.getCtime2, this.form);
// this.load = true;
getHomeList(obj).then(res => {
console.log(res)
let data = res.data;
let arr = [];
let arr2 = [];
data.forEach(ele => {
let a = [
`<span style='cursor: pointer;'>${ele._source.title}</span>`,
ele._source.user_author,
ele._source.sourcetime,
];
let b = [
`<span style='cursor: pointer;'>${ele._source.itle}</span>`,
ele._source.user_author,
ele._source.sourcetime,
ele._source.id
];
arr.push(a);
arr2.push(b);
this.darr = arr2;
this.config = {
headerBGC: "rgba(16,33,59)",
oddRowBGC: "#173b6d",
evenRowBGC: "rgba(69, 149, 244, 0)",
columnWidth: [500,180,180],
rowNum: 8,
header: ["消息列表", "作者", "时间"],
data: arr,
};
this.load = false;
})
})
},
handlerItem(row) {
// let ele = this.darr[row.rowIndex];
// if(row.columnIndex === 0) {
// let id = ele[4];
// this.$router.push({path: '/eventDEC', query: {events_id: id}});
// }
}
},
};
</script>
<style lang="less" scoped>
.pe-ouuter {
width: 934px;
height: 459px;
border: 2px solid #0f2a4d;
.pe-inner {
width: 100%;
height: calc(100% - 48px);
}
}
</style>

@ -0,0 +1,77 @@
<!--
* @Author: your name
* @Date: 2021-10-12 18:18:20
* @LastEditTime: 2021-11-01 09:59:18
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/BrandInsight/spreadTOPmodels/index.vue
-->
<template>
<div class="stm-outter" v-loading="load">
<v-label-div title="传播声量TOP品牌" :showLine="false" :eStyle="{'border-style': 'none'}"></v-label-div>
<div class="stm-inner">
<v-echarts :opt="opt" @getData="clickEchars"></v-echarts>
</div>
</div>
</template>
<script>
import {getHomeBrandGroupBy} from "@/api/KeyMediaHome/index.js"
import createOpt from "./opt"
export default {
name: "spreadTOPmodels",
data() {
return {
load: false,
form: {
sSource: '',
ilimitType: 0,
},
opt: {}
}
},
created() {
this.form.sSource = this.$route.query.source || "抖音";
if(this.form.sSource == '汽车之家') {
this.form.ilimitType = 1;
} else if (this.form.sSource == '懂车帝' && this.getCarCircle == 1) {
this.form.ilimitType = 2;
}
this.getData();
},
methods: {
getData() {
let obj = Object.assign({},this.getCtime2, this.form);
this.load = true;
getHomeBrandGroupBy(obj).then(res => {
let data = res.data || [];
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 brand = ele.axisValueLabel;
this.setBrand({brandname: brand});
this.$router.push("/brandInsight");
}
}
}
</script>
<style lang="less" scoped>
.stm-outter {
width: 936px;
height: 412px;
border: 2px solid #0f2a4d;
.stm-inner {
width: 100%;
height: calc(100% - 48px);
}
}
</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: "#CC9D1240", // 0% 处的颜色
},
{
offset: 1,
color: "#CC9D12", // 100% 处的颜色#3373CC
},
],
false
),
},
},
},
],
}
}

@ -0,0 +1,78 @@
<!--
* @Author: your name
* @Date: 2021-10-12 18:18:20
* @LastEditTime: 2021-11-01 09:59:18
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/BrandInsight/spreadTOPmodels/index.vue
-->
<template>
<div class="stm-outter" v-loading="load">
<v-label-div title="传播声量TOP车型" :showLine="false" :eStyle="{'border-style': 'none'}"></v-label-div>
<div class="stm-inner">
<v-echarts :opt="opt" @getData="clickEchars"></v-echarts>
</div>
</div>
</template>
<script>
import {getHomeCartypeTop10} from "@/api/KeyMediaHome/index.js"
import createOpt from "./opt"
export default {
name: "spreadTOPmodels",
data() {
return {
load: false,
form: {
sSource: '',
ilimitType: 0,
},
opt: {}
}
},
created() {
this.form.sSource = this.$route.query.source || "抖音";
if(this.form.sSource == '汽车之家') {
this.form.ilimitType = 1;
} else if (this.form.sSource == '懂车帝' && this.getCarCircle == 1) {
this.form.ilimitType = 2;
}
this.getData();
},
methods: {
getData() {
let obj = Object.assign({},this.getCtime2, this.form);
this.load = true;
getHomeCartypeTop10(obj).then(res => {
let data = res.data || {};
let dx = [];
let ds = [];
for(let key in data) {
dx.push(key);
ds.push(data[key])
}
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" scoped>
.stm-outter {
width: 936px;
height: 412px;
border: 2px solid #0f2a4d;
margin-left: 16px;
.stm-inner {
width: 100%;
height: calc(100% - 48px);
}
}
</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: "rgba(99,187,143,0.4)", // 0% 处的颜色
},
{
offset: 1,
color: "#51bc8f", // 100% 处的颜色#3373CC
},
],
false
),
},
},
},
],
}
}

@ -0,0 +1,81 @@
<!--
* @Author: your name
* @Date: 2021-10-12 18:18:20
* @LastEditTime: 2021-11-01 09:59:18
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/BrandInsight/spreadTOPmodels/index.vue
-->
<template>
<div class="stm-outter" v-loading="load">
<v-label-div title="关注TOP车型" :showLine="false" :eStyle="{'border-style': 'none'}"></v-label-div>
<div class="stm-inner">
<v-echarts :opt="opt" @getData="clickEchars"></v-echarts>
</div>
</div>
</template>
<script>
import {getGuanZhuSeriesname} from "@/api/KeyMediaBrand/index.js"
import createOpt from "./opt"
export default {
name: "spreadTOPmodels",
data() {
return {
load: false,
form: {
sBrand: "",
token: "",
sSource: '',
ilimitType: 0,
},
opt: {}
}
},
created() {
this.form.token = this.getToken;
this.form.sBrand = this.getBrand.brandname || "奥迪";
this.form.sSource = this.$route.query.source || "抖音";
if(this.form.sSource == '汽车之家') {
this.form.ilimitType = 1;
} else if (this.form.sSource == '懂车帝' && this.getCarCircle == 1) {
this.form.ilimitType = 2;
}
this.getData();
},
methods: {
getData() {
let obj = Object.assign({},this.getCtime2, this.form);
this.load = true;
getGuanZhuSeriesname(obj).then(res => {
let data = res.data || {};
let dx = [];
let ds = [];
for(let key in data) {
dx.push(key);
ds.push(data[key])
}
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" scoped>
.stm-outter {
width: 936px;
height: 412px;
border: 2px solid #0f2a4d;
.stm-inner {
width: 100%;
height: calc(100% - 48px);
}
}
</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: "#CC9D1240", // 0% 处的颜色
},
{
offset: 1,
color: "#CC9D12", // 100% 处的颜色#3373CC
},
],
false
),
},
},
},
],
}
}

@ -0,0 +1,188 @@
<!--
* @Author: your name
* @Date: 2021-10-14 10:48:56
* @LastEditTime: 2021-11-09 13:16:07
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/WeiboDetails/weiboCharacters/index.vue
-->
<template>
<div class="wc-outter" v-loading="load">
<v-label-div title="内容分布">
<div>
<v-tab-group
:btns="['认证', '精华', '图文']"
@change="handlerTab"
></v-tab-group>
</div>
</v-label-div>
<div class="wc-inner">
<div class="d1">
<v-echarts :opt="opt"></v-echarts>
</div>
<div class="d2">
<div v-if="labelArr.length<=3">
<v-label-ctx
v-for="(item, index) in labelArr"
:key="index"
:label="item.Key"
:cont="item.Value"
:percentage="((item.Value / total) * 100).toFixed(2) + '%'"
:color="colors[index]"
:eStyle="{ height: '8.54rem' }"
></v-label-ctx>
</div>
<vue-scroll v-if="labelArr.length>3">
<v-label-ctx
v-for="(item, index) in labelArr"
:key="index"
:label="item.Key"
:cont="item.Value"
:percentage="((item.Value / total) * 100).toFixed(2) + '%'"
:color="colors[index]"
:eStyle="{ height: '5.14rem' }"
></v-label-ctx>
</vue-scroll>
</div>
</div>
</div>
</template>
<script>
import { getSexMergeWeiBo } from "@/api/WeiboDetails";
import {getHomeUserAttestationGroupBy, getHomeIsjingGroupBy, getHomePicboolGroupBy} from "@/api/KeyMediaHome/index.js";
import createOpt from "./opt";
export default {
name: "weiboCharacters",
data() {
return {
load: false,
form: {
sSource: '',
ilimitType: 0,
},
RegionWeiBo: [],
attestation: [],
sex: [],
total: 0,
labelArr: [],
opt: createOpt(),
colors: [
"#54BF93",
"#3373CC",
"#CC9D12",
"#f15c80",
"#e4d354",
"#8085e8",
"#8d4653",
"#91e8e1",
"#f7a35c",
"#90ed7d",
"#54BF93",
"#3373CC",
"#CC9D12",
"#f15c80",
"#e4d354",
"#8085e8",
"#8d4653",
"#91e8e1",
"#f7a35c",
"#90ed7d",
],
};
},
created() {
this.form.sSource = this.$route.query.source || "抖音";
if(this.form.sSource == '汽车之家') {
this.form.ilimitType = 1;
} else if (this.form.sSource == '懂车帝' && this.getCarCircle == 1) {
this.form.ilimitType = 2;
}
this.getData();
},
methods: {
//
getData() {
let obj = Object.assign({}, this.getCtime2, this.form);
// this.load = true;
getHomeUserAttestationGroupBy(obj).then((res) => {
let data = res.data || {};
this.doVal(data)
this.load = false;
});
},
//
toArr(obj) {
let arr = [];
for (let key in obj) {
let o = {
key: key,
value: obj[key],
};
arr.push(o);
}
return arr;
},
//
doVal(arr = []) {
let total = 0;
arr.forEach((ele) => {
total += ele.Value * 1;
});
this.total = total;
this.labelArr = arr;
this.opt = createOpt(this.labelArr, this.colors);
},
//
handlerTab(n) {
switch (n) {
case 0:
getHomeUserAttestationGroupBy(Object.assign({}, this.getCtime2, this.form)).then((res) => {
let data = res.data || {};
this.doVal(data)
this.load = false;
});
case 1:
getHomeIsjingGroupBy(Object.assign({}, this.getCtime2, this.form)).then((res) => {
let data = res.data || {};
this.doVal(data)
this.load = false;
});
break;
case 2:
getHomePicboolGroupBy(Object.assign({}, this.getCtime2, this.form)).then((res) => {
let data = res.data || {};
this.doVal(data)
this.load = false;
});
}
},
},
};
</script>
<style lang="less" scoped>
.wc-outter {
width: 618px;
height: 460px;
border: 2px solid #0f2a4d;
margin-left: 16px;
overflow: hidden;
.wc-inner {
width: 100%;
height: calc(100% - 48px);
display: flex;
justify-content: flex-start;
.d1 {
width: 280px;
height: 100%;
}
.d2 {
width: 300px;
margin-left: 16px;
}
}
}
</style>

@ -0,0 +1,72 @@
/*
* @Author: your name
* @Date: 2021-10-09 09:49:50
* @LastEditTime: 2021-10-28 13:07:24
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/Index/userPortrait/opt.js
*/
import * as echarts from "echarts";
// let colors = ['#3373CC', '#CC9D12', '#54BF93','#f15c80', '#e4d354', '#8085e8', '#8d4653', '#91e8e1','#f7a35c','#90ed7d']
function createData(ds = [], colors) {
let arr = [];
ds.map((ele, index) => {
let obj = {
value: ele.Value,
name: ele.Key,
itemStyle: {
color: colors[index]
}
}
arr.push(obj)
})
return arr;
}
export default function createOpt(ds = [], color = []) {
const data = createData(ds, color);
return {
series: [
{
name: 'Access From0',
type: 'pie',
radius: ['65%', '80%'],
avoidLabelOverlap: false,
label: {
show: false,
position: 'center',
lineHeight: 36
},
emphasis: {
label: {
show: true,
fontSize: '20',
color: "#ffff",
fontWeight: 'bold',
formatter: function (p) {
return `${p.data.name}\n${p.percent}%\n${p.data.value}`
}
}
},
labelLine: {
show: false
},
data: data
},
{
name: 'Access From1',
type: 'pie',
radius: ['86%', '94%'],
avoidLabelOverlap: false,
label: {
show: false,
position: 'center'
},
labelLine: {
show: false
},
center: ['50%', '50%'],//边框位置
data: data
}
]
}
}

@ -0,0 +1,73 @@
<!--
* @Author: your name
* @Date: 2021-10-14 10:48:56
* @LastEditTime: 2021-11-09 13:16:07
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/WeiboDetails/weiboCharacters/index.vue
-->
<template>
<div class="wc-outter">
</div>
</template>
<script>
export default {
name: "weiboCharacters",
data() {
return {
form: {
sBrand: "",
token: "",
},
colors: [
"#54BF93",
"#3373CC",
"#CC9D12",
"#f15c80",
"#e4d354",
"#8085e8",
"#8d4653",
"#91e8e1",
"#f7a35c",
"#90ed7d",
"#54BF93",
"#3373CC",
"#CC9D12",
"#f15c80",
"#e4d354",
"#8085e8",
"#8d4653",
"#91e8e1",
"#f7a35c",
"#90ed7d",
],
};
},
};
</script>
<style lang="less" scoped>
.wc-outter {
width: 618px;
height: 460px;
border: 2px solid #0f2a4d;
margin-left: 16px;
overflow: hidden;
.wc-inner {
width: 100%;
height: calc(100% - 48px);
display: flex;
justify-content: flex-start;
.d1 {
width: 280px;
height: 100%;
}
.d2 {
width: 300px;
margin-left: 16px;
}
}
}
</style>

@ -0,0 +1,131 @@
<!--
* @Author: your name
* @Date: 2021-10-14 10:11:41
* @LastEditTime: 2021-11-09 13:16:55
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/WeiboDetails/weiboCommunicationTrend/index.vue
-->
<template>
<div class="wct-outter" v-loading="load">
<v-label-div title="传播态势">
</v-label-div>
<div class="wct-inner">
<v-echarts :opt="opt"></v-echarts>
</div>
<!-- <div class="vshow" v-if="modelShow" :style="modelStyle">
<vLabel-div title="实时热点事件">
<a-button @click="closeBox"></a-button>
</vLabel-div>
<div class="vshow-item" v-for="(item, index) in urlArr" :key="index">
<a class="vshow-link" :href="item.url" v-if="item.column == activeCol" target="tar">{{item.title}}</a>
</div>
</div> -->
</div>
</template>
<script>
import {getHomeTimeCount} from "@/api/KeyMediaHome/index.js"
import {doStr} from "@/utils/gol/dataTool"
import createOpt from "./opt"
export default {
name: "weibo-communication-trend",
data() {
return {
////
modelStyle:{
left: '',
top: ''
},
modelShow: false,
ecbox:{//
width:618,
height:490
},
ecmodel:{//
width:300,
height:280
},
activeCol: 0,
//-*-//
load: false,
form: {
sSource: '',
ilimitType: 0,
},
opt: createOpt(),
urlArr: []
}
},
created() {
this.form.sSource = this.$route.query.source || "抖音";
if(this.form.sSource == '汽车之家') {
this.form.ilimitType = 1;
} else if (this.form.sSource == '懂车帝' && this.getCarCircle == 1) {
this.form.ilimitType = 2;
}
this.getData();
},
methods: {
//----//
// clickMark(data) {
// this.activeCol = data.index
// this.modelShow = true;
// let mw = window.event;
// if((this.ecbox.width - mw.offsetX - 20) > this.ecmodel.width) {
// this.modelStyle.left = mw.offsetX + 20 + "px"
// } else {
// this.modelStyle.left = mw.offsetX - this.ecmodel.width - 20 + "px"
// }
// if((this.ecbox.height - mw.offsetY - 20) > this.ecmodel.height) {
// this.modelStyle.top = mw.offsetY + "px"
// } else {
// this.modelStyle.top = mw.offsetY - this.ecmodel.height + "px"
// }
// },
// closeBox() {
// this.modelShow = false;
// },
//----//
getData() {
this.load = true;
let obj = Object.assign({}, this.getCtime2, this.form);
getHomeTimeCount(obj).then(res => {
let data = res.data || [];
let dx = []; //time
let ds = []; //value
data.forEach(ele => {
dx.push(ele.Time);
ds.push(ele.value);
})
this.opt = createOpt(dx, ds)
this.load = false
});
}
}
};
</script>
<style lang="less" scoped>
.wct-outter {
width: 936px;
height: 460px;
border: 2px solid #0f2a4d;
.wct-inner {
width: 100%;
height: calc(100% - 48px);
}
}
.vshow{
position: absolute;
width: 300px;
background: rgb(3, 18, 36);
border: 4px solid #0f2a4d;
.vshow-item {
padding: 11px;
width: 100%;
font-size: 15px;
color: rgb(54, 189, 239);
}
}
</style>

@ -0,0 +1,116 @@
/*
* @Author: your name
* @Date: 2021-10-12 15:32:24
* @LastEditTime: 2021-11-19 19:50:21
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/BrandInsight/weiboVolumeTrend/opt.js
*/
import * as echarts from "echarts";
import { bigNumberTransform } from "@/utils/gol/dataTool"
export default function createOpt(dx = [], ds = [], hotIndex = []) {
let mark = [];
hotIndex.forEach(ele => {
let obj = {
name: 'Max',
xAxis: ele, yAxis: ds[ele],
symbol: 'pin',
symbolSize: 16,
symbolOffset: [0, '-70%'],
}
mark.push(obj)
})
return {
grid: {
top: 16,
left: 16,
right: "5%",
bottom: 10,
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,
},
axisLabel: {
formatter: (value) => {
let rex = "00:00:00";
let isCont = false;
let str = value;
for(let i = 0;i<dx.length-1;i++){
//连续两条带小时
if(dx[i].indexOf(rex) === -1 && dx[i+1].indexOf(rex) === -1){
isCont = true;
break;
}
}
if(isCont == true) {
str = value.substring(10, 16)
} else {
str = value.substring(5, 10)
}
return str;
}
},
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: ds,
type: 'line',
color: '#546fc5',
areaStyle: {normal: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: '#546fc5'
}, {
offset: 1,
color: 'rgba(0,0,0,0)'
}]),
}},
markPoint: {
data: mark,
}
}
]
};
}

@ -0,0 +1,135 @@
<!--
* @Author: your name
* @Date: 2021-10-14 10:11:41
* @LastEditTime: 2021-11-09 13:16:55
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/WeiboDetails/weiboCommunicationTrend/index.vue
-->
<template>
<div class="wct-outter" v-loading="load">
<v-label-div title="传播态势">
</v-label-div>
<div class="wct-inner">
<v-echarts :opt="opt"></v-echarts>
</div>
<!-- <div class="vshow" v-if="modelShow" :style="modelStyle">
<vLabel-div title="实时热点事件">
<a-button @click="closeBox"></a-button>
</vLabel-div>
<div class="vshow-item" v-for="(item, index) in urlArr" :key="index">
<a class="vshow-link" :href="item.url" v-if="item.column == activeCol" target="tar">{{item.title}}</a>
</div>
</div> -->
</div>
</template>
<script>
import {getTimeCount} from "@/api/KeyMediaBrand/index.js"
import {doStr} from "@/utils/gol/dataTool"
import createOpt from "./opt"
export default {
name: "weibo-communication-trend",
data() {
return {
////
modelStyle:{
left: '',
top: ''
},
modelShow: false,
ecbox:{//
width:618,
height:490
},
ecmodel:{//
width:300,
height:280
},
activeCol: 0,
//-*-//
load: false,
form: {
sBrand: "",
token: "",
sSource: '',
ilimitType: 0,
},
opt: createOpt(),
urlArr: []
}
},
created() {
this.form.token = this.getToken;
this.form.sBrand = this.getBrand.brandname || "奥迪";
this.form.sSource = this.$route.query.source || "抖音";
if(this.form.sSource == '汽车之家') {
this.form.ilimitType = 1;
} else if (this.form.sSource == '懂车帝' && this.getCarCircle == 1) {
this.form.ilimitType = 2;
}
this.getData();
},
methods: {
//----//
// clickMark(data) {
// this.activeCol = data.index
// this.modelShow = true;
// let mw = window.event;
// if((this.ecbox.width - mw.offsetX - 20) > this.ecmodel.width) {
// this.modelStyle.left = mw.offsetX + 20 + "px"
// } else {
// this.modelStyle.left = mw.offsetX - this.ecmodel.width - 20 + "px"
// }
// if((this.ecbox.height - mw.offsetY - 20) > this.ecmodel.height) {
// this.modelStyle.top = mw.offsetY + "px"
// } else {
// this.modelStyle.top = mw.offsetY - this.ecmodel.height + "px"
// }
// },
// closeBox() {
// this.modelShow = false;
// },
//----//
getData() {
this.load = true;
let obj = Object.assign({}, this.getCtime2, this.form);
getTimeCount(obj).then(res => {
let data = res.data || [];
let dx = []; //time
let ds = []; //value
data.forEach(ele => {
dx.push(ele.Time);
ds.push(ele.value);
})
this.opt = createOpt(dx, ds)
this.load = false
});
}
}
};
</script>
<style lang="less" scoped>
.wct-outter {
width: 1887px;
height: 460px;
border: 2px solid #0f2a4d;
.wct-inner {
width: 100%;
height: calc(100% - 48px);
}
}
.vshow{
position: absolute;
width: 300px;
background: rgb(3, 18, 36);
border: 4px solid #0f2a4d;
.vshow-item {
padding: 11px;
width: 100%;
font-size: 15px;
color: rgb(54, 189, 239);
}
}
</style>

@ -0,0 +1,116 @@
/*
* @Author: your name
* @Date: 2021-10-12 15:32:24
* @LastEditTime: 2021-11-19 19:50:21
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/BrandInsight/weiboVolumeTrend/opt.js
*/
import * as echarts from "echarts";
import { bigNumberTransform } from "@/utils/gol/dataTool"
export default function createOpt(dx = [], ds = [], hotIndex = []) {
let mark = [];
hotIndex.forEach(ele => {
let obj = {
name: 'Max',
xAxis: ele, yAxis: ds[ele],
symbol: 'pin',
symbolSize: 16,
symbolOffset: [0, '-70%'],
}
mark.push(obj)
})
return {
grid: {
top: 16,
left: 16,
right: "5%",
bottom: 10,
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,
},
axisLabel: {
formatter: (value) => {
let rex = "00:00:00";
let isCont = false;
let str = value;
for(let i = 0;i<dx.length-1;i++){
//连续两条带小时
if(dx[i].indexOf(rex) === -1 && dx[i+1].indexOf(rex) === -1){
isCont = true;
break;
}
}
if(isCont == true) {
str = value.substring(10, 16)
} else {
str = value.substring(5, 10)
}
return str;
}
},
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: ds,
type: 'line',
color: '#546fc5',
areaStyle: {normal: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: '#546fc5'
}, {
offset: 1,
color: 'rgba(0,0,0,0)'
}]),
}},
markPoint: {
data: mark,
}
}
]
};
}

@ -0,0 +1,38 @@
<!--
* @Author: your name
* @Date: 2021-10-14 10:11:41
* @LastEditTime: 2021-11-09 13:16:55
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/WeiboDetails/weiboCommunicationTrend/index.vue
-->
<template>
<div class="wct-outter">
</div>
</template>
<script>
export default {
name: "weibo-communication-trend",
data() {
return {
form: {
sBrand: "",
token: "",
},
}
},
};
</script>
<style lang="less" scoped>
.wct-outter {
width: 1872px;
height: 460px;
border: 2px solid #0f2a4d;
.wct-inner {
width: 100%;
height: calc(100% - 48px);
}
}
</style>

@ -0,0 +1,38 @@
<!--
* @Author: your name
* @Date: 2021-10-14 10:11:41
* @LastEditTime: 2021-11-09 13:16:55
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/WeiboDetails/weiboCommunicationTrend/index.vue
-->
<template>
<div class="wct-outter">
</div>
</template>
<script>
export default {
name: "weibo-communication-trend",
data() {
return {
form: {
sBrand: "",
token: "",
},
}
},
};
</script>
<style lang="less" scoped>
.wct-outter {
width: 618px;
height: 460px;
border: 2px solid #0f2a4d;
.wct-inner {
width: 100%;
height: calc(100% - 48px);
}
}
</style>

@ -0,0 +1,112 @@
<!--
* @Author: your name
* @Date: 2021-10-14 15:54:06
* @LastEditTime: 2021-11-04 17:03:24
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/WeiboDetails/weiboContentTOPVolume/index.vue
-->
<template>
<div class="wct-outter" v-loading="load">
<v-label-div title="内容TOP声量"> </v-label-div>
<div class="wct-inner">
<div class="wct-d1" v-for="(item,index) in list" :key="index">
<v-echarts :opt="item.opt"></v-echarts>
<div class="wct-d1-dd1">
<span>排名<span class="ss1">0{{index+1}}</span></span>
<span>声量<span class="ss1">{{item.value}}</span></span>
</div>
</div>
</div>
</div>
</template>
<script>
import {comparePig} from "@/utils/gol/dataTool"
import createOpt from "./opt"
import {getHomeDirectWeiBo0528} from "@/api/KeyMediaHome/index.js"
export default {
name: "weiboContentTOPVolume",
data() {
return {
load: false,
form: {
sSource: '',
ilimitType: 0,
},
list: [],
colors: ['#3373CC', '#63AECC', '#54BF93', '#CC9D12', '#3373CC', '#63AECC', '#54BF93', '#CC9D12']
};
},
created() {
this.form.sSource = this.$route.query.source || "抖音";
if(this.form.sSource == '汽车之家') {
this.form.ilimitType = 1;
} else if (this.form.sSource == '懂车帝' && this.getCarCircle == 1) {
this.form.ilimitType = 2;
}
this.getData();
},
methods: {
getData() {
// this.load = true;
let obj = Object.assign({}, this.getCtime2, this.form);
getHomeDirectWeiBo0528(obj).then(res => {
let data = res.data || [];
let arr = [];
data.sort(comparePig('value'));
let maxVal = data[0].value
data.forEach((ele,index) => {
let obj = {
value: ele.value,
opt: createOpt(ele.key,this.colors[index],ele.value, maxVal)
}
arr.push(obj)
})
this.list = arr;
this.load = false;
});
}
}
}
</script>
<style lang="less" scoped>
.wct-outter {
width: 936px;
height: 460px;
border: 2px solid #0f2a4d;
margin-left: 16px;
overflow: hidden;
}
.wct-inner {
width: 100%;
margin-top: 16px;
height: calc(100% - 48px);
.wct-d1 {
position: relative;
width: 233px;
height: 206px;
display: inline-block;
.wct-d1-dd1 {
position: absolute;
padding: 0px 16px;
width: 100%;
height: auto;
display: flex;
justify-content: space-between;
top: 140px;
left: 0px;
span {
color: #d8d8d8;
font-size: 12px;
.ss1 {
font-family: Bebas;
font-size: 16px;
color: #ffffff;
}
}
}
}
}
</style>

@ -0,0 +1,81 @@
/*
* @Author: your name
* @Date: 2021-10-14 16:05:12
* @LastEditTime: 2021-11-04 17:05:41
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/WeiboDetails/weiboContentTOPVolume/opt.js
* startAngle: 180,
*/
import * as echarts from "echarts";
export default function createOpt(name, color, num, maxVal) {
return {
tooltip: {
backgroundColor: "#08182F",
color: "#fff",
borderColor: "#3373CC",
textStyle: {
color: "#fff", //设置文字颜色
},
extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;",
formatter: function(param) {
let value = param.data.value;
let name = param.data.name;
return `<span>${name}</span><br><span>声量:${value}</span>`
}
},
series: [
{
name: name,
type: 'gauge',
startAngle: 180,
endAngle: 0,
min: 0,
max: maxVal * 5,
splitNumber: 5,
detail: { show: false, formatter: '{value}%' },
axisLine: {
show: true,
lineStyle: {
width: 7,
color: [
[1, new echarts.graphic.LinearGradient(0, 0, 1, 0, [
{
offset: 0,
color: "#020f1f"
},
{
offset: 1,
color: color
}
])
]
]
}
},
axisLabel: {
distance: -30,
color: "#d8d8d8",
},
splitLine: {
distance: -6,
length: 12,
lineStyle: {
color: '#d8d8d8',
width: 2
}
},
// 刻度线
axisTick: {
show: true,
length: 15,
lineStyle: {
color: "auto",
width: 5
}
},
data: [{ value: num, name: name, title: {show: true, color: color,fontWeight: 'bold'},itemStyle:{color: color}}],
}
]
};
}

@ -0,0 +1,66 @@
<!--
* @Author: your name
* @Date: 2021-10-14 15:54:06
* @LastEditTime: 2021-11-04 17:03:24
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/WeiboDetails/weiboContentTOPVolume/index.vue
-->
<template>
<div class="wct-outter">
</div>
</template>
<script>
export default {
name: "weiboContentTOPVolume",
data() {
return {
form: {
sBrand: "",
token: "",
}
};
},
}
</script>
<style lang="less" scoped>
.wct-outter {
width: 936px;
height: 460px;
border: 2px solid #0f2a4d;
margin-left: 16px;
overflow: hidden;
}
.wct-inner {
width: 100%;
margin-top: 16px;
height: calc(100% - 48px);
.wct-d1 {
position: relative;
width: 233px;
height: 206px;
display: inline-block;
.wct-d1-dd1 {
position: absolute;
padding: 0px 16px;
width: 100%;
height: auto;
display: flex;
justify-content: space-between;
top: 140px;
left: 0px;
span {
color: #d8d8d8;
font-size: 12px;
.ss1 {
font-family: Bebas;
font-size: 16px;
color: #ffffff;
}
}
}
}
}
</style>

@ -0,0 +1,122 @@
<!--
* @Author: your name
* @Date: 2021-10-14 10:24:56
* @LastEditTime: 2021-11-09 13:17:24
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/WeiboDetails/weiboContentType/index.vue
-->
<template>
<div class="wct-outter" v-loading="load">
<v-label-div title="内容类型"> </v-label-div>
<div class="wct-inner">
<div class="d1">
<v-echarts :opt="opt"></v-echarts>
</div>
<div class="d2">
<v-label-ctx
v-for="(item, index) in labelArr"
:key="index"
:label="item.key"
:cont="item.value"
:percentage="((item.value / total) * 100).toFixed(2) + '%'"
:color="colors[index]"
:eStyle="{ height: '8.54rem' }"
></v-label-ctx>
</div>
</div>
</div>
</template>
<script>
import {getHomeWtypeWeiBo0528} from "@/api/KeyMediaHome/index.js"
import createOpt from "./opt";
export default {
name: "weiboContentType",
data() {
return {
load: false,
form: {
sSource: '',
ilimitType: 0,
},
labelArr: [],
total: 0,
opt: createOpt(),
colors: [
"#54BF93",
"#3373CC",
"#CC9D12",
"#f15c80",
"#e4d354",
"#8085e8",
"#8d4653",
"#91e8e1",
"#f7a35c",
"#90ed7d",
"#54BF93",
"#3373CC",
"#CC9D12",
"#f15c80",
"#e4d354",
"#8085e8",
"#8d4653",
"#91e8e1",
"#f7a35c",
"#90ed7d",
],
};
},
created() {
this.form.sSource = this.$route.query.source || "抖音";
if(this.form.sSource == '汽车之家') {
this.form.ilimitType = 1;
} else if (this.form.sSource == '懂车帝' && this.getCarCircle == 1) {
this.form.ilimitType = 2;
}
this.getData();
},
methods: {
getData() {
this.load = true;
let obj = Object.assign({}, this.getCtime2, this.form);
getHomeWtypeWeiBo0528(obj).then((res) => {
let data = res.data || [];
this.doVal(data);
this.load = false;
});
},
doVal(arr = []) {
let total = 0;
arr.forEach((ele) => {
total += ele.value * 1;
});
this.total = total;
this.labelArr = arr;
this.opt = createOpt(this.labelArr, this.colors);
},
},
};
</script>
<style lang="less" scoped>
.wct-outter {
width: 618px;
height: 460px;
border: 2px solid #0f2a4d;
overflow: hidden;
.wct-inner {
width: 100%;
height: calc(100% - 48px);
display: flex;
justify-content: flex-start;
.d1 {
width: 280px;
height: 100%;
}
.d2 {
width: 300px;
margin-left: 16px;
}
}
}
</style>

@ -0,0 +1,72 @@
/*
* @Author: your name
* @Date: 2021-10-09 09:49:50
* @LastEditTime: 2021-10-28 13:07:24
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/Index/userPortrait/opt.js
*/
import * as echarts from "echarts";
// let colors = ['#3373CC', '#CC9D12', '#54BF93','#f15c80', '#e4d354', '#8085e8', '#8d4653', '#91e8e1','#f7a35c','#90ed7d']
function createData(ds = [], colors) {
let arr = [];
ds.map((ele, index) => {
let obj = {
value: ele.value,
name: ele.key,
itemStyle: {
color: colors[index]
}
}
arr.push(obj)
})
return arr;
}
export default function createOpt(ds = [], color = []) {
const data = createData(ds, color);
return {
series: [
{
name: 'Access From0',
type: 'pie',
radius: ['65%', '80%'],
avoidLabelOverlap: false,
label: {
show: false,
position: 'center',
lineHeight: 36
},
emphasis: {
label: {
show: true,
fontSize: '20',
color: "#ffff",
fontWeight: 'bold',
formatter: function (p) {
return `${p.data.name}\n${p.percent}%\n${p.data.value}`
}
}
},
labelLine: {
show: false
},
data: data
},
{
name: 'Access From1',
type: 'pie',
radius: ['86%', '94%'],
avoidLabelOverlap: false,
label: {
show: false,
position: 'center'
},
labelLine: {
show: false
},
center: ['50%', '50%'],//边框位置
data: data
}
]
}
}

@ -0,0 +1,50 @@
<!--
* @Author: your name
* @Date: 2021-10-14 10:24:56
* @LastEditTime: 2021-11-09 13:17:24
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/WeiboDetails/weiboContentType/index.vue
-->
<template>
<div class="wct-outter">
</div>
</template>
<script>
export default {
name: "weiboContentType",
data() {
return {
form: {
sBrand: "",
token: "",
},
};
},
};
</script>
<style lang="less" scoped>
.wct-outter {
width: 618px;
height: 460px;
border: 2px solid #0f2a4d;
margin-left: 16px;
overflow: hidden;
.wct-inner {
width: 100%;
height: calc(100% - 48px);
display: flex;
justify-content: flex-start;
.d1 {
width: 280px;
height: 100%;
}
.d2 {
width: 300px;
margin-left: 16px;
}
}
}
</style>

@ -0,0 +1,110 @@
<!--
* @Author: your name
* @Date: 2021-10-14 11:25:20
* @LastEditTime: 2021-11-10 17:13:41
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/WeiboDetails/weiboUserActiveArea/index.vue
-->
<template>
<div class="wua-outter" v-loading="load">
<v-label-div title="用户活跃地区"> </v-label-div>
<div class="wua-inner">
<div class="d1">
<v-echarts :opt="opt1"></v-echarts>
</div>
<div class="d2">
<v-echars-map :opt="opt2"></v-echars-map>
</div>
</div>
</div>
</template>
<script>
import {getHomeUserRegionGroupBy} from "@/api/KeyMediaHome/index.js"
import createOptD1 from "./opt1";
import createOptD2 from "./opt2";
export default {
name: "weiboUserActiveArea",
data() {
return {
load: false,
form: {
sSource: '',
ilimitType: 0,
},
opt1: createOptD1(),
opt2: createOptD2(),
};
},
created() {
this.form.sSource = this.$route.query.source || "抖音";
if(this.form.sSource == '汽车之家') {
this.form.ilimitType = 1;
} else if (this.form.sSource == '懂车帝' && this.getCarCircle == 1) {
this.form.ilimitType = 2;
}
this.getData();
},
methods: {
getData() {
this.load = true;
let obj = Object.assign({}, this.getCtime2, this.form);
getHomeUserRegionGroupBy(obj).then((res) => {
let data = res.data || {};
let dx = []; //
let ds = []; //
let arr = [];
data.forEach((ele) => {
dx.push(ele.Key);
ds.push(ele.Value);
let obj = {
name: ele.Key,
value: ele.Value,
};
arr.push(obj)
});
let dm = arr //
this.opt1 = createOptD1(dx, ds);
this.opt2 = createOptD2(dm);
this.load = false;
});
},
//
toArr(obj) {
let arr = [];
for (let key in obj) {
let o = {
name: key,
value: obj[key] * 1,
};
arr.push(o);
}
return arr;
},
},
};
</script>
<style lang="less" scoped>
.wua-outter {
width: 936px;
height: 460px;
border: 2px solid #0f2a4d;
.wua-inner {
width: 100%;
height: calc(100% - 48px);
display: flex;
justify-content: flex-start;
.d1 {
width: 479px;
height: 100%;
}
.d2 {
width: 420px;
height: 100%;
margin-left: 16px;
}
}
}
</style>

@ -0,0 +1,83 @@
/*
* @Author: your name
* @Date: 2021-10-09 12:38:34
* @LastEditTime: 2021-10-14 11:48:19
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/Index/tailInsight/opt.js
*/
import * as echarts from "echarts";
import { bigNumberTransform } from "@/utils/gol/dataTool"
export default function createOptD1(dx=[],ds=[]) {
return {
grid: {
left: 16,
right: '5%',
bottom: 10,
top: "1%",
containLabel: true
},
tooltip: {
trigger: "axis",
backgroundColor: "#08182F",
color: "#fff",
borderColor: "#3373CC",
textStyle: {
color: "#fff", //设置文字颜色
},
extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;"
},
xAxis: {
type: 'value',
axisLine: {
show: false,
lineStyle: {
color: "#fff",
},
},
axisLabel: {
formatter: (value) => {
let str = bigNumberTransform(value);
return str;
}
},
splitLine: {
lineStyle: {
type: "dashed", // y轴分割线类型
color: "#012b4b",
},
},
},
yAxis: {
type: 'category',
data: dx,
axisTick: {
show: false,
},
axisLine: {
show: false,
lineStyle: {
color: "#fff",
},
},
inverse: true
},
series: [
{
name: '2011',
type: 'bar',
barWidth: 20,
data: ds,
color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{
offset: 0,
color: 'rgba(59,106,179,0.4)'
}, {
offset: 1,
color: '#2f68b4'
}]),
}
]
}
}

@ -0,0 +1,94 @@
/*
* @Author: your name
* @Date: 2021-10-14 11:53:16
* @LastEditTime: 2021-11-04 17:17:02
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/WeiboDetails/weiboUserActiveArea/opt2.js
*/
export default function createOptD2(dm) {
return {
tooltip: {
trigger: "item",
backgroundColor: "#08182F",
color: "#fff",
borderColor: "#3373CC",
textStyle: {
color: "#fff", //设置文字颜色
},
extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;"
},
// geo: {
// show: true,
// map: 'china',
// roam: false,//地图设置不可拖拽,固定的
// itemStyle: {
// normal: {
// borderWidth: 0,
// shadowColor: 'rgba(0,54,255, 1)',
// shadowBlur: 100
// }
// }
// },
visualMap: {
type: 'continuous',
show: false,
min: 0,
max: 2000,
text: ['高', '低'],
orient: 'horizontal',
itemWidth: 15,
itemHeight: 200,
right: 0,
bottom: 30,
inRange: {
color: ['#0393d2', '#75ddff']
},
textStyle: {
color: 'white'
}
},
series: [
{
name: "微博区域",
type: "map",
mapType: "china",
roam: false,
zoom: 1,//默认地图在容器中显示zoom:1,可根据需求放大缩小地图
left: 16,
top: 20,
right: 10,
bottom: 10,
selectedMode:'multiple',
colorBy: 'data',
itemStyle: {
areaColor: '#001f5b',//地图区域背景颜色
borderColor: '#005cf9',//地图边界颜色
shadowColor: '#005cf9',
emphasis: {
areaColor: '#3066ba',//鼠标滑过区域颜色
label: {
color: '#fff'
}
}
},
label: {
normal: {
show: false
},
},
// select: {
// label: {
// show: false
// },
// itemStyle: {
// areaColor: '#3edffe'
// }
// },
data: dm
}
]
}
}

@ -0,0 +1,49 @@
<!--
* @Author: your name
* @Date: 2021-10-14 11:25:20
* @LastEditTime: 2021-11-10 17:13:41
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/WeiboDetails/weiboUserActiveArea/index.vue
-->
<template>
<div class="wua-outter">
</div>
</template>
<script>
export default {
name: "weiboUserActiveArea",
data() {
return {
form: {
sBrand: "",
token: "",
},
};
},
};
</script>
<style lang="less" scoped>
.wua-outter {
width: 936px;
height: 460px;
border: 2px solid #0f2a4d;
.wua-inner {
width: 100%;
height: calc(100% - 48px);
display: flex;
justify-content: flex-start;
.d1 {
width: 479px;
height: 100%;
}
.d2 {
width: 420px;
height: 100%;
margin-left: 16px;
}
}
}
</style>

@ -0,0 +1,83 @@
<!--
* @Author: your name
* @Date: 2021-10-14 19:06:52
* @LastEditTime: 2021-10-14 19:14:42
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/WeiboDetails/weiboWordCloud/index.vue
-->
<template>
<div class="wwc-outter" v-loading="load">
<v-label-div title="词云分布">
</v-label-div>
<div class="wwc-inner">
<v-echarts :opt="opt"></v-echarts>
</div>
</div>
</template>
<script>
import {getHomeHotWord} from "@/api/KeyMediaHome/index.js"
import createWordCloud from "@/utils/gol/bubbleWord";
//import createOpt from "./opt";
export default {
name: "weiboWordCloud",
data() {
return {
opt: {},
load: false,
positiveData: {},
negativeData: {},
form: {
sSource: '',
ilimitType: 0,
},
};
},
created() {
this.form.sSource = this.$route.query.source || "抖音";
if(this.form.sSource == '汽车之家') {
this.form.ilimitType = 1;
} else if (this.form.sSource == '懂车帝' && this.getCarCircle == 1) {
this.form.ilimitType = 2;
}
this.getData();
},
methods: {
getData() {
this.load = true;
Promise.all([this.getH()]).then(() => {
//
this.load = false;
});
},
//
getH() {
return new Promise((resolve, reject) => {
let obj = Object.assign({}, this.getCtime2, this.form);
getHomeHotWord(obj).then((res) => {
this.positiveData = res.data || {};
this.opt = createWordCloud(res.data);
resolve(res);
})
.catch(() => {
reject(false);
});
});
},
},
};
</script>
<style lang="less" scoped>
.wwc-outter {
width: 618px;
height: 460px;
border: 2px solid #0f2a4d;
margin-left: 16px;
.wwc-inner {
width: 100%;
height: calc(100% - 48px);
}
}
</style>

@ -0,0 +1,215 @@
/*
* @Author: your name
* @Date: 2021-10-09 13:35:13
* @LastEditTime: 2021-10-14 19:14:21
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/Index/hotDiscussionGraph/opt.js
*/
// import * as echarts from "echarts";
const dataBJ = [
[1, 55, 9, 56, 0.46, 18, 6, '良'],
[2, 25, 11, 21, 0.65, 34, 9, '优'],
[3, 56, 7, 63, 0.3, 14, 5, '良'],
[4, 33, 7, 29, 0.33, 16, 6, '优'],
[5, 42, 24, 44, 0.76, 40, 16, '优'],
[6, 82, 58, 90, 1.77, 68, 33, '良'],
[7, 74, 49, 77, 1.46, 48, 27, '良'],
[8, 78, 55, 80, 1.29, 59, 29, '良'],
[9, 267, 216, 280, 4.8, 108, 64, '重度污染'],
// [10, 185, 127, 216, 2.52, 61, 27, '中度污染'],
// [11, 39, 19, 38, 0.57, 31, 15, '优'],
// [12, 41, 11, 40, 0.43, 21, 7, '优'],
// [13, 64, 38, 74, 1.04, 46, 22, '良'],
// [14, 108, 79, 120, 1.7, 75, 41, '轻度污染'],
// [15, 108, 63, 116, 1.48, 44, 26, '轻度污染'],
// [16, 33, 6, 29, 0.34, 13, 5, '优'],
// [17, 94, 66, 110, 1.54, 62, 31, '良'],
// [18, 186, 142, 192, 3.88, 93, 79, '中度污染'],
// [19, 57, 31, 54, 0.96, 32, 14, '良'],
// [20, 22, 8, 17, 0.48, 23, 10, '优'],
// [21, 39, 15, 36, 0.61, 29, 13, '优'],
// [22, 94, 69, 114, 2.08, 73, 39, '良'],
// [23, 99, 73, 110, 2.43, 76, 48, '良'],
// [24, 31, 12, 30, 0.5, 32, 16, '优'],
// [25, 42, 27, 43, 1, 53, 22, '优'],
// [26, 154, 117, 157, 3.05, 92, 58, '中度污染'],
// [27, 234, 185, 230, 4.09, 123, 69, '重度污染'],
// [28, 160, 120, 186, 2.77, 91, 50, '中度污染'],
// [29, 134, 96, 165, 2.76, 83, 41, '轻度污染'],
// [30, 52, 24, 60, 1.03, 50, 21, '良'],
// [31, 46, 5, 49, 0.28, 10, 6, '优']
];
const dataGZ = [
[1, 26, 37, 27, 1.163, 27, 13, '优'],
[2, 85, 62, 71, 1.195, 60, 8, '良'],
[3, 78, 38, 74, 1.363, 37, 7, '良'],
[4, 21, 21, 36, 0.634, 40, 9, '优'],
[5, 41, 42, 46, 0.915, 81, 13, '优'],
// [6, 56, 52, 69, 1.067, 92, 16, '良'],
// [7, 64, 30, 28, 0.924, 51, 2, '良'],
// [8, 55, 48, 74, 1.236, 75, 26, '良'],
// [9, 76, 85, 113, 1.237, 114, 27, '良'],
// [10, 91, 81, 104, 1.041, 56, 40, '良'],
// [11, 84, 39, 60, 0.964, 25, 11, '良'],
// [12, 64, 51, 101, 0.862, 58, 23, '良'],
// [13, 70, 69, 120, 1.198, 65, 36, '良'],
// [14, 77, 105, 178, 2.549, 64, 16, '良'],
// [15, 109, 68, 87, 0.996, 74, 29, '轻度污染'],
// [16, 73, 68, 97, 0.905, 51, 34, '良'],
// [17, 54, 27, 47, 0.592, 53, 12, '良'],
// [18, 51, 61, 97, 0.811, 65, 19, '良'],
// [19, 91, 71, 121, 1.374, 43, 18, '良'],
// [20, 73, 102, 182, 2.787, 44, 19, '良'],
// [21, 73, 50, 76, 0.717, 31, 20, '良'],
// [22, 84, 94, 140, 2.238, 68, 18, '良'],
// [23, 93, 77, 104, 1.165, 53, 7, '良'],
// [24, 99, 130, 227, 3.97, 55, 15, '良'],
// [25, 146, 84, 139, 1.094, 40, 17, '轻度污染'],
// [26, 113, 108, 137, 1.481, 48, 15, '轻度污染'],
// [27, 81, 48, 62, 1.619, 26, 3, '良'],
// [28, 56, 48, 68, 1.336, 37, 9, '良'],
// [29, 82, 92, 174, 3.29, 0, 13, '良'],
// [30, 106, 116, 188, 3.628, 101, 16, '轻度污染'],
// [31, 118, 50, 0, 1.383, 76, 11, '轻度污染']
];
const dataSH = [
[1, 91, 45, 125, 0.82, 34, 23, '良'],
[2, 65, 27, 78, 0.86, 45, 29, '良'],
[3, 83, 60, 84, 1.09, 73, 27, '良'],
[4, 109, 81, 121, 1.28, 68, 51, '轻度污染'],
[5, 106, 77, 114, 1.07, 55, 51, '轻度污染'],
// [6, 109, 81, 121, 1.28, 68, 51, '轻度污染'],
// [7, 106, 77, 114, 1.07, 55, 51, '轻度污染'],
// [8, 89, 65, 78, 0.86, 51, 26, '良'],
// [9, 53, 33, 47, 0.64, 50, 17, '良'],
// [10, 80, 55, 80, 1.01, 75, 24, '良'],
// [11, 117, 81, 124, 1.03, 45, 24, '轻度污染'],
// [12, 99, 71, 142, 1.1, 62, 42, '良'],
// [13, 95, 69, 130, 1.28, 74, 50, '良'],
// [14, 116, 87, 131, 1.47, 84, 40, '轻度污染'],
// [15, 108, 80, 121, 1.3, 85, 37, '轻度污染'],
// [16, 134, 83, 167, 1.16, 57, 43, '轻度污染'],
// [17, 79, 43, 107, 1.05, 59, 37, '良'],
// [18, 71, 46, 89, 0.86, 64, 25, '良'],
// [19, 97, 71, 113, 1.17, 88, 31, '良'],
// [20, 84, 57, 91, 0.85, 55, 31, '良'],
// [21, 87, 63, 101, 0.9, 56, 41, '良'],
// [22, 104, 77, 119, 1.09, 73, 48, '轻度污染'],
// [23, 87, 62, 100, 1, 72, 28, '良'],
// [24, 168, 128, 172, 1.49, 97, 56, '中度污染'],
// [25, 65, 45, 51, 0.74, 39, 17, '良'],
// [26, 39, 24, 38, 0.61, 47, 17, '优'],
// [27, 39, 24, 39, 0.59, 50, 19, '优'],
// [28, 93, 68, 96, 1.05, 79, 29, '良'],
// [29, 188, 143, 197, 1.66, 99, 51, '中度污染'],
// [30, 174, 131, 174, 1.55, 108, 50, '中度污染'],
// [31, 187, 143, 201, 1.39, 89, 53, '中度污染']
];
// const schema = [
// { name: 'date', index: 0, text: '日' },
// { name: 'AQIindex', index: 1, text: 'AQI指数' },
// { name: 'PM25', index: 2, text: 'PM2.5' },
// { name: 'PM10', index: 3, text: 'PM10' },
// { name: 'CO', index: 4, text: '一氧化碳CO' },
// { name: 'NO2', index: 5, text: '二氧化氮NO2' },
// { name: 'SO2', index: 6, text: '二氧化硫SO2' }
// ];
const itemStyle = {
opacity: 0.8,
shadowBlur: 10,
shadowOffsetX: 0,
shadowOffsetY: 0,
shadowColor: 'rgba(0,0,0,0.3)'
};
export default function createOpt() {
return {
grid: {
top: "16px",
left: "16px",
right: "16px",
bottom: "16px",
containLabel: true,
},
tooltip: {
backgroundColor: "#08182F",
color: "#fff",
borderColor: "#3373CC",
textStyle: {
color: "#fff", //设置文字颜色
},
extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;",
formatter: function(param) {
let value = param.value;
return `<span>${value[value.length - 1]}</span><br><span>${value[0]}</span>`
}
},
xAxis: {
show: false,
type: 'value',
splitLine: {
lineStyle: {
type: 'dashed'
}
}
},
yAxis: {
show: false,
type: 'value',
splitLine: {
lineStyle: {
type: 'dashed'
}
},
scale: true
},
series: [{
name: '北京',
data: dataBJ,
type: 'scatter',
symbolSize: function (data) {
return data[2]
},
label: {
show: true,
color: "#FFF",
formatter: function (param) {
return param.data[param.data.length - 1];
},
},
itemStyle: itemStyle
}, {
name: '上海',
data: dataSH,
type: 'scatter',
symbolSize: function (data) {
return data[2]
},
label: {
show: true,
color: "#FFF",
formatter: function (param) {
return param.data[param.data.length - 1];
},
},
itemStyle: itemStyle
},
{
name: '广州',
data: dataGZ,
type: 'scatter',
symbolSize: function (data) {
return data[2]
},
label: {
show: true,
color: "#FFF",
formatter: function (param) {
return param.data[param.data.length - 1];
},
},
itemStyle: itemStyle
}
]
}
}

@ -0,0 +1,39 @@
<!--
* @Author: your name
* @Date: 2021-10-14 19:06:52
* @LastEditTime: 2021-10-14 19:14:42
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/WeiboDetails/weiboWordCloud/index.vue
-->
<template>
<div class="wwc-outter">
</div>
</template>
<script>
export default {
name: "weiboWordCloud",
data() {
return {
form: {
sBrand: "",
token: "",
},
};
},
};
</script>
<style lang="less" scoped>
.wwc-outter {
width: 460px;
height: 460px;
border: 2px solid #0f2a4d;
margin-left: 16px;
.wwc-inner {
width: 100%;
height: calc(100% - 48px);
}
}
</style>

@ -87,11 +87,11 @@ export default {
})
},
handlerItem(row) {
let ele = this.darr[row.rowIndex];
if(row.columnIndex === 0) {
let id = ele[4];
this.$router.push({path: '/eventDEC', query: {events_id: id}});
}
// let ele = this.darr[row.rowIndex];
// if(row.columnIndex === 0) {
// let id = ele[4];
// this.$router.push({path: '/eventDEC', query: {events_id: id}});
// }
}
},
};

@ -85,11 +85,11 @@ export default {
})
},
handlerItem(row) {
let ele = this.darr[row.rowIndex];
if(row.columnIndex === 0) {
let id = ele[4];
this.$router.push({path: '/eventDEC', query: {events_id: id}});
}
// let ele = this.darr[row.rowIndex];
// if(row.columnIndex === 0) {
// let id = ele[4];
// this.$router.push({path: '/eventDEC', query: {events_id: id}});
// }
}
},
};

@ -94,7 +94,7 @@ export default function createOpt(dx,ds) {
[
{
offset: 0,
color: "rgb(65,117,203,0.9)", // 0% 处的颜色
color: "rgb(65,117,203,0.1)", // 0% 处的颜色
},
{
offset: 1,

@ -1,9 +1,10 @@
<template>
<div class="mcomp-outter">
<v-label-div title="中国汽车市场竞争格局图"></v-label-div>
<div :class="getIsLight?'mcomp-light':'mcomp-outter'">
<v-label-div v-if="!getIsLight" title="中国汽车市场竞争格局图"></v-label-div>
<v-label-div-light v-else title="中国汽车市场竞争格局图"></v-label-div-light>
<div class="d2">
<a-form-model layout="inline">
<a-form-model-item label="数据筛选">
<a-form-model-item :class="getIsLight?'lightSy':'dark'" label="数据筛选">
<a-select style="width: 200px" mode="multiple" v-model="countries" placeholder="选择国别" allowClear>
<a-select-option v-for="(item) in countryList" :value="item.key" :key="item.value">
{{item.value}}
@ -34,20 +35,20 @@
{{item.value}}
</a-select-option>
</a-select>
<a-button style="margin-left: 16px" @click="getData"></a-button>
<a-button :class="getIsLight?'lightSy':'dark'" type="primary" style="margin-left: 16px" @click="getData"></a-button>
</a-form-model-item>
</a-form-model>
</div>
<div class="d2">
<a-form-model layout="inline">
<a-form-model-item label="选择日期">
<a-form-model-item label="选择日期" :class="getIsLight?'lightSy':'dark'">
<a-month-picker style="width: 146px" :allowClear="false" v-model="selTime[0]" valueFormat="YYYY-MM" placeholder="开始日期"></a-month-picker>
<a-month-picker style="width: 146px" :allowClear="false" v-model="selTime[1]" valueFormat="YYYY-MM" placeholder="结束日期"></a-month-picker>
</a-form-model-item>
</a-form-model>
</div>
<div class="d2">
<div>
<div :class="getIsLight?'lightSy':'dark'">
<span v-for="(item, index) in seriesList" :key="index">
<a-button style="margin-left: 12px" @click="onDelete(index)" type="primary">{{item}}<a-icon type="close" /></a-button>
</span>
@ -55,7 +56,10 @@
</div>
</div>
<iSaleModelChoose :brand="brand" :model="model" :visible.sync="modelShow" @change="handlerBrand"></iSaleModelChoose>
<div class="d3">
<div class="d3" v-if="getIsLight">
<v-echarts :opt="opt2"></v-echarts>
</div>
<div class="d3" v-else>
<v-echarts :opt="opt"></v-echarts>
</div>
</div>
@ -65,6 +69,7 @@
import {getCountryS,getPriceRangeS,getSpecName1,getSeatS,getDisplacementS,getEnergyS} from "@/api/SaleRankMarketCommon";
import {getSalesCompetitionALLList,getSalesCompetitionList,getSalesCompetitionAnalysis} from "@/api/SaleRankMarket";
import createOpt from "./opt"
import createOpt2 from "./optLight"
import {getCheZhuLatestTime} from "@/api/SaleRank"
export default {
name: 'CitySale',
@ -101,6 +106,7 @@ export default {
seatList: [],
//chart
opt: {},
opt2: {},
totalData: [],
extraData: [],
//
@ -165,6 +171,7 @@ export default {
});
this.totalData = arr;
this.opt = createOpt(this.totalData, this.extraData);
this.opt2 = createOpt2(this.totalData, this.extraData)
})
},
//
@ -190,6 +197,7 @@ export default {
});
this.extraData = extraArr;
this.opt = createOpt(this.totalData, this.extraData);
this.opt2 = createOpt2(this.totalData, this.extraData)
})
this.modelShow = false;
},
@ -199,6 +207,7 @@ export default {
if(this.seriesList.length == 0) {
this.extraData = [];
this.opt = createOpt(this.totalData, this.extraData);
this.opt2 = createOpt2(this.totalData, this.extraData)
} else {
let obj = {
token: this.form.token,
@ -217,6 +226,7 @@ export default {
});
this.extraData = extraArr;
this.opt = createOpt(this.totalData, this.extraData);
this.opt2 = createOpt2(this.totalData, this.extraData)
})
}
},
@ -240,4 +250,20 @@ export default {
height: 1060px;
}
}
.mcomp-light {
width: 1552px;
background: #fff;
// height: 460px;
border: 2px solid #0f2a4d;
.d2 {
display: flex;
justify-content: flex-start;
padding: 8px 16px 0px 16px;
}
.d3 {
// padding: 0px 16px 16px 16px;
width: 100%;
height: 1060px;
}
}
</style>

@ -1,5 +1,3 @@
import * as echarts from "echarts";
import { bigNumberTransform } from "@/utils/gol/dataTool"
export default function createOpt(data = [],extraData = []) {
return {
grid: {
@ -57,7 +55,7 @@ export default function createOpt(data = [],extraData = []) {
formatter: function (param) {
return param.data[3];
},
color: '##FFF',
color: '#FFF',
position: 'inside'
},
itemStyle: {
@ -66,4 +64,4 @@ export default function createOpt(data = [],extraData = []) {
},
]
}
}
}

@ -0,0 +1,67 @@
export default function createOptLight(data = [],extraData = []) {
return {
grid: {
left: '6%',
// top: '10%'
},
xAxis: {
splitLine: false,
scale: true,
axisLabel: {
color: '#000'
}
},
yAxis: {
splitLine: false,
scale: true,
axisLabel: {
formatter: function(value) {
return value / 10000 + '万元'
},
color: '#000'
}
},
series: [
{
name: 'total',
data: data,
type: 'scatter',
symbolSize: function (data) {
return data[2] / 600;
},
label: {
show: true,
formatter: function (param) {
return param.data[3];
},
color: '#000',
fontSize: 12,
fontWeight: 550,
position: 'inside'
},
itemStyle: {
color: '#3373CC',
}
},
{
name: 'extra',
data: extraData,
type: 'scatter',
symbolSize: function (data) {
return data[2] / 200;
},
label: {
show: true,
formatter: function (param) {
return param.data[3];
},
color: '#000',
position: 'inside'
},
itemStyle: {
color: '#CC9D12',
}
},
]
}
}

@ -1,9 +1,10 @@
<template>
<div class="mcomp-outter">
<v-label-div title="全车型竞争关系图谱"></v-label-div>
<div class="mcomp-outter" :style="getIsLight?{background: '#FFF'}:{}">
<v-label-div v-if="!getIsLight" title="全车型竞争关系图谱"></v-label-div>
<v-label-div-light v-else title="全车型竞争关系图谱"></v-label-div-light>
<div class="d2">
<a-form-model layout="inline">
<a-form-model-item label="数据筛选">
<a-form-model-item :class="getIsLight?'lightSy':'dark'" label="数据筛选">
<a-select style="width: 200px" mode="multiple" v-model="countries" placeholder="选择国别" allowClear>
<a-select-option v-for="(item) in countryList" :value="item.key" :key="item.value">
{{item.value}}
@ -34,12 +35,12 @@
{{item.value}}
</a-select-option>
</a-select>
<a-button style="margin-left: 16px" @click="getData"></a-button>
<a-button type="primary" style="margin-left: 16px" @click="getData"></a-button>
</a-form-model-item>
</a-form-model>
</div>
<div class="d2">
<a-form-model layout="inline">
<a-form-model :class="getIsLight?'lightSy':'dark'" layout="inline">
<a-form-model-item label="选择日期">
<a-month-picker style="width: 146px" :allowClear="false" v-model="selTime[0]" valueFormat="YYYY-MM" placeholder="开始日期"></a-month-picker>
<a-month-picker style="width: 146px" :allowClear="false" v-model="selTime[1]" valueFormat="YYYY-MM" placeholder="结束日期"></a-month-picker>
@ -47,7 +48,7 @@
</a-form-model>
</div>
<div class="d2">
<div>
<div :class="getIsLight?'lightSy':'dark'">
<span v-for="(item, index) in seriesList" :key="index">
<a-button style="margin-left: 12px" @click="onDelete(index)" type="primary">{{item}}<a-icon type="close" /></a-button>
</span>
@ -55,7 +56,10 @@
</div>
</div>
<iSaleModelChoose :brand="brand" :model="model" :visible.sync="modelShow" @change="handlerBrand"></iSaleModelChoose>
<div class="d3">
<div class="d3" v-if="getIsLight">
<v-echarts :opt="opt2"></v-echarts>
</div>
<div class="d3" v-else>
<v-echarts :opt="opt"></v-echarts>
</div>
</div>
@ -65,6 +69,7 @@
import {getCountryS,getPriceRangeS,getSpecName1,getSeatS,getDisplacementS,getEnergyS} from "@/api/SaleRankMarketCommon";
import {getSalesCompetitionALLList,getSalesCompetitionList,getSalesCompetitionAnalysis} from "@/api/SaleRankMarket";
import createOpt from "./opt"
import createOptLight from "./optLight"
import {getCheZhuLatestTime} from "@/api/SaleRank"
export default {
name: 'CitySale',
@ -76,7 +81,7 @@ export default {
sEnergyS: '',
sPriceRangeS: '',
sDisplacementS: '',
sSerieS: '奥迪A3', ////
sSerieName: '', //
sSeatS: '',
sSpecName1: '',
sTimeType: 4,
@ -103,6 +108,7 @@ export default {
seatList: [],
//chart
opt: {},
opt2: {},
totalData: [],
extraData: [],
//
@ -148,6 +154,7 @@ export default {
sPriceRangeS: this.prices.join(','),
sDisplacementS: this.displacements.join(','),
sSeatS: this.seats.join(','),
sSerieName: this.seriesList.join(','),
sSpecName1: this.specs.join(','),
sSpecName2: this.specs2.join(','),
sTimeType: 4,
@ -167,6 +174,7 @@ export default {
});
this.totalData = arr;
this.opt = createOpt(this.totalData, this.extraData);
this.opt2 = createOptLight(this.totalData, this.extraData)
})
},
//
@ -192,6 +200,7 @@ export default {
});
this.extraData = extraArr;
this.opt = createOpt(this.totalData, this.extraData);
this.opt2 = createOptLight(this.totalData, this.extraData)
})
this.modelShow = false;
},
@ -201,6 +210,7 @@ export default {
if(this.seriesList.length == 0) {
this.extraData = [];
this.opt = createOpt(this.totalData, this.extraData);
this.opt2 = createOptLight(this.totalData, this.extraData)
} else {
let obj = {
token: this.form.token,
@ -219,6 +229,7 @@ export default {
});
this.extraData = extraArr;
this.opt = createOpt(this.totalData, this.extraData);
this.opt2 = createOptLight(this.totalData, this.extraData)
})
}
},

@ -57,7 +57,7 @@ export default function createOpt(data = [],extraData = []) {
formatter: function (param) {
return param.data[3];
},
color: '##FFF',
color: '#FFF',
position: 'inside'
},
itemStyle: {

@ -0,0 +1,67 @@
export default function createOptLight(data = [],extraData = []) {
return {
grid: {
left: '6%',
// top: '10%'
},
xAxis: {
splitLine: false,
scale: true,
axisLabel: {
color: '#000'
}
},
yAxis: {
splitLine: false,
scale: true,
axisLabel: {
formatter: function(value) {
return value / 10000 + '万元'
},
color: '#000'
}
},
series: [
{
name: 'total',
data: data,
type: 'scatter',
symbolSize: function (data) {
return data[2] / 600;
},
label: {
show: true,
formatter: function (param) {
return param.data[3];
},
color: '#000',
fontSize: 12,
fontWeight: 550,
position: 'inside'
},
itemStyle: {
color: '#3373CC',
}
},
{
name: 'extra',
data: extraData,
type: 'scatter',
symbolSize: function (data) {
return data[2] / 200;
},
label: {
show: true,
formatter: function (param) {
return param.data[3];
},
color: '#000',
position: 'inside'
},
itemStyle: {
color: '#CC9D12',
}
},
]
}
}

@ -1,15 +1,19 @@
<template>
<div class="mscet-outter">
<v-label-div title="能源类型占比分布"></v-label-div>
<div class="mscet-outter" :style="getIsLight?{background: '#FFF'}:{}">
<v-label-div v-if="!getIsLight" title="能源类型占比分布"></v-label-div>
<v-label-div-light v-else title="能源类型占比分布"></v-label-div-light>
<div class="d2">
<a-form-model layout="inline">
<a-form-model :class="getIsLight?'lightSy':'dark'" layout="inline">
<a-form-model-item label="选择日期">
<a-month-picker @change="getData" style="width: 146px" :allowClear="false" v-model="selTime[0]" valueFormat="YYYY-MM" placeholder="开始日期"></a-month-picker>
<a-month-picker @change="getData" style="width: 146px" :allowClear="false" v-model="selTime[1]" valueFormat="YYYY-MM" placeholder="结束日期"></a-month-picker>
</a-form-model-item>
</a-form-model>
</div>
<div class="d3">
<div class="d3" v-if="getIsLight">
<v-echarts :opt="opt2"></v-echarts>
</div>
<div class="d3" v-else>
<v-echarts :opt="opt"></v-echarts>
</div>
</div>
@ -19,6 +23,7 @@
import {getSalesEnergyTypes} from "@/api/SaleRankMarket";
import {getCheZhuLatestTime} from "@/api/SaleRank"
import createOpt from './opt'
import createOptLight from './optLight'
export default {
name: 'totalTop20',
data() {
@ -31,6 +36,7 @@ export default {
},
selTime: ['',''],
opt: {},
opt2: {},
}
},
created() {
@ -61,6 +67,7 @@ export default {
ds.push(value);
});
this.opt = createOpt(dx, ds);
this.opt2 = createOptLight(dx, ds);
})
},
}

@ -0,0 +1,145 @@
/*
* @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"
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: '#000',
fontWeight: 600,
formatter: (res) => {
return res.data + '%'
}
},
itemStyle: {
normal: {
//柱体的颜色
//右1000表示从正右开始向左渐变
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 createOptLight(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: '#000',
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: "#000",
},
},
data: dx
},
yAxis: {
type: 'value',
max: 100,
axisLine: {
show: false,
lineStyle: {
color: "#000",
},
},
axisLabel: {
formatter: (value) => {
return value + '%'
}
},
splitLine: {
lineStyle: {
type: "dashed", // y轴分割线类型
color: "#012b4b",
},
},
},
series: data
}
}

@ -1,14 +1,19 @@
<template>
<div class="tpsv-outter">
<v-label-div title="狭义乘用车"></v-label-div>
<div class="d3">
<div class="tpsv-outter" :style="getIsLight?{background: '#FFF'}:{}">
<v-label-div v-if="!getIsLight" title="狭义乘用车"></v-label-div>
<v-label-div-light v-else title="狭义乘用车"></v-label-div-light>
<div v-if="!getIsLight" class="d3">
<v-echarts :opt="opt"></v-echarts>
</div>
<div v-else class="d3">
<v-echarts :opt="opt2"></v-echarts>
</div>
</div>
</template>
<script>
import createOpt from './opt'
import createOptLight from './optLight'
import {getSalesGrowthRatio} from "@/api/SaleRankMarket";
import {getCheZhuLatestTime} from "@/api/SaleRank"
export default {
@ -22,6 +27,7 @@ export default {
sEndTime: '',
},
opt: {},
opt2: {},
}
},
created() {
@ -48,6 +54,7 @@ export default {
}
};
this.opt = createOpt(firstYearData,secondYearData,percent)
this.opt2 = createOptLight(firstYearData,secondYearData,percent)
})
},
}

@ -0,0 +1,156 @@
import { bigNumberTransform } from "@/utils/gol/dataTool"
import * as echarts from "echarts";
export default function createOptLight(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: '#000',
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: '#000'
}
}
],
yAxis: [
{
type: 'value',
axisLabel: {
formatter: (value) => {
return bigNumberTransform(value);
},
color: '#000'
},
splitLine:{
show:false
},
},
{
type: 'value',
axisLabel: {
formatter: '{value}%',
color: '#000'
},
splitLine:{
show:false
},
}
],
series: [
{
name: '2021',
type: 'bar',
barWidth: 20,
tooltip: {
valueFormatter: function (value) {
return value;
}
},
itemStyle: {
normal: {
//柱体的颜色
//右1000表示从正右开始向左渐变
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: '#000'
},
data: firstData
},
{
name: '2022',
type: 'bar',
barWidth: 20,
tooltip: {
valueFormatter: function (value) {
return value;
}
},
itemStyle: {
normal: {
//柱体的颜色
//右1000表示从正右开始向左渐变
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: '#000'
},
data: secondData
},
{
name: '同比',
type: 'line',
yAxisIndex: 1,
tooltip: {
valueFormatter: function (value) {
return value+'%';
}
},
data: percent
}
]
}
}

@ -1,17 +1,23 @@
<template>
<div class="tp20-outter">
<v-label-div title="品牌销量排行榜TOP20">
<div class="tp20-outter" :style="getIsLight?{background: '#FFF'}:{}">
<v-label-div v-if="!getIsLight" title="品牌销量排行榜TOP20">
<v-tab-group :value="tValue" :style="{ background: 'transparent' }" :btns="btnTimes" @change="handlerType"></v-tab-group>
</v-label-div>
<v-label-div-light v-else title="品牌销量排行榜TOP20">
<v-tab-group :value="tValue" :style="{ background: 'transparent' }" :btns="btnTimes" @change="handlerType"></v-tab-group>
</v-label-div-light>
<div class="d2">
<a-form-model layout="inline">
<a-form-model :class="getIsLight?'lightSy':'dark'" layout="inline">
<a-form-model-item label="选择日期">
<a-month-picker style="width: 146px" :allowClear="false" v-model="selTime[0]" valueFormat="YYYY-MM" placeholder="开始日期"></a-month-picker>
<a-month-picker style="width: 146px" :allowClear="false" v-model="selTime[1]" valueFormat="YYYY-MM" placeholder="结束日期"></a-month-picker>
</a-form-model-item>
</a-form-model>
</div>
<div class="d3">
<div v-if="getIsLight" class="d3">
<v-echarts :opt="opt2"></v-echarts>
</div>
<div v-else class="d3">
<v-echarts :opt="opt"></v-echarts>
</div>
</div>
@ -21,6 +27,7 @@
import {getSalesBrandTop20, getSalesCarseriesTop20} from "@/api/SaleRankMarket";
import {getCheZhuLatestTime} from "@/api/SaleRank"
import createOpt from './opt'
import createOptLight from './optLight'
export default {
name: 'totalTop20',
data() {
@ -35,6 +42,7 @@ export default {
btnTimes: ['品牌','车型'],
selTime: ['',''],
opt: {},
opt2: {},
}
},
created() {
@ -66,6 +74,7 @@ export default {
ds.push(value);
});
this.opt = createOpt(dx, ds);
this.opt2 = createOptLight(dx, ds);
})
} else {
getSalesCarseriesTop20(obj).then(res => {
@ -79,6 +88,7 @@ export default {
ds.push(value);
});
this.opt = createOpt(dx, ds);
this.opt2 = createOptLight(dx, ds);
})
}
},

@ -0,0 +1,138 @@
/*
* @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 = ['rgba(84,111,197,0.6)', 'rgba(145,203,116,0.6)', 'rgba(90,203,156,0.6)', '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 = ['#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: 18,
barGap: "-100%",
emphasis: {
focus: 'series'
},
itemStyle: {
normal: {
//柱体的颜色
//右1000表示从正右开始向左渐变
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 createOptLight(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: '#000',
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: "#000",
},
},
data: dx
},
yAxis: {
type: 'value',
axisLine: {
show: false,
lineStyle: {
color: "#000",
},
},
axisLabel: {
formatter: (value) => {
let str = bigNumberTransform(value);
return str;
}
},
splitLine: {
lineStyle: {
type: "dashed", // y轴分割线类型
color: "#012b4b",
},
},
},
series: data
}
}

@ -1,14 +1,19 @@
<template>
<div class="ttc-outter">
<v-label-div title="传统燃油车市场"></v-label-div>
<div class="d3">
<div class="ttc-outter" :style="getIsLight?{background: '#FFF'}:{}">
<v-label-div v-if="!getIsLight" title="传统燃油车市场"></v-label-div>
<v-label-div-light v-else title="传统燃油车市场"></v-label-div-light>
<div v-if="!getIsLight" class="d3">
<v-echarts :opt="opt"></v-echarts>
</div>
<div v-else class="d3">
<v-echarts :opt="opt2"></v-echarts>
</div>
</div>
</template>
<script>
import createOpt from './opt'
import createOptLight from './optLight'
import {getSalesGrowthRatioByFuel} from "@/api/SaleRankMarket";
import {getCheZhuLatestTime} from "@/api/SaleRank"
export default {
@ -22,6 +27,7 @@ export default {
sEndTime: '',
},
opt: {},
opt2: {},
}
},
created() {
@ -35,7 +41,6 @@ export default {
methods: {
getData() {
getSalesGrowthRatioByFuel(this.form).then(res => {
console.log(res);
let data = res.data;
let firstYearData = []; //0 - 11 count
let secondYearData = []; //12+ count
@ -49,6 +54,7 @@ export default {
}
};
this.opt = createOpt(firstYearData,secondYearData,percent)
this.opt2 = createOptLight(firstYearData,secondYearData,percent)
})
},
}

@ -0,0 +1,156 @@
import { bigNumberTransform } from "@/utils/gol/dataTool"
import * as echarts from "echarts";
export default function createOptLight(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: '#000',
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: '#000'
}
}
],
yAxis: [
{
type: 'value',
axisLabel: {
formatter: (value) => {
return bigNumberTransform(value);
},
color: '#000'
},
splitLine:{
show:false
},
},
{
type: 'value',
axisLabel: {
formatter: '{value}%',
color: '#000'
},
splitLine:{
show:false
},
}
],
series: [
{
name: '2021',
type: 'bar',
barWidth: 20,
tooltip: {
valueFormatter: function (value) {
return value;
}
},
itemStyle: {
normal: {
//柱体的颜色
//右1000表示从正右开始向左渐变
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: '#000'
},
data: firstData
},
{
name: '2022',
type: 'bar',
barWidth: 20,
tooltip: {
valueFormatter: function (value) {
return value;
}
},
itemStyle: {
normal: {
//柱体的颜色
//右1000表示从正右开始向左渐变
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: '#000'
},
data: secondData
},
{
name: '同比',
type: 'line',
yAxisIndex: 1,
tooltip: {
valueFormatter: function (value) {
return value+'%';
}
},
data: percent
}
]
}
}

@ -1,17 +1,23 @@
<template>
<div class="nmec-outter">
<v-label-div title="国别主系列占比">
<div class="nmec-outter" :style="getIsLight?{background: '#FFF'}:{}">
<v-label-div v-if="!getIsLight" title="国别主系列占比">
<a-button type="primary" @click="report"></a-button>
</v-label-div>
<v-label-div-light v-else title="国别主系列占比" class="lightSy">
<a-button type="primary" @click="report"></a-button>
</v-label-div-light>
<div class="d2">
<a-form-model layout="inline">
<a-form-model :class="getIsLight?'lightSy':'dark'" layout="inline">
<a-form-model-item label="选择日期">
<a-month-picker @change="getData" style="width: 146px" :allowClear="false" v-model="selTime[0]" valueFormat="YYYY-MM" placeholder="开始日期"></a-month-picker>
<a-month-picker @change="getData" style="width: 146px" :allowClear="false" v-model="selTime[1]" valueFormat="YYYY-MM" placeholder="结束日期"></a-month-picker>
</a-form-model-item>
</a-form-model>
</div>
<div class="d3">
<div class="d3" v-if="getIsLight">
<v-echarts :opt="opt2"></v-echarts>
</div>
<div class="d3" v-else>
<v-echarts :opt="opt"></v-echarts>
</div>
</div>
@ -21,6 +27,7 @@
import {getSalesCountrysTypesE} from "@/api/SaleRankMarket";
import {getCheZhuLatestTime} from "@/api/SaleRank"
import createOpt from './opt'
import createOptLight from './optLight'
export default {
name: 'mneCountryPercent',
data() {
@ -33,6 +40,7 @@ export default {
},
selTime: ['',''],
opt: {},
opt2: {},
}
},
created() {
@ -83,6 +91,7 @@ export default {
ds.push(value);
});
this.opt = createOpt(dx, ds);
this.opt2 = createOptLight(dx, ds)
})
},
report() {

@ -0,0 +1,145 @@
/*
* @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"
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: '#000',
fontWeight: 600,
formatter: (res) => {
return res.data + '%'
}
},
itemStyle: {
normal: {
//柱体的颜色
//右1000表示从正右开始向左渐变
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 createOptLight(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: '#000',
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: "#000",
},
},
data: dx
},
yAxis: {
type: 'value',
max: 100,
axisLine: {
show: false,
lineStyle: {
color: "#000",
},
},
axisLabel: {
formatter: (value) => {
return value + '%'
}
},
splitLine: {
lineStyle: {
type: "dashed", // y轴分割线类型
color: "#012b4b",
},
},
},
series: data
}
}

@ -1,17 +1,23 @@
<template>
<div class="mnee-outter">
<v-label-div title="能源类型占比分布">
<div class="mnee-outter" :style="getIsLight?{background: '#FFF'}:{}">
<v-label-div v-if="!getIsLight" title="能源类型占比分布">
<a-button type="primary" @click="report"></a-button>
</v-label-div>
<v-label-div-light v-else title="能源类型占比分布" class="lightSy">
<a-button type="primary" @click="report"></a-button>
</v-label-div-light>
<div class="d2">
<a-form-model layout="inline">
<a-form-model :class="getIsLight?'lightSy':'dark'" layout="inline">
<a-form-model-item label="选择日期">
<a-month-picker @change="getData" style="width: 146px" :allowClear="false" v-model="selTime[0]" valueFormat="YYYY-MM" placeholder="开始日期"></a-month-picker>
<a-month-picker @change="getData" style="width: 146px" :allowClear="false" v-model="selTime[1]" valueFormat="YYYY-MM" placeholder="结束日期"></a-month-picker>
</a-form-model-item>
</a-form-model>
</div>
<div class="d3">
<div class="d3" v-if="getIsLight">
<v-echarts :opt="opt2"></v-echarts>
</div>
<div class="d3" v-else>
<v-echarts :opt="opt"></v-echarts>
</div>
</div>
@ -21,6 +27,7 @@
import {getSalesEnergyTypesE} from "@/api/SaleRankMarket";
import {getCheZhuLatestTime} from "@/api/SaleRank"
import createOpt from './opt'
import createOptLight from './optLight'
export default {
name: 'mneEnergyType',
data() {
@ -33,6 +40,7 @@ export default {
},
selTime: ['',''],
opt: {},
opt2: {},
}
},
created() {
@ -83,6 +91,7 @@ export default {
ds.push(value);
});
this.opt = createOpt(dx, ds);
this.opt2 = createOptLight(dx, ds)
})
},
report() {

@ -0,0 +1,145 @@
/*
* @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"
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: '#000',
fontWeight: 600,
formatter: (res) => {
return res.data + '%'
}
},
itemStyle: {
normal: {
//柱体的颜色
//右1000表示从正右开始向左渐变
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 createOptLight(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: '#000',
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: "#000",
},
},
data: dx
},
yAxis: {
type: 'value',
max: 100,
axisLine: {
show: false,
lineStyle: {
color: "#000",
},
},
axisLabel: {
formatter: (value) => {
return value + '%'
}
},
splitLine: {
lineStyle: {
type: "dashed", // y轴分割线类型
color: "#012b4b",
},
},
},
series: data
}
}

@ -1,9 +1,15 @@
<template>
<div class="ttc-outter">
<v-label-div title="新能源轿车销量">
<div class="ttc-outter" :style="getIsLight?{background: '#FFF'}:{}">
<v-label-div v-if="!getIsLight" title="新能源轿车销量">
<a-button type="primary" @click="report"></a-button>
</v-label-div>
<div class="d3">
<v-label-div-light v-else title="新能源轿车销量" class="lightSy">
<a-button type="primary" @click="report"></a-button>
</v-label-div-light>
<div class="d3" v-if="getIsLight">
<v-echarts :opt="opt2"></v-echarts>
</div>
<div class="d3" v-else>
<v-echarts :opt="opt"></v-echarts>
</div>
</div>
@ -11,6 +17,7 @@
<script>
import createOpt from './opt'
import createOptLight from './optLight'
import {getSalesSpecName1TypesBySedanE} from "@/api/SaleRankMarket";
import {getCheZhuLatestTime} from "@/api/SaleRank"
export default {
@ -24,6 +31,7 @@ export default {
sEndTime: '',
},
opt: {},
opt2: {},
}
},
created() {
@ -50,6 +58,7 @@ export default {
}
};
this.opt = createOpt(firstYearData,secondYearData,percent)
this.opt2 = createOptLight(firstYearData,secondYearData,percent)
})
},
report() {

@ -0,0 +1,156 @@
import { bigNumberTransform } from "@/utils/gol/dataTool"
import * as echarts from "echarts";
export default function createOptLight(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: '#000',
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: '#000'
}
}
],
yAxis: [
{
type: 'value',
axisLabel: {
formatter: (value) => {
return bigNumberTransform(value);
},
color: '#000'
},
splitLine:{
show:false
},
},
{
type: 'value',
axisLabel: {
formatter: '{value}%',
color: '#000'
},
splitLine:{
show:false
},
}
],
series: [
{
name: '2021',
type: 'bar',
barWidth: 20,
tooltip: {
valueFormatter: function (value) {
return value;
}
},
itemStyle: {
normal: {
//柱体的颜色
//右1000表示从正右开始向左渐变
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: '#000'
},
data: firstData
},
{
name: '2022',
type: 'bar',
barWidth: 20,
tooltip: {
valueFormatter: function (value) {
return value;
}
},
itemStyle: {
normal: {
//柱体的颜色
//右1000表示从正右开始向左渐变
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: '#000'
},
data: secondData
},
{
name: '同比',
type: 'line',
yAxisIndex: 1,
tooltip: {
valueFormatter: function (value) {
return value+'%';
}
},
data: percent
}
]
}
}

@ -1,9 +1,15 @@
<template>
<div class="tpsv-outter">
<v-label-div title="新能源MPV销量">
<div class="tpsv-outter" :style="getIsLight?{background: '#FFF'}:{}">
<v-label-div v-if="!getIsLight" title="新能源MPV销量">
<a-button type="primary" @click="report"></a-button>
</v-label-div>
<div class="d3">
<v-label-div-light v-else title="新能源MPV销量" class="lightSy">
<a-button type="primary" @click="report"></a-button>
</v-label-div-light>
<div class="d3" v-if="getIsLight">
<v-echarts :opt="opt2"></v-echarts>
</div>
<div class="d3" v-else>
<v-echarts :opt="opt"></v-echarts>
</div>
</div>
@ -11,6 +17,7 @@
<script>
import createOpt from './opt'
import createOptLight from './optLight'
import {getSalesSpecName1TypesByMpvE} from "@/api/SaleRankMarket";
import {getCheZhuLatestTime} from "@/api/SaleRank"
export default {
@ -24,6 +31,7 @@ export default {
sEndTime: '',
},
opt: {},
opt2: {},
}
},
created() {
@ -49,7 +57,8 @@ export default {
percent.push(data[i].YearOnYearGrowth)
}
};
this.opt = createOpt(firstYearData,secondYearData,percent)
this.opt = createOpt(firstYearData,secondYearData,percent);
this.opt2 = createOptLight(firstYearData,secondYearData,percent)
})
},
report() {

@ -0,0 +1,156 @@
import { bigNumberTransform } from "@/utils/gol/dataTool"
import * as echarts from "echarts";
export default function createOptLight(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: '#000',
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: '#000'
}
}
],
yAxis: [
{
type: 'value',
axisLabel: {
formatter: (value) => {
return bigNumberTransform(value);
},
color: '#000'
},
splitLine:{
show:false
},
},
{
type: 'value',
axisLabel: {
formatter: '{value}%',
color: '#000'
},
splitLine:{
show:false
},
}
],
series: [
{
name: '2021',
type: 'bar',
barWidth: 20,
tooltip: {
valueFormatter: function (value) {
return value;
}
},
itemStyle: {
normal: {
//柱体的颜色
//右1000表示从正右开始向左渐变
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: '#000'
},
data: firstData
},
{
name: '2022',
type: 'bar',
barWidth: 20,
tooltip: {
valueFormatter: function (value) {
return value;
}
},
itemStyle: {
normal: {
//柱体的颜色
//右1000表示从正右开始向左渐变
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: '#000'
},
data: secondData
},
{
name: '同比',
type: 'line',
yAxisIndex: 1,
tooltip: {
valueFormatter: function (value) {
return value+'%';
}
},
data: percent
}
]
}
}

@ -1,9 +1,15 @@
<template>
<div class="tpsv-outter">
<v-label-div title="新能源SUV销量">
<div class="tpsv-outter" :style="getIsLight?{background: '#FFF'}:{}">
<v-label-div v-if="!getIsLight" title="新能源SUV销量">
<a-button type="primary" @click="report"></a-button>
</v-label-div>
<div class="d3">
<v-label-div-light v-else title="新能源SUV销量" class="lightSy">
<a-button type="primary" @click="report"></a-button>
</v-label-div-light>
<div class="d3" v-if="getIsLight">
<v-echarts :opt="opt2"></v-echarts>
</div>
<div class="d3" v-else>
<v-echarts :opt="opt"></v-echarts>
</div>
</div>
@ -11,6 +17,7 @@
<script>
import createOpt from './opt'
import createOptLight from './optLight'
import {getSalesSpecName1TypesBySuvE} from "@/api/SaleRankMarket";
import {getCheZhuLatestTime} from "@/api/SaleRank"
export default {
@ -24,6 +31,7 @@ export default {
sEndTime: '',
},
opt: {},
opt2: {},
}
},
created() {
@ -50,6 +58,7 @@ export default {
}
};
this.opt = createOpt(firstYearData,secondYearData,percent)
this.opt2 = createOptLight(firstYearData,secondYearData,percent)
})
},
report() {

@ -0,0 +1,156 @@
import { bigNumberTransform } from "@/utils/gol/dataTool"
import * as echarts from "echarts";
export default function createOptLight(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: '#000',
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: '#000'
}
}
],
yAxis: [
{
type: 'value',
axisLabel: {
formatter: (value) => {
return bigNumberTransform(value);
},
color: '#000'
},
splitLine:{
show:false
},
},
{
type: 'value',
axisLabel: {
formatter: '{value}%',
color: '#000'
},
splitLine:{
show:false
},
}
],
series: [
{
name: '2021',
type: 'bar',
barWidth: 20,
tooltip: {
valueFormatter: function (value) {
return value;
}
},
itemStyle: {
normal: {
//柱体的颜色
//右1000表示从正右开始向左渐变
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: '#000'
},
data: firstData
},
{
name: '2022',
type: 'bar',
barWidth: 20,
tooltip: {
valueFormatter: function (value) {
return value;
}
},
itemStyle: {
normal: {
//柱体的颜色
//右1000表示从正右开始向左渐变
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: '#000'
},
data: secondData
},
{
name: '同比',
type: 'line',
yAxisIndex: 1,
tooltip: {
valueFormatter: function (value) {
return value+'%';
}
},
data: percent
}
]
}
}

@ -1,17 +1,23 @@
<template>
<div class="tp20-outter">
<v-label-div title="销量占比">
<div class="tp20-outter" :style="getIsLight?{background: '#FFF'}:{}">
<v-label-div v-if="!getIsLight" title="销量占比">
<a-button type="primary" @click="report"></a-button>
</v-label-div>
<v-label-div-light v-else title="销量占比" class="lightSy">
<a-button type="primary" @click="report"></a-button>
</v-label-div-light>
<div class="d2">
<a-form-model layout="inline">
<a-form-model :class="getIsLight?'lightSy':'dark'" layout="inline">
<a-form-model-item label="选择日期">
<a-month-picker style="width: 146px" @change="getData" :allowClear="false" v-model="selTime[0]" valueFormat="YYYY-MM" placeholder="开始日期"></a-month-picker>
<a-month-picker style="width: 146px" @change="getData" :allowClear="false" v-model="selTime[1]" valueFormat="YYYY-MM" placeholder="结束日期"></a-month-picker>
</a-form-model-item>
</a-form-model>
</div>
<div class="d3">
<div class="d3" v-if="getIsLight">
<v-echarts :opt="opt2"></v-echarts>
</div>
<div class="d3" v-else>
<v-echarts :opt="opt"></v-echarts>
</div>
</div>
@ -21,6 +27,7 @@
import {getSalesSpecName1TypesE} from "@/api/SaleRankMarket";
import {getCheZhuLatestTime} from "@/api/SaleRank"
import createOpt from './opt'
import createOptLight from './optLight'
export default {
name: 'totalTop20',
data() {
@ -35,6 +42,7 @@ export default {
btnTimes: ['品牌','车型'],
selTime: ['',''],
opt: {},
opt2: {},
}
},
created() {
@ -85,6 +93,7 @@ export default {
ds.push(value);
});
this.opt = createOpt(dx, ds);
this.opt2 = createOptLight(dx, ds);
})
},
report() {

@ -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"
// 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: '#000',
fontWeight: 600,
fontSize: 10,
formatter: (res) => {
return res.data + '%'
}
},
itemStyle: {
normal: {
//柱体的颜色
//右1000表示从正右开始向左渐变
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 createOptLight(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: '#000',
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: "#000",
},
},
data: dx
},
yAxis: {
type: 'value',
min: 0,
max: 100,
axisLine: {
show: false,
lineStyle: {
color: "#000",
},
},
axisLabel: {
formatter: (value) => {
return value + '%';
}
},
splitLine: {
lineStyle: {
type: "dashed", // y轴分割线类型
color: "#012b4b",
},
},
},
series: data
}
}

@ -1,17 +1,23 @@
<template>
<div class="preauto-outter">
<v-label-div title="新能源轿车销量占比">
<div class="preauto-outter" :style="getIsLight?{background: '#FFF'}:{}">
<v-label-div v-if="!getIsLight" title="新能源轿车销量占比">
<a-button type="primary" @click="report"></a-button>
</v-label-div>
<v-label-div-light v-else title="新能源轿车销量占比" class="lightSy">
<a-button type="primary" @click="report"></a-button>
</v-label-div-light>
<div class="d2">
<a-form-model layout="inline">
<a-form-model :class="getIsLight?'lightSy':'dark'" layout="inline">
<a-form-model-item label="选择日期">
<a-month-picker style="width: 146px" @change="getData" :allowClear="false" v-model="selTime[0]" valueFormat="YYYY-MM" placeholder="开始日期"></a-month-picker>
<a-month-picker style="width: 146px" @change="getData" :allowClear="false" v-model="selTime[1]" valueFormat="YYYY-MM" placeholder="结束日期"></a-month-picker>
</a-form-model-item>
</a-form-model>
</div>
<div class="d3">
<div class="d3" v-if="getIsLight">
<v-echarts :opt="opt2"></v-echarts>
</div>
<div class="d3" v-else>
<v-echarts :opt="opt"></v-echarts>
</div>
</div>
@ -21,6 +27,7 @@
import {getSalesSpecNameTypesBySedanE} from "@/api/SaleRankMarket";
import {getCheZhuLatestTime} from "@/api/SaleRank"
import createOpt from './opt'
import createOptLight from "./optLight"
export default {
name: 'totalTop20',
data() {
@ -35,6 +42,7 @@ export default {
btnTimes: ['品牌','车型'],
selTime: ['',''],
opt: {},
opt2: {},
}
},
created() {
@ -64,6 +72,7 @@ export default {
ds.push(value);
});
this.opt = createOpt(dx, ds);
this.opt2 = createOptLight(dx, ds)
})
},
report() {

@ -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"
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: '#000',
fontWeight: 600,
fontSize: 12,
formatter: (res) => {
return res.data + '%'
}
},
itemStyle: {
normal: {
//柱体的颜色
//右1000表示从正右开始向左渐变
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 createOptLight(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: '#000',
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: "#000",
},
},
data: dx
},
yAxis: {
type: 'value',
min: 0,
max: 100,
axisLine: {
show: false,
lineStyle: {
color: "#000",
},
},
axisLabel: {
formatter: (value) => {
return value + '%';
}
},
splitLine: {
lineStyle: {
type: "dashed", // y轴分割线类型
color: "#012b4b",
},
},
},
series: data
}
}

@ -1,17 +1,23 @@
<template>
<div class="prempv-outter">
<v-label-div title="新能源MPV销量占比">
<div class="prempv-outter" :style="getIsLight?{background: '#FFF'}:{}">
<v-label-div v-if="!getIsLight" title="新能源MPV销量占比">
<a-button type="primary" @click="report"></a-button>
</v-label-div>
<v-label-div-light v-else title="新能源MPV销量占比" class="lightSy">
<a-button type="primary" @click="report"></a-button>
</v-label-div-light>
<div class="d2">
<a-form-model layout="inline">
<a-form-model :class="getIsLight?'lightSy':'dark'" layout="inline">
<a-form-model-item label="选择日期">
<a-month-picker style="width: 146px" @change="getData" :allowClear="false" v-model="selTime[0]" valueFormat="YYYY-MM" placeholder="开始日期"></a-month-picker>
<a-month-picker style="width: 146px" @change="getData" :allowClear="false" v-model="selTime[1]" valueFormat="YYYY-MM" placeholder="结束日期"></a-month-picker>
</a-form-model-item>
</a-form-model>
</div>
<div class="d3">
<div class="d3" v-if="getIsLight">
<v-echarts :opt="opt2"></v-echarts>
</div>
<div class="d3" v-else>
<v-echarts :opt="opt"></v-echarts>
</div>
</div>
@ -21,6 +27,7 @@
import {getSalesSpecNameTypesByMpvE} from "@/api/SaleRankMarket";
import {getCheZhuLatestTime} from "@/api/SaleRank"
import createOpt from './opt'
import createOptLight from "./optLight"
export default {
name: 'totalTop20',
data() {
@ -35,6 +42,7 @@ export default {
btnTimes: ['品牌','车型'],
selTime: ['',''],
opt: {},
opt2: {},
}
},
created() {
@ -64,6 +72,7 @@ export default {
ds.push(value);
});
this.opt = createOpt(dx, ds);
this.opt2 = createOptLight(dx, ds)
})
},
report() {

@ -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"
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: '#000',
fontWeight: 600,
fontSize: 12,
formatter: (res) => {
return res.data + '%'
}
},
itemStyle: {
normal: {
//柱体的颜色
//右1000表示从正右开始向左渐变
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 createOptLight(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: '#000',
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: "#000",
},
},
data: dx
},
yAxis: {
type: 'value',
min: 0,
max: 100,
axisLine: {
show: false,
lineStyle: {
color: "#000",
},
},
axisLabel: {
formatter: (value) => {
return value + '%';
}
},
splitLine: {
lineStyle: {
type: "dashed", // y轴分割线类型
color: "#012b4b",
},
},
},
series: data
}
}

@ -1,17 +1,23 @@
<template>
<div class="precp-outter">
<v-label-div title="细分车型占比">
<div class="precp-outter" :style="getIsLight?{background: '#FFF'}:{}">
<v-label-div v-if="!getIsLight" title="细分车型占比">
<a-button type="primary" @click="report"></a-button>
</v-label-div>
<v-label-div-light v-else title="细分车型占比" class="lightSy">
<a-button type="primary" @click="report"></a-button>
</v-label-div-light>
<div class="d2">
<a-form-model layout="inline">
<a-form-model :class="getIsLight?'lightSy':'dark'" layout="inline">
<a-form-model-item label="选择日期">
<a-month-picker style="width: 146px" @change="getData" :allowClear="false" v-model="selTime[0]" valueFormat="YYYY-MM" placeholder="开始日期"></a-month-picker>
<a-month-picker style="width: 146px" @change="getData" :allowClear="false" v-model="selTime[1]" valueFormat="YYYY-MM" placeholder="结束日期"></a-month-picker>
</a-form-model-item>
</a-form-model>
</div>
<div class="d3">
<div class="d3" v-if="getIsLight">
<v-echarts :opt="opt2"></v-echarts>
</div>
<div class="d3" v-else>
<v-echarts :opt="opt"></v-echarts>
</div>
</div>
@ -21,6 +27,7 @@
import {getSalesSpecNameTypesE} from "@/api/SaleRankMarket";
import {getCheZhuLatestTime} from "@/api/SaleRank"
import createOpt from './opt'
import createOptLight from "./optLight"
export default {
name: 'totalTop20',
data() {
@ -35,6 +42,7 @@ export default {
btnTimes: ['品牌','车型'],
selTime: ['',''],
opt: {},
opt2: {},
}
},
created() {
@ -64,6 +72,7 @@ export default {
ds.push(value);
});
this.opt = createOpt(dx, ds);
this.opt2 = createOptLight(dx, ds)
})
},
report() {

@ -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"
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: '#000',
fontWeight: 600,
fontSize: 12,
formatter: (res) => {
return res.data + '%'
}
},
itemStyle: {
normal: {
//柱体的颜色
//右1000表示从正右开始向左渐变
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 createOptLight(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: '#000',
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: "#000",
},
},
data: dx
},
yAxis: {
type: 'value',
min: 0,
max: 100,
axisLine: {
show: false,
lineStyle: {
color: "#000",
},
},
axisLabel: {
formatter: (value) => {
return value + '%';
}
},
splitLine: {
lineStyle: {
type: "dashed", // y轴分割线类型
color: "#012b4b",
},
},
},
series: data
}
}

@ -1,17 +1,23 @@
<template>
<div class="presuv-outter">
<v-label-div title="新能源SUV销量占比">
<div class="presuv-outter" :style="getIsLight?{background: '#FFF'}:{}">
<v-label-div v-if="!getIsLight" title="新能源SUV销量占比">
<a-button type="primary" @click="report"></a-button>
</v-label-div>
<v-label-div-light v-else title="新能源SUV销量占比" class="lightSy">
<a-button type="primary" @click="report"></a-button>
</v-label-div-light>
<div class="d2">
<a-form-model layout="inline">
<a-form-model :class="getIsLight?'lightSy':'dark'" layout="inline">
<a-form-model-item label="选择日期">
<a-month-picker style="width: 146px" @change="getData" :allowClear="false" v-model="selTime[0]" valueFormat="YYYY-MM" placeholder="开始日期"></a-month-picker>
<a-month-picker style="width: 146px" @change="getData" :allowClear="false" v-model="selTime[1]" valueFormat="YYYY-MM" placeholder="结束日期"></a-month-picker>
</a-form-model-item>
</a-form-model>
</div>
<div class="d3">
<div class="d3" v-if="getIsLight">
<v-echarts :opt="opt2"></v-echarts>
</div>
<div class="d3" v-else>
<v-echarts :opt="opt"></v-echarts>
</div>
</div>
@ -21,6 +27,7 @@
import {getSalesSpecNameTypesBySuvE} from "@/api/SaleRankMarket";
import {getCheZhuLatestTime} from "@/api/SaleRank"
import createOpt from './opt'
import createOptLight from './optLight'
export default {
name: 'totalTop20',
data() {
@ -35,6 +42,7 @@ export default {
btnTimes: ['品牌','车型'],
selTime: ['',''],
opt: {},
opt2: {},
}
},
created() {
@ -64,6 +72,7 @@ export default {
ds.push(value);
});
this.opt = createOpt(dx, ds);
this.opt2 = createOptLight(dx, ds)
})
},
report() {

@ -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"
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: '#000',
fontWeight: 600,
fontSize: 12,
formatter: (res) => {
return res.data + '%'
}
},
itemStyle: {
normal: {
//柱体的颜色
//右1000表示从正右开始向左渐变
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 createOptLight(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: '#000',
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: "#000",
},
},
data: dx
},
yAxis: {
type: 'value',
min: 0,
max: 100,
axisLine: {
show: false,
lineStyle: {
color: "#000",
},
},
axisLabel: {
formatter: (value) => {
return value + '%';
}
},
splitLine: {
lineStyle: {
type: "dashed", // y轴分割线类型
color: "#012b4b",
},
},
},
series: data
}
}

@ -1,17 +1,23 @@
<template>
<div class="mscet-outter">
<v-label-div title="国别占比分布">
<div class="mscet-outter" :style="getIsLight?{background: '#FFF'}:{}">
<v-label-div v-if="!getIsLight" title="国别占比分布">
<a-button type="primary" @click="report"></a-button>
</v-label-div>
<v-label-div-light v-else title="国别占比分布" class="lightSy">
<a-button type="primary" @click="report"></a-button>
</v-label-div-light>
<div class="d2">
<a-form-model layout="inline">
<a-form-model :class="getIsLight?'lightSy':'dark'" layout="inline">
<a-form-model-item label="选择日期">
<a-month-picker @change="getData" style="width: 146px" :allowClear="false" v-model="selTime[0]" valueFormat="YYYY-MM" placeholder="开始日期"></a-month-picker>
<a-month-picker @change="getData" style="width: 146px" :allowClear="false" v-model="selTime[1]" valueFormat="YYYY-MM" placeholder="结束日期"></a-month-picker>
</a-form-model-item>
</a-form-model>
</div>
<div class="d3">
<div class="d3" v-if="getIsLight">
<v-echarts :opt="opt2"></v-echarts>
</div>
<div class="d3" v-else>
<v-echarts :opt="opt"></v-echarts>
</div>
</div>
@ -21,6 +27,7 @@
import {getSalesCountrysTypes} from "@/api/SaleRankMarket";
import {getCheZhuLatestTime} from "@/api/SaleRank"
import createOpt from './opt'
import createOptLight from './optLight'
export default {
name: 'totalTop20',
data() {
@ -33,6 +40,7 @@ export default {
},
selTime: ['',''],
opt: {},
opt2: {},
}
},
created() {
@ -83,6 +91,7 @@ export default {
ds.push(value);
});
this.opt = createOpt(dx, ds);
this.opt2 = createOptLight(dx, ds)
})
},
report() {

@ -0,0 +1,145 @@
/*
* @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"
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: '#000',
fontWeight: 600,
formatter: (res) => {
return res.data + '%'
}
},
itemStyle: {
normal: {
//柱体的颜色
//右1000表示从正右开始向左渐变
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: '#000',
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: "#000",
},
},
data: dx
},
yAxis: {
type: 'value',
max: 100,
axisLine: {
show: false,
lineStyle: {
color: "#000",
},
},
axisLabel: {
formatter: (value) => {
return value + '%'
}
},
splitLine: {
lineStyle: {
type: "dashed", // y轴分割线类型
color: "#012b4b",
},
},
},
series: data
}
}

@ -1,17 +1,23 @@
<template>
<div class="mscet-outter">
<v-label-div title="车型主销价格占比">
<div class="mscet-outter" :style="getIsLight?{background: '#FFF'}:{}">
<v-label-div v-if="!getIsLight" title="车型主销价格占比">
<a-button type="primary" @click="report"></a-button>
</v-label-div>
<v-label-div-light v-else title="车型主销价格占比" class="lightSy">
<a-button type="primary" @click="report"></a-button>
</v-label-div-light>
<div class="d2">
<a-form-model layout="inline">
<a-form-model :class="getIsLight?'lightSy':'dark'" layout="inline">
<a-form-model-item label="选择日期">
<a-month-picker @change="getData" style="width: 146px" :allowClear="false" v-model="selTime[0]" valueFormat="YYYY-MM" placeholder="开始日期"></a-month-picker>
<a-month-picker @change="getData" style="width: 146px" :allowClear="false" v-model="selTime[1]" valueFormat="YYYY-MM" placeholder="结束日期"></a-month-picker>
</a-form-model-item>
</a-form-model>
</div>
<div class="d3">
<div class="d3" v-if="getIsLight">
<v-echarts :opt="opt2"></v-echarts>
</div>
<div class="d3" v-else>
<v-echarts :opt="opt"></v-echarts>
</div>
</div>
@ -21,6 +27,7 @@
import {getSalesSpecNameByPriceRange} from "@/api/SaleRankMarket";
import {getCheZhuLatestTime} from "@/api/SaleRank"
import createOpt from './opt'
import createOptLight from './optLight'
export default {
name: 'totalTop20',
data() {
@ -33,6 +40,7 @@ export default {
},
selTime: ['',''],
opt: {},
opt2: {},
}
},
created() {
@ -83,6 +91,7 @@ export default {
ds.push(value);
});
this.opt = createOpt(dx, ds);
this.opt2 = createOptLight(dx, ds);
})
},
report() {

@ -0,0 +1,145 @@
/*
* @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"
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: '#000',
fontWeight: 600,
formatter: (res) => {
return res.data + '%'
}
},
itemStyle: {
normal: {
//柱体的颜色
//右1000表示从正右开始向左渐变
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: '#000',
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: "#000",
},
},
data: dx
},
yAxis: {
type: 'value',
max: 100,
axisLine: {
show: false,
lineStyle: {
color: "#000",
},
},
axisLabel: {
formatter: (value) => {
return value + '%'
}
},
splitLine: {
lineStyle: {
type: "dashed", // y轴分割线类型
color: "#012b4b",
},
},
},
series: data
}
}

@ -1,17 +1,15 @@
<template>
<div class="preauto-outter">
<v-label-div title="品牌销量top10主销价格区间占比">
<div class="preauto-outter" :style="getIsLight?{background: '#FFF'}:{}">
<v-label-div v-if="!getIsLight" title="品牌销量top10主销价格区间占比">
<a-button type="primary" @click="report"></a-button>
</v-label-div>
<!-- <div class="d2">
<a-form-model layout="inline">
<a-form-model-item label="选择日期">
<a-month-picker style="width: 146px" @change="getData" :allowClear="false" v-model="selTime[0]" valueFormat="YYYY-MM" placeholder="开始日期"></a-month-picker>
<a-month-picker style="width: 146px" @change="getData" :allowClear="false" v-model="selTime[1]" valueFormat="YYYY-MM" placeholder="结束日期"></a-month-picker>
</a-form-model-item>
</a-form-model>
</div> -->
<div class="d3">
<v-label-div-light v-else title="品牌销量top10主销价格区间占比" class="lightSy">
<a-button type="primary" @click="report"></a-button>
</v-label-div-light>
<div class="d3" v-if="getIsLight">
<v-echarts :opt="opt2"></v-echarts>
</div>
<div class="d3" v-else>
<v-echarts :opt="opt"></v-echarts>
</div>
</div>
@ -21,6 +19,7 @@
import {getSalesPriceRangeSBrand} from "@/api/SaleRankMarket";
import {getCheZhuLatestTime} from "@/api/SaleRank"
import createOpt from './opt'
import createOptLight from './optLight'
export default {
name: 'totalTop20',
data() {
@ -35,6 +34,7 @@ export default {
btnTimes: ['品牌','车型'],
selTime: ['',''],
opt: {},
opt2: {},
}
},
created() {
@ -85,6 +85,7 @@ export default {
ds.push(value);
});
this.opt = createOpt(dx, ds);
this.opt2 = createOptLight(dx, ds);
})
},
report() {

@ -0,0 +1,136 @@
/*
* @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"
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: {
//柱体的颜色
//右1000表示从正右开始向左渐变
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 createOptLight(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: '#000',
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: "#000",
},
},
data: dx
},
yAxis: {
type: 'value',
min: 0,
max: 100,
axisLine: {
show: false,
lineStyle: {
color: "#000",
},
},
axisLabel: {
formatter: (value) => {
return value + '%';
}
},
splitLine: {
lineStyle: {
type: "dashed", // y轴分割线类型
color: "#012b4b",
},
},
},
series: data
}
}

@ -1,17 +1,23 @@
<template>
<div class="mainc-outter">
<v-label-div title="国别主销价格区间占比">
<div class="mainc-outter" :style="getIsLight?{background: '#FFF'}:{}">
<v-label-div v-if="!getIsLight" title="国别主销价格区间占比">
<a-button type="primary" @click="report"></a-button>
</v-label-div>
<v-label-div-light v-else title="国别主销价格区间占比" class="lightSy">
<a-button type="primary" @click="report"></a-button>
</v-label-div-light>
<div class="d2">
<a-form-model layout="inline">
<a-form-model :class="getIsLight?'lightSy':'dark'" layout="inline">
<a-form-model-item label="选择日期">
<a-month-picker style="width: 146px" @change="getData" :allowClear="false" v-model="selTime[0]" valueFormat="YYYY-MM" placeholder="开始日期"></a-month-picker>
<a-month-picker style="width: 146px" @change="getData" :allowClear="false" v-model="selTime[1]" valueFormat="YYYY-MM" placeholder="结束日期"></a-month-picker>
</a-form-model-item>
</a-form-model>
</div>
<div class="d3">
<div class="d3" v-if="getIsLight">
<v-echarts :opt="opt2"></v-echarts>
</div>
<div class="d3" v-else>
<v-echarts :opt="opt"></v-echarts>
</div>
</div>
@ -21,6 +27,7 @@
import {getSalesPriceRangeSTypes} from "@/api/SaleRankMarket";
import {getCheZhuLatestTime} from "@/api/SaleRank"
import createOpt from './opt'
import createOptLight from './optLight'
export default {
name: 'totalTop20',
data() {
@ -35,6 +42,7 @@ export default {
btnTimes: ['品牌','车型'],
selTime: ['',''],
opt: {},
opt2: {},
}
},
created() {
@ -85,6 +93,7 @@ export default {
ds.push(value);
});
this.opt = createOpt(dx, ds);
this.opt2 = createOptLight(dx, ds);
})
},
report() {

@ -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"
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: '#000',
fontWeight: 600,
fontSize: 12,
formatter: (res) => {
return res.data + '%'
}
},
itemStyle: {
normal: {
//柱体的颜色
//右1000表示从正右开始向左渐变
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 createOptLight(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: '#000',
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: "#000",
},
},
data: dx
},
yAxis: {
type: 'value',
min: 0,
max: 100,
axisLine: {
show: false,
lineStyle: {
color: "#000",
},
},
axisLabel: {
formatter: (value) => {
return value + '%';
}
},
splitLine: {
lineStyle: {
type: "dashed", // y轴分割线类型
color: "#012b4b",
},
},
},
series: data
}
}

@ -1,17 +1,23 @@
<template>
<div class="preauto-outter">
<v-label-div title="轿车销量占比">
<div class="preauto-outter" :style="getIsLight?{background: '#FFF'}:{}">
<v-label-div v-if="!getIsLight" title="轿车销量占比">
<a-button type="primary" @click="report"></a-button>
</v-label-div>
<v-label-div-light v-else title="轿车销量占比" class="lightSy">
<a-button type="primary" @click="report"></a-button>
</v-label-div-light>
<div class="d2">
<a-form-model layout="inline">
<a-form-model :class="getIsLight?'lightSy':'dark'" layout="inline">
<a-form-model-item label="选择日期">
<a-month-picker style="width: 146px" @change="getData" :allowClear="false" v-model="selTime[0]" valueFormat="YYYY-MM" placeholder="开始日期"></a-month-picker>
<a-month-picker style="width: 146px" @change="getData" :allowClear="false" v-model="selTime[1]" valueFormat="YYYY-MM" placeholder="结束日期"></a-month-picker>
</a-form-model-item>
</a-form-model>
</div>
<div class="d3">
<div class="d3" v-if="getIsLight">
<v-echarts :opt="opt2"></v-echarts>
</div>
<div class="d3" v-else>
<v-echarts :opt="opt"></v-echarts>
</div>
</div>
@ -21,6 +27,7 @@
import {getSalesSpecNameTypesBySedan} from "@/api/SaleRankMarket";
import {getCheZhuLatestTime} from "@/api/SaleRank"
import createOpt from './opt'
import createOptLight from './optLight'
export default {
name: 'totalTop20',
data() {
@ -35,6 +42,7 @@ export default {
btnTimes: ['品牌','车型'],
selTime: ['',''],
opt: {},
opt2: {},
}
},
created() {
@ -64,6 +72,7 @@ export default {
ds.push(value);
});
this.opt = createOpt(dx, ds);
this.opt2 = createOptLight(dx, ds);
})
},
report() {

@ -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"
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: '#000',
fontWeight: 600,
fontSize: 10,
formatter: (res) => {
return res.data + '%'
}
},
itemStyle: {
normal: {
//柱体的颜色
//右1000表示从正右开始向左渐变
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 createOptLight(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: '#000',
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: "#000",
},
},
data: dx
},
yAxis: {
type: 'value',
min: 0,
max: 100,
axisLine: {
show: false,
lineStyle: {
color: "#000",
},
},
axisLabel: {
formatter: (value) => {
return value + '%';
}
},
splitLine: {
lineStyle: {
type: "dashed", // y轴分割线类型
color: "#012b4b",
},
},
},
series: data
}
}

@ -1,17 +1,23 @@
<template>
<div class="prempv-outter">
<v-label-div title="MPV销量占比">
<div class="prempv-outter" :style="getIsLight?{background: '#FFF'}:{}">
<v-label-div v-if="!getIsLight" title="MPV销量占比">
<a-button type="primary" @click="report"></a-button>
</v-label-div>
<v-label-div-light v-else title="MPV销量占比" class="lightSy">
<a-button type="primary" @click="report"></a-button>
</v-label-div-light>
<div class="d2">
<a-form-model layout="inline">
<a-form-model :class="getIsLight?'lightSy':'dark'" layout="inline">
<a-form-model-item label="选择日期">
<a-month-picker style="width: 146px" @change="getData" :allowClear="false" v-model="selTime[0]" valueFormat="YYYY-MM" placeholder="开始日期"></a-month-picker>
<a-month-picker style="width: 146px" @change="getData" :allowClear="false" v-model="selTime[1]" valueFormat="YYYY-MM" placeholder="结束日期"></a-month-picker>
</a-form-model-item>
</a-form-model>
</div>
<div class="d3">
<div class="d3" v-if="getIsLight">
<v-echarts :opt="opt2"></v-echarts>
</div>
<div class="d3" v-else>
<v-echarts :opt="opt"></v-echarts>
</div>
</div>
@ -21,6 +27,7 @@
import {getSalesSpecNameTypesByMpv} from "@/api/SaleRankMarket";
import {getCheZhuLatestTime} from "@/api/SaleRank"
import createOpt from './opt'
import createOptLight from './optLight'
export default {
name: 'totalTop20',
data() {
@ -35,6 +42,7 @@ export default {
btnTimes: ['品牌','车型'],
selTime: ['',''],
opt: {},
opt2: {},
}
},
created() {
@ -64,6 +72,7 @@ export default {
ds.push(value);
});
this.opt = createOpt(dx, ds);
this.opt2 = createOptLight(dx, ds)
})
},
report() {

@ -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"
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: '#000',
fontWeight: 600,
fontSize: 10,
formatter: (res) => {
return res.data + '%'
}
},
itemStyle: {
normal: {
//柱体的颜色
//右1000表示从正右开始向左渐变
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 createOptLight(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: '#000',
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: "#000",
},
},
data: dx
},
yAxis: {
type: 'value',
min: 0,
max: 100,
axisLine: {
show: false,
lineStyle: {
color: "#000",
},
},
axisLabel: {
formatter: (value) => {
return value + '%';
}
},
splitLine: {
lineStyle: {
type: "dashed", // y轴分割线类型
color: "#012b4b",
},
},
},
series: data
}
}

@ -1,17 +1,23 @@
<template>
<div class="precp-outter">
<v-label-div title="细分车型占比">
<div class="precp-outter" :style="getIsLight?{background: '#FFF'}:{}">
<v-label-div v-if="!getIsLight" title="细分车型占比">
<a-button type="primary" @click="report"></a-button>
</v-label-div>
<v-label-div-light v-else title="细分车型占比" class="lightSy">
<a-button type="primary" @click="report"></a-button>
</v-label-div-light>
<div class="d2">
<a-form-model layout="inline">
<a-form-model :class="getIsLight?'lightSy':'dark'" layout="inline">
<a-form-model-item label="选择日期">
<a-month-picker style="width: 146px" @change="getData" :allowClear="false" v-model="selTime[0]" valueFormat="YYYY-MM" placeholder="开始日期"></a-month-picker>
<a-month-picker style="width: 146px" @change="getData" :allowClear="false" v-model="selTime[1]" valueFormat="YYYY-MM" placeholder="结束日期"></a-month-picker>
</a-form-model-item>
</a-form-model>
</div>
<div class="d3">
<div class="d3" v-if="getIsLight">
<v-echarts :opt="opt2"></v-echarts>
</div>
<div class="d3" v-else>
<v-echarts :opt="opt"></v-echarts>
</div>
</div>
@ -21,6 +27,7 @@
import {getSalesSpecNameTypes} from "@/api/SaleRankMarket";
import {getCheZhuLatestTime} from "@/api/SaleRank"
import createOpt from './opt'
import createOptLight from "./optLight"
export default {
name: 'totalTop20',
data() {
@ -35,6 +42,7 @@ export default {
btnTimes: ['品牌','车型'],
selTime: ['',''],
opt: {},
opt2: {},
}
},
created() {
@ -64,6 +72,7 @@ export default {
ds.push(value);
});
this.opt = createOpt(dx, ds);
this.opt2 = createOptLight(dx, ds)
})
},
report() {

@ -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"
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: '#000',
fontWeight: 600,
fontSize: 12,
formatter: (res) => {
return res.data + '%'
}
},
itemStyle: {
normal: {
//柱体的颜色
//右1000表示从正右开始向左渐变
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 createOptLight(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: '#000',
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: "#000",
},
},
data: dx
},
yAxis: {
type: 'value',
min: 0,
max: 100,
axisLine: {
show: false,
lineStyle: {
color: "#000",
},
},
axisLabel: {
formatter: (value) => {
return value + '%';
}
},
splitLine: {
lineStyle: {
type: "dashed", // y轴分割线类型
color: "#012b4b",
},
},
},
series: data
}
}

@ -1,17 +1,23 @@
<template>
<div class="presuv-outter">
<v-label-div title="SUV销量占比">
<div class="presuv-outter" :style="getIsLight?{background: '#FFF'}:{}">
<v-label-div v-if="!getIsLight" title="SUV销量占比">
<a-button type="primary" @click="report"></a-button>
</v-label-div>
<v-label-div-light v-else title="SUV销量占比" class="lightSy">
<a-button type="primary" @click="report"></a-button>
</v-label-div-light>
<div class="d2">
<a-form-model layout="inline">
<a-form-model :class="getIsLight?'lightSy':'dark'" layout="inline">
<a-form-model-item label="选择日期">
<a-month-picker style="width: 146px" @change="getData" :allowClear="false" v-model="selTime[0]" valueFormat="YYYY-MM" placeholder="开始日期"></a-month-picker>
<a-month-picker style="width: 146px" @change="getData" :allowClear="false" v-model="selTime[1]" valueFormat="YYYY-MM" placeholder="结束日期"></a-month-picker>
</a-form-model-item>
</a-form-model>
</div>
<div class="d3">
<div class="d3" v-if="getIsLight">
<v-echarts :opt="opt2"></v-echarts>
</div>
<div class="d3" v-else>
<v-echarts :opt="opt"></v-echarts>
</div>
</div>
@ -21,6 +27,7 @@
import {getSalesSpecNameTypesBySuv} from "@/api/SaleRankMarket";
import {getCheZhuLatestTime} from "@/api/SaleRank"
import createOpt from './opt'
import createOptLight from './optLight'
export default {
name: 'totalTop20',
data() {
@ -35,6 +42,7 @@ export default {
btnTimes: ['品牌','车型'],
selTime: ['',''],
opt: {},
opt2: {},
}
},
created() {
@ -64,6 +72,7 @@ export default {
ds.push(value);
});
this.opt = createOpt(dx, ds);
this.opt2 = createOptLight(dx, ds)
})
},
report() {

@ -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"
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: '#000',
fontWeight: 600,
fontSize: 10,
formatter: (res) => {
return res.data + '%'
}
},
itemStyle: {
normal: {
//柱体的颜色
//右1000表示从正右开始向左渐变
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 createOptLight(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: '#000',
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: "#000",
},
},
data: dx
},
yAxis: {
type: 'value',
min: 0,
max: 100,
axisLine: {
show: false,
lineStyle: {
color: "#000",
},
},
axisLabel: {
formatter: (value) => {
return value + '%';
}
},
splitLine: {
lineStyle: {
type: "dashed", // y轴分割线类型
color: "#012b4b",
},
},
},
series: data
}
}

@ -1,9 +1,15 @@
<template>
<div class="ttc-outter">
<v-label-div title="轿车销量">
<div class="ttc-outter" :style="getIsLight?{background: '#FFF'}:{}">
<v-label-div v-if="!getIsLight" title="轿车销量">
<a-button type="primary" @click="report"></a-button>
</v-label-div>
<div class="d3">
<v-label-div-light v-else title="轿车销量" class="lightSy">
<a-button type="primary" @click="report"></a-button>
</v-label-div-light>
<div class="d3" v-if="getIsLight">
<v-echarts :opt="opt2"></v-echarts>
</div>
<div class="d3" v-else>
<v-echarts :opt="opt"></v-echarts>
</div>
</div>
@ -11,6 +17,7 @@
<script>
import createOpt from './opt'
import createOptLight from './optLight'
import {getSalesSpecName1TypesBySedan} from "@/api/SaleRankMarket";
import {getCheZhuLatestTime} from "@/api/SaleRank"
export default {
@ -24,6 +31,7 @@ export default {
sEndTime: '',
},
opt: {},
opt2: {},
}
},
created() {
@ -49,7 +57,8 @@ export default {
percent.push(data[i].YearOnYearGrowth)
}
};
this.opt = createOpt(firstYearData,secondYearData,percent)
this.opt = createOpt(firstYearData,secondYearData,percent);
this.opt2 = createOptLight(firstYearData,secondYearData,percent)
})
},
report() {

@ -0,0 +1,156 @@
import { bigNumberTransform } from "@/utils/gol/dataTool"
import * as echarts from "echarts";
export default function createOptLight(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: '#000',
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: '#000'
}
}
],
yAxis: [
{
type: 'value',
axisLabel: {
formatter: (value) => {
return bigNumberTransform(value);
},
color: '#000'
},
splitLine:{
show:false
},
},
{
type: 'value',
axisLabel: {
formatter: '{value}%',
color: '#000'
},
splitLine:{
show:false
},
}
],
series: [
{
name: '2021',
type: 'bar',
barWidth: 20,
tooltip: {
valueFormatter: function (value) {
return value;
}
},
itemStyle: {
normal: {
//柱体的颜色
//右1000表示从正右开始向左渐变
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: '#000'
},
data: firstData
},
{
name: '2022',
type: 'bar',
barWidth: 20,
tooltip: {
valueFormatter: function (value) {
return value;
}
},
itemStyle: {
normal: {
//柱体的颜色
//右1000表示从正右开始向左渐变
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: '#000'
},
data: secondData
},
{
name: '同比',
type: 'line',
yAxisIndex: 1,
tooltip: {
valueFormatter: function (value) {
return value+'%';
}
},
data: percent
}
]
}
}

@ -1,9 +1,15 @@
<template>
<div class="tpsv-outter">
<v-label-div title="MPV销量">
<div class="tpsv-outter" :style="getIsLight?{background: '#FFF'}:{}">
<v-label-div v-if="!getIsLight" title="MPV销量">
<a-button type="primary" @click="report"></a-button>
</v-label-div>
<div class="d3">
<v-label-div-light v-else title="MPV销量" class="lightSy">
<a-button type="primary" @click="report"></a-button>
</v-label-div-light>
<div class="d3" v-if="getIsLight">
<v-echarts :opt="opt2"></v-echarts>
</div>
<div class="d3" v-else>
<v-echarts :opt="opt"></v-echarts>
</div>
</div>
@ -11,6 +17,7 @@
<script>
import createOpt from './opt'
import createOptLight from './optLight'
import {getSalesSpecName1TypesByMpv} from "@/api/SaleRankMarket";
import {getCheZhuLatestTime} from "@/api/SaleRank"
export default {
@ -24,6 +31,7 @@ export default {
sEndTime: '',
},
opt: {},
opt2: {},
}
},
created() {
@ -50,6 +58,7 @@ export default {
}
};
this.opt = createOpt(firstYearData,secondYearData,percent)
this.opt2 = createOptLight(firstYearData,secondYearData,percent)
})
},
report() {

@ -0,0 +1,156 @@
import { bigNumberTransform } from "@/utils/gol/dataTool"
import * as echarts from "echarts";
export default function createOptLight(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: '#000',
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: '#000'
}
}
],
yAxis: [
{
type: 'value',
axisLabel: {
formatter: (value) => {
return bigNumberTransform(value);
},
color: '#000'
},
splitLine:{
show:false
},
},
{
type: 'value',
axisLabel: {
formatter: '{value}%',
color: '#000'
},
splitLine:{
show:false
},
}
],
series: [
{
name: '2021',
type: 'bar',
barWidth: 20,
tooltip: {
valueFormatter: function (value) {
return value;
}
},
itemStyle: {
normal: {
//柱体的颜色
//右1000表示从正右开始向左渐变
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: '#000'
},
data: firstData
},
{
name: '2022',
type: 'bar',
barWidth: 20,
tooltip: {
valueFormatter: function (value) {
return value;
}
},
itemStyle: {
normal: {
//柱体的颜色
//右1000表示从正右开始向左渐变
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: '#000'
},
data: secondData
},
{
name: '同比',
type: 'line',
yAxisIndex: 1,
tooltip: {
valueFormatter: function (value) {
return value+'%';
}
},
data: percent
}
]
}
}

@ -1,9 +1,15 @@
<template>
<div class="tpsv-outter">
<v-label-div title="SUV销量">
<div class="tpsv-outter" :style="getIsLight?{background: '#FFF'}:{}">
<v-label-div v-if="!getIsLight" title="SUV销量">
<a-button type="primary" @click="report"></a-button>
</v-label-div>
<div class="d3">
<v-label-div-light v-else title="SUV销量" class="lightSy">
<a-button type="primary" @click="report"></a-button>
</v-label-div-light>
<div class="d3" v-if="getIsLight">
<v-echarts :opt="opt2"></v-echarts>
</div>
<div class="d3" v-else>
<v-echarts :opt="opt"></v-echarts>
</div>
</div>
@ -11,6 +17,7 @@
<script>
import createOpt from './opt'
import createOptLight from './optLight'
import {getSalesSpecName1TypesBySuv} from "@/api/SaleRankMarket";
import {getCheZhuLatestTime} from "@/api/SaleRank"
export default {
@ -24,6 +31,7 @@ export default {
sEndTime: '',
},
opt: {},
opt2: {},
}
},
created() {
@ -50,6 +58,7 @@ export default {
}
};
this.opt = createOpt(firstYearData,secondYearData,percent)
this.opt2 = createOptLight(firstYearData,secondYearData,percent)
})
},
report() {

@ -0,0 +1,156 @@
import { bigNumberTransform } from "@/utils/gol/dataTool"
import * as echarts from "echarts";
export default function createOptLight(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: '#000',
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: '#000'
}
}
],
yAxis: [
{
type: 'value',
axisLabel: {
formatter: (value) => {
return bigNumberTransform(value);
},
color: '#000'
},
splitLine:{
show:false
},
},
{
type: 'value',
axisLabel: {
formatter: '{value}%',
color: '#000'
},
splitLine:{
show:false
},
}
],
series: [
{
name: '2021',
type: 'bar',
barWidth: 20,
tooltip: {
valueFormatter: function (value) {
return value;
}
},
itemStyle: {
normal: {
//柱体的颜色
//右1000表示从正右开始向左渐变
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: '#000'
},
data: firstData
},
{
name: '2022',
type: 'bar',
barWidth: 20,
tooltip: {
valueFormatter: function (value) {
return value;
}
},
itemStyle: {
normal: {
//柱体的颜色
//右1000表示从正右开始向左渐变
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: '#000'
},
data: secondData
},
{
name: '同比',
type: 'line',
yAxisIndex: 1,
tooltip: {
valueFormatter: function (value) {
return value+'%';
}
},
data: percent
}
]
}
}

@ -1,17 +1,23 @@
<template>
<div class="tp20-outter">
<v-label-div title="销量占比">
<div class="tp20-outter" :style="getIsLight?{background: '#FFF'}:{}">
<v-label-div v-if="!getIsLight" title="销量占比">
<a-button type="primary" @click="report"></a-button>
</v-label-div>
<v-label-div-light v-else title="销量占比" class="lightSy">
<a-button type="primary" @click="report"></a-button>
</v-label-div-light>
<div class="d2">
<a-form-model layout="inline">
<a-form-model :class="getIsLight?'lightSy':'dark'" layout="inline">
<a-form-model-item label="选择日期">
<a-month-picker style="width: 146px" @change="getData" :allowClear="false" v-model="selTime[0]" valueFormat="YYYY-MM" placeholder="开始日期"></a-month-picker>
<a-month-picker style="width: 146px" @change="getData" :allowClear="false" v-model="selTime[1]" valueFormat="YYYY-MM" placeholder="结束日期"></a-month-picker>
</a-form-model-item>
</a-form-model>
</div>
<div class="d3">
<div class="d3" v-if="getIsLight">
<v-echarts :opt="opt2"></v-echarts>
</div>
<div class="d3" v-else>
<v-echarts :opt="opt"></v-echarts>
</div>
</div>
@ -21,6 +27,7 @@
import {getSalesSpecName1Types} from "@/api/SaleRankMarket";
import {getCheZhuLatestTime} from "@/api/SaleRank"
import createOpt from './opt'
import createOptLight from './optLight'
export default {
name: 'totalTop20',
data() {
@ -35,6 +42,7 @@ export default {
btnTimes: ['品牌','车型'],
selTime: ['',''],
opt: {},
opt2: {},
}
},
created() {
@ -85,6 +93,7 @@ export default {
ds.push(value);
});
this.opt = createOpt(dx, ds);
this.opt2 = createOptLight(dx, ds);
})
},
report() {

@ -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"
// 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: '#000',
fontWeight: 600,
fontSize: 10,
formatter: (res) => {
return res.data + '%'
}
},
itemStyle: {
normal: {
//柱体的颜色
//右1000表示从正右开始向左渐变
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 createOptLight(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: '#000',
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: "#000",
},
},
data: dx
},
yAxis: {
type: 'value',
min: 0,
max: 100,
axisLine: {
show: false,
lineStyle: {
color: "#000",
},
},
axisLabel: {
formatter: (value) => {
return value + '%';
}
},
splitLine: {
lineStyle: {
type: "dashed", // y轴分割线类型
color: "#012b4b",
},
},
},
series: data
}
}

@ -3,6 +3,7 @@
<div class="sr-outter">
<div class="sr-top">
<!-- <a-button type="primary" style="margin-right: 16px" @click="changeLight">{{isLight}}</a-button> -->
<v-tab-group style="margin-right: 16px" @change="changeLight" :btns="['深色','浅色']"></v-tab-group>
<a-select class="choose-brand" v-model="chosenBrand" placeholder="请选择品牌" @dropdownVisibleChange="brandDrawer" :dropdownMatchSelectWidth="dd">
<div slot="dropdownRender"></div>
</a-select>

@ -132,12 +132,12 @@ export default {
}
},
//切换模式
changeLight() {
if(this.getIsLight) {
this.isLight = '深色模式'
changeLight(index) {
if(index == 0) {
// this.isLight = '深色模式'
this.setIsLight(false)
} else {
this.isLight = '浅色模式'
// this.isLight = '浅色模式'
this.setIsLight(true)
};
},

Loading…
Cancel
Save