parent
18f6edc100
commit
be90d56127
@ -1,66 +1,84 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: your name
|
* @Author: your name
|
||||||
* @Date: 2021-10-15 15:34:26
|
* @Date: 2021-10-15 15:34:26
|
||||||
* @LastEditTime: 2021-11-11 10:46:19
|
* @LastEditTime: 2021-11-11 14:27:39
|
||||||
* @LastEditors: Please set LastEditors
|
* @LastEditors: Please set LastEditors
|
||||||
* @Description: In User Settings Edit
|
* @Description: In User Settings Edit
|
||||||
* @FilePath: /data-show/src/views/BrandComparison/keyMediaCommunicationComparison/index.vue
|
* @FilePath: /data-show/src/views/BrandComparison/keyMediaCommunicationComparison/index.vue
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<div class="kmcc-outter">
|
<div class="kmcc-outter" v-loading="load">
|
||||||
<v-label-div title="重点媒体传播对比"> </v-label-div>
|
<v-label-div title="重点媒体传播对比"> </v-label-div>
|
||||||
<div class="kmcc-inner">
|
<div class="kmcc-inner">
|
||||||
<v-echarts :opt="opt"></v-echarts>
|
<v-echarts :opt="opt"></v-echarts>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import createOpt from "./opt";
|
import createOpt from "./opt";
|
||||||
import { getSourceCount0528C } from "@/api/BrandComparison";
|
import { getSourceCount0528C } from "@/api/BrandComparison";
|
||||||
export default {
|
export default {
|
||||||
name: "kmcc-outter",
|
name: "kmcc-outter",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
form: {
|
load: false,
|
||||||
token: "",
|
form: {
|
||||||
sBrand: "",
|
token: "",
|
||||||
},
|
sBrand: "",
|
||||||
opt: createOpt(),
|
sSeriesName: "",
|
||||||
};
|
iContrastType: 2,
|
||||||
},
|
},
|
||||||
created() {
|
opt: {},
|
||||||
this.initData();
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
created() {
|
||||||
initData() {
|
this.initData();
|
||||||
this.form.token = this.getToken;
|
},
|
||||||
let arr = this.getBComparison;
|
methods: {
|
||||||
let brands = [];
|
initData() {
|
||||||
arr.forEach((ele) => {
|
this.form.token = this.getToken;
|
||||||
brands.push(ele.name);
|
let arr = this.getMComparison;
|
||||||
});
|
let brands = [];
|
||||||
this.form.sBrand = brands.toString();
|
let models = [];
|
||||||
this.getData();
|
arr.forEach((ele) => {
|
||||||
|
brands.push(ele.brand);
|
||||||
|
models.push(ele.model);
|
||||||
|
});
|
||||||
|
this.form.sBrand = brands.toString();
|
||||||
|
this.form.sSeriesName = models.toString();
|
||||||
|
this.getData();
|
||||||
|
},
|
||||||
|
getData() {
|
||||||
|
let obj = Object.assign({}, this.getCtime2, this.form);
|
||||||
|
this.load = true;
|
||||||
|
getSourceCount0528C(obj).then((res) => {
|
||||||
|
let data = res.data;
|
||||||
|
let dx = [];
|
||||||
|
let ds = [];
|
||||||
|
data.forEach((ele) => {
|
||||||
|
let key = ele.key;
|
||||||
|
let value = ele.value;
|
||||||
|
dx.push(key);
|
||||||
|
ds.push(value);
|
||||||
|
});
|
||||||
|
this.opt = createOpt(dx, ds);
|
||||||
|
this.load = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
},
|
},
|
||||||
getData() {
|
|
||||||
let obj = Object.assign({}, this.getCtime2, this.form);
|
|
||||||
getSourceCount0528C(obj).then(() => {
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.kmcc-outter {
|
.kmcc-outter {
|
||||||
width: 936px;
|
width: 936px;
|
||||||
height: 460px;
|
height: 460px;
|
||||||
border: 2px solid #0f2a4d;
|
border: 2px solid #0f2a4d;
|
||||||
margin-left: 16px;
|
margin-left: 16px;
|
||||||
.kmcc-inner {
|
.kmcc-inner {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: calc(100% - 48px);
|
height: calc(100% - 48px);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
Loading…
Reference in new issue