parent
91359511b3
commit
fe596f2abd
@ -1,118 +1,124 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-15 15:58:57
|
||||
* @LastEditTime: 2021-10-15 16:52:25
|
||||
* @LastEditTime: 2021-11-16 11:01:43
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/BrandComparison/brandCommunicationTOPMedia/index.vue
|
||||
-->
|
||||
<template>
|
||||
<div class="bcm-outter" v-loading="load">
|
||||
<v-label-div title="品牌传播TOP媒体"> </v-label-div>
|
||||
<div class="bcm-inner">
|
||||
<div class="bcm-item" v-for="(item, index) in arrList" :key="index">
|
||||
<span class="ss1" :style="{ color: colors[index] }">{{
|
||||
<div class="bcm-outter" v-loading="load">
|
||||
<v-label-div title="品牌传播TOP媒体"> </v-label-div>
|
||||
<div class="bcm-inner">
|
||||
<div class="bcm-item" v-for="(item, index) in arrList" :key="index">
|
||||
<span class="ss1" :style="{ color: colors[index] }">{{
|
||||
item.key
|
||||
}}</span>
|
||||
<v-ranking-bcm
|
||||
v-for="(it, n) in item.value"
|
||||
:key="n"
|
||||
:label="it.key"
|
||||
:num="it.num"
|
||||
:val="it.value"
|
||||
></v-ranking-bcm>
|
||||
</div>
|
||||
<div class="dd1">
|
||||
<vue-scroll>
|
||||
<v-ranking-bcm v-for="(it, n) in item.value" :key="n" :label="it.key" :num="it.num" :val="it.value"></v-ranking-bcm>
|
||||
</vue-scroll>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getSourceTopCount0528C } from "@/api/BrandComparison";
|
||||
import vRankingBcm from "./v-ranking-bcm";
|
||||
export default {
|
||||
name: "brandCommunicationTOPMedia",
|
||||
components: {
|
||||
vRankingBcm,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
colors: [
|
||||
"#3373CC",
|
||||
"#63AECC",
|
||||
"#54BF93",
|
||||
"#CC9D12",
|
||||
"#CC7733",
|
||||
"#CC5B41",
|
||||
],
|
||||
load: false,
|
||||
form: {
|
||||
token: "",
|
||||
sBrand: "",
|
||||
},
|
||||
arrList: [],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.initData();
|
||||
},
|
||||
methods: {
|
||||
initData() {
|
||||
this.form.token = this.getToken;
|
||||
let arr = this.getBComparison;
|
||||
let brands = [];
|
||||
arr.forEach((ele) => {
|
||||
brands.push(ele.name);
|
||||
});
|
||||
this.form.sBrand = brands.toString();
|
||||
this.getData();
|
||||
name: "brandCommunicationTOPMedia",
|
||||
components: {
|
||||
vRankingBcm,
|
||||
},
|
||||
getData() {
|
||||
return new Promise((resolve, reject) => {
|
||||
let obj = Object.assign({}, this.getCtime2, this.form);
|
||||
this.load = true;
|
||||
getSourceTopCount0528C(obj)
|
||||
.then((res) => {
|
||||
let data = res.data || [];
|
||||
//往原始数据内添加排名
|
||||
data.forEach((ele) => {
|
||||
for (let index = 0; index < ele.value.length; index++) {
|
||||
ele.value[index].num = index + 1;
|
||||
}
|
||||
data() {
|
||||
return {
|
||||
colors: [
|
||||
"#3373CC",
|
||||
"#63AECC",
|
||||
"#54BF93",
|
||||
"#CC9D12",
|
||||
"#CC7733",
|
||||
"#CC5B41",
|
||||
],
|
||||
load: false,
|
||||
form: {
|
||||
token: "",
|
||||
sBrand: "",
|
||||
},
|
||||
arrList: [],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.initData();
|
||||
},
|
||||
methods: {
|
||||
initData() {
|
||||
this.form.token = this.getToken;
|
||||
let arr = this.getBComparison;
|
||||
let brands = [];
|
||||
arr.forEach((ele) => {
|
||||
brands.push(ele.name);
|
||||
});
|
||||
this.form.sBrand = brands.toString();
|
||||
this.getData();
|
||||
},
|
||||
getData() {
|
||||
return new Promise((resolve, reject) => {
|
||||
let obj = Object.assign({}, this.getCtime2, this.form);
|
||||
this.load = true;
|
||||
getSourceTopCount0528C(obj)
|
||||
.then((res) => {
|
||||
let data = res.data || [];
|
||||
//往原始数据内添加排名
|
||||
data.forEach((ele) => {
|
||||
for (
|
||||
let index = 0;
|
||||
index < ele.value.length;
|
||||
index++
|
||||
) {
|
||||
ele.value[index].num = index + 1;
|
||||
}
|
||||
});
|
||||
this.arrList = data;
|
||||
this.load = false;
|
||||
resolve(data);
|
||||
})
|
||||
.catch(() => {
|
||||
reject(false);
|
||||
});
|
||||
});
|
||||
this.arrList = data;
|
||||
this.load = false;
|
||||
resolve(data);
|
||||
})
|
||||
.catch(() => {
|
||||
reject(false);
|
||||
});
|
||||
});
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.bcm-outter {
|
||||
width: 100%;
|
||||
height: 460px;
|
||||
border: 2px solid #0f2a4d;
|
||||
margin-top: 16px;
|
||||
.bcm-inner {
|
||||
width: 100%;
|
||||
height: calc(100% - 48px);
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
.bcm-item {
|
||||
width: 282px;
|
||||
margin-left: 27px;
|
||||
.ss1 {
|
||||
display: block;
|
||||
font-size: 18px;
|
||||
color: #fff;
|
||||
font-weight: 500;
|
||||
padding-top: 14px;
|
||||
}
|
||||
height: 460px;
|
||||
border: 2px solid #0f2a4d;
|
||||
margin-top: 16px;
|
||||
.bcm-inner {
|
||||
width: 100%;
|
||||
height: calc(100% - 48px);
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
.bcm-item {
|
||||
width: 282px;
|
||||
height: 100%;
|
||||
margin-left: 27px;
|
||||
.ss1 {
|
||||
display: block;
|
||||
font-size: 18px;
|
||||
color: #fff;
|
||||
font-weight: 500;
|
||||
padding-top: 14px;
|
||||
}
|
||||
.dd1 {
|
||||
height: calc(100% - 44px);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -1,122 +1,127 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-15 15:58:57
|
||||
* @LastEditTime: 2021-11-11 14:45:50
|
||||
* @LastEditTime: 2021-11-16 11:06:38
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/BrandComparison/brandCommunicationTOPMedia/index.vue
|
||||
-->
|
||||
<template>
|
||||
<div class="bcm-outter" v-loading="load">
|
||||
<v-label-div title="车型传播TOP媒体"> </v-label-div>
|
||||
<div class="bcm-inner">
|
||||
<div class="bcm-item" v-for="(item, index) in arrList" :key="index">
|
||||
<span class="ss1" :style="{ color: colors[index] }">{{
|
||||
<div class="bcm-outter" v-loading="load">
|
||||
<v-label-div title="车型传播TOP媒体"> </v-label-div>
|
||||
<div class="bcm-inner">
|
||||
<div class="bcm-item" v-for="(item, index) in arrList" :key="index">
|
||||
<span class="ss1" :style="{ color: colors[index] }">{{
|
||||
item.key
|
||||
}}</span>
|
||||
<v-ranking-bcm
|
||||
v-for="(it, n) in item.value"
|
||||
:key="n"
|
||||
:label="it.key"
|
||||
:num="it.num"
|
||||
:val="it.value"
|
||||
></v-ranking-bcm>
|
||||
</div>
|
||||
<div class="dd1">
|
||||
<vue-scroll>
|
||||
<v-ranking-bcm v-for="(it, n) in item.value" :key="n" :label="it.key" :num="it.num" :val="it.value"></v-ranking-bcm>
|
||||
</vue-scroll>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getSourceTopCount0528C } from "@/api/BrandComparison";
|
||||
import vRankingBcm from "./v-ranking-bcm";
|
||||
export default {
|
||||
name: "brandCommunicationTOPMedia",
|
||||
components: {
|
||||
vRankingBcm,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
load: false,
|
||||
colors: [
|
||||
"#3373CC",
|
||||
"#63AECC",
|
||||
"#54BF93",
|
||||
"#CC9D12",
|
||||
"#CC7733",
|
||||
"#CC5B41",
|
||||
],
|
||||
form: {
|
||||
token: "",
|
||||
sBrand: "",
|
||||
sSeriesName: "",
|
||||
iContrastType: 2
|
||||
},
|
||||
arrList:[],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.initData();
|
||||
},
|
||||
methods: {
|
||||
initData() {
|
||||
this.form.token = this.getToken;
|
||||
let arr = this.getMComparison;
|
||||
let brands = [];
|
||||
let models = [];
|
||||
arr.forEach((ele) => {
|
||||
brands.push(ele.brand);
|
||||
models.push(ele.model);
|
||||
});
|
||||
this.form.sBrand = brands.toString();
|
||||
this.form.sSeriesName = models.toString();
|
||||
this.getData();
|
||||
name: "brandCommunicationTOPMedia",
|
||||
components: {
|
||||
vRankingBcm,
|
||||
},
|
||||
getData() {
|
||||
return new Promise((resolve, reject) => {
|
||||
let obj = Object.assign({}, this.getCtime2, this.form);
|
||||
this.load = true;
|
||||
getSourceTopCount0528C(obj)
|
||||
.then((res) => {
|
||||
let data = res.data || [];
|
||||
data.forEach(ele => {
|
||||
for(let index = 0 ; index<ele.value.length;index++){
|
||||
ele.value[index].num = index + 1;
|
||||
}
|
||||
data() {
|
||||
return {
|
||||
load: false,
|
||||
colors: [
|
||||
"#3373CC",
|
||||
"#63AECC",
|
||||
"#54BF93",
|
||||
"#CC9D12",
|
||||
"#CC7733",
|
||||
"#CC5B41",
|
||||
],
|
||||
form: {
|
||||
token: "",
|
||||
sBrand: "",
|
||||
sSeriesName: "",
|
||||
iContrastType: 2,
|
||||
},
|
||||
arrList: [],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.initData();
|
||||
},
|
||||
methods: {
|
||||
initData() {
|
||||
this.form.token = this.getToken;
|
||||
let arr = this.getMComparison;
|
||||
let brands = [];
|
||||
let models = [];
|
||||
arr.forEach((ele) => {
|
||||
brands.push(ele.brand);
|
||||
models.push(ele.model);
|
||||
});
|
||||
this.form.sBrand = brands.toString();
|
||||
this.form.sSeriesName = models.toString();
|
||||
this.getData();
|
||||
},
|
||||
getData() {
|
||||
return new Promise((resolve, reject) => {
|
||||
let obj = Object.assign({}, this.getCtime2, this.form);
|
||||
this.load = true;
|
||||
getSourceTopCount0528C(obj)
|
||||
.then((res) => {
|
||||
let data = res.data || [];
|
||||
data.forEach((ele) => {
|
||||
for (
|
||||
let index = 0;
|
||||
index < ele.value.length;
|
||||
index++
|
||||
) {
|
||||
ele.value[index].num = index + 1;
|
||||
}
|
||||
});
|
||||
this.arrList = data;
|
||||
this.load = false;
|
||||
resolve(data);
|
||||
})
|
||||
.catch(() => {
|
||||
reject(false);
|
||||
});
|
||||
});
|
||||
this.arrList = data;
|
||||
this.load = false;
|
||||
resolve(data);
|
||||
})
|
||||
.catch(() => {
|
||||
reject(false);
|
||||
});
|
||||
});
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.bcm-outter {
|
||||
width: 100%;
|
||||
height: 460px;
|
||||
border: 2px solid #0f2a4d;
|
||||
margin-top: 16px;
|
||||
.bcm-inner {
|
||||
width: 100%;
|
||||
height: calc(100% - 48px);
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
.bcm-item {
|
||||
width: 282px;
|
||||
margin-left: 27px;
|
||||
.ss1 {
|
||||
display: block;
|
||||
font-size: 18px;
|
||||
color: #fff;
|
||||
font-weight: 500;
|
||||
padding-top: 14px;
|
||||
}
|
||||
height: 460px;
|
||||
border: 2px solid #0f2a4d;
|
||||
margin-top: 16px;
|
||||
.bcm-inner {
|
||||
width: 100%;
|
||||
height: calc(100% - 48px);
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
.bcm-item {
|
||||
width: 282px;
|
||||
margin-left: 27px;
|
||||
.ss1 {
|
||||
display: block;
|
||||
font-size: 18px;
|
||||
color: #fff;
|
||||
font-weight: 500;
|
||||
padding-top: 14px;
|
||||
}
|
||||
.dd1 {
|
||||
height: calc(100% - 44px);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
Loading…
Reference in new issue