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