张雄 2 years ago
parent 2f382b7c60
commit 219fe5b410

@ -40,8 +40,8 @@ export function getList(params) {
}
// 重点媒体
export function getWebsite(params) {
let obj = Object.assign({action: 'getWebsite', sType: 'BrandOverview'}, params)
export function getSourceTop(params) {
let obj = Object.assign({action: 'getSourceTop', sType: 'BrandOverview'}, params)
return httpService({
url: `/api/v6.ashx`,
method: 'post',

@ -8,6 +8,7 @@
-->
<template>
<div>
<div class="bd-outter" v-loading="load">
<v-label-div title="品牌数据"></v-label-div>
<div class="bd-inner">
@ -16,15 +17,7 @@
<img class="m1" src="../../../assets/images/BrandInsight/ic_cb.png" />
<span class="s1">传播数据总量</span>
</div>
<!-- <a-popover title="传播数据">
<template slot="content">
<div class="pd-item" v-for="(item,index) in countArr" :key="index">
<span>{{item.key}}</span>
<span>{{item.value}}</span>
</div>
</template> -->
<span class="s2">{{count}}</span>
<!-- </a-popover> -->
<span class="s2">{{count}}</span>
</div>
<div class="bd-o-d1" style="margin-top: 16px">
<div class="d1">
@ -50,7 +43,42 @@
</a-popover>
</div>
</div>
</div>
<div class="bd-outter" style="margin-top: 16px" v-loading="load">
<v-label-div title="负面数据"></v-label-div>
<div class="bd-inner">
<div class="bd-o-d1">
<div class="d1">
<img class="m1" src="../../../assets/images/BrandInsight/ic_warning.png" />
<span class="s1">负面数据总量</span>
</div>
<span class="s2">{{negCount}}</span>
</div>
<div class="bd-o-d1" style="margin-top: 16px">
<div class="d1">
<img class="m1" src="../../../assets/images/BrandInsight/ic_dx.png" />
<span class="s1">舆情整体调性</span>
</div>
<a-popover title="舆情整体调性">
<template slot="content">
<template v-for="(item,index) in negObj">
<div class="pd-item" :key="index" v-if="index != 'z'">
<span v-if="index === 'a'"></span>
<span v-if="index === 'b'"></span>
<span v-if="index === 'c'"></span>
<span>{{item}}</span>
</div>
</template>
</template>
<span class="s2">
<span class="s2-s1" :style="{width: negObj.a/negObj.z * 100 + '%',background: '#CC9D12'}"></span>
<span class="s2-s1" :style="{width: negObj.b/negObj.z * 100 + '%',background: '#CC7733'}"></span>
<span class="s2-s1" :style="{width: negObj.c/negObj.z * 100 + '%',background: '#CC5B41'}"></span>
</span>
</a-popover>
</div>
</div>
</div>
</div>
</template>
@ -62,7 +90,8 @@ export default {
data() {
return {
count: 0,
countArr: [],
negCount: 0,
load: false,
form: {
token: "",
@ -75,6 +104,12 @@ export default {
c: 0,
z: 0,
},
negObj: {
a: 0,
b: 0,
c: 0,
z: 0,
}
};
},
created() {
@ -88,12 +123,16 @@ export default {
let obj = Object.assign({}, this.getCtime2, this.form)
getHealthIndex(obj).then(res => {
let data = res.data;
this.countArr = data.affections || [];
this.count = data.affections[0].value + data.affections[1].value + data.affections[2].value;
this.negCount = data.crisis[0].value + data.crisis[1].value + data.crisis[2].value;
this.affObj.a = data.affections[0].value || 0;
this.affObj.b = data.affections[1].value || 0;
this.affObj.c = data.affections[2].value || 0;
this.affObj.z = this.count;
this.negObj.a = data.crisis[0].value || 0;
this.negObj.b = data.crisis[1].value || 0;
this.negObj.c = data.crisis[2].value || 0;
this.negObj.z = this.negCount;
})
}
},

@ -4,7 +4,6 @@
<div class="b-d1">
<div class="bdl-d1-dd1">
<brand-data :brand="brand"></brand-data>
<negative-data :brand="brand"></negative-data>
</div>
<div class="bdl-d1-dd2">
<div class="bdl-d1-dd2-d1">
@ -63,7 +62,6 @@
<script>
import brandData from "./brandData";
import negativeData from "./negativeData";
import warningInfo from "./warningInfo";
import eventList from "./eventList";
import mediaList from "./mediaList"
@ -73,7 +71,7 @@ export default {
name: "MyBrand",
inject: ['reload'],
components: {
brandData,negativeData,warningInfo,eventList,mediaList
brandData,warningInfo,eventList,mediaList
},
data() {
return {
@ -105,29 +103,17 @@ export default {
brand: '',
}
},
created() {
mounted() {
this.setHeaderType(3);
this.brand = this.getWarningBrand.brandname;
this.form.token = this.getToken;
this.form.sBrand = this.getWarningBrand.brandname;
this.form.sSeriesName = this.getWarningSeries;
this.getData();
this.getApi();
},
methods: {
getData() {
let obj = Object.assign({}, this.form, this.getCtime2)
getSwsQyUserCarMainBrandList({token: this.getToken}).then(res => {
let brand = res.data[0] || '';
if(brand) {
this.brand = brand.brandname
};
});
getHealthIndex(obj).then(res => {
this.healthNum = res.data.healthIndex
});
},
openBrand() {
this.visible = true;
getApi() {
let obj = {
token: this.getToken, iPageIndex: 1, iPageSize: 20, brandname: this.getWarningBrand.brandname
}
@ -138,11 +124,28 @@ export default {
this.settingForm.SeriesNames = data[0].Es.SeriesNames;
if(data[0].Es.SeriesNames != '') {
this.list = data[0].Es.SeriesNames.split(',');
this.setWarningSeries(data[0].Es.SeriesNames);
}
this.Id = data[0].Id;
this.Statu = data[0].Statu
})
},
getData() {
let obj = Object.assign({}, this.form, this.getCtime2)
getSwsQyUserCarMainBrandList({token: this.getToken}).then(res => {
let brand = res.data[0] || '';
if(brand) {
this.brand = brand.brandname
};
});
getHealthIndex(obj).then(res => {
this.healthNum = res.data.healthIndex
});
},
openBrand() {
this.getApi();
this.visible = true;
},
crisisChange(val, type) {
this.dx = val;
this.settingForm.Crisis = val.join(',');

@ -8,7 +8,7 @@
-->
<template>
<div class="ml-outter" v-see v-loading="load">
<v-label-div title="媒体分别"></v-label-div>
<v-label-div title="传播媒体TOP10"></v-label-div>
<div class="ml-inner">
<v-echarts :opt="opt" @getData="clickEchars"></v-echarts>
</div>
@ -16,7 +16,7 @@
</template>
<script>
import {getWebsite} from "@/api/MyBrand"
import {getSourceTop} from "@/api/MyBrand"
import createOpt from "./opt"
export default {
name: "brand-top",
@ -42,7 +42,7 @@ export default {
getData() {
this.load = true;
let obj = Object.assign({},this.getCtime2, this.form);
getWebsite(obj).then(res => {
getSourceTop(obj).then(res => {
let data = res.data || {};
let dx = [];
let ds = [];

@ -1,167 +0,0 @@
<!--
* @Author: xw
* @Date: 2021-10-11 18:42:58
* @LastEditTime: 2021-11-29 10:48:33
* @LastEditors: Please set LastEditors
* @Description: 品牌数据
* @FilePath: /data-show/src/views/BrandInsight/brandData/index.vue
-->
<template>
<div class="bd-outter" v-loading="load">
<v-label-div title="负面数据"></v-label-div>
<div class="bd-inner">
<div class="bd-o-d1">
<div class="d1">
<img class="m1" src="../../../assets/images/BrandInsight/ic_warning.png" />
<span class="s1">负面数据总量</span>
</div>
<!-- <a-popover title="负面数据">
<template slot="content">
<div class="pd-item" v-for="(item,index) in countArr" :key="index">
<span>{{item.key}}</span>
<span>{{item.value}}</span>
</div>
</template> -->
<span class="s2">{{count}}</span>
<!-- </a-popover> -->
</div>
<div class="bd-o-d1" style="margin-top: 16px">
<div class="d1">
<img class="m1" src="../../../assets/images/BrandInsight/ic_dx.png" />
<span class="s1">舆情整体调性</span>
</div>
<a-popover title="舆情整体调性">
<template slot="content">
<template v-for="(item,index) in affObj">
<div class="pd-item" :key="index" v-if="index != 'z'">
<span v-if="index === 'a'"></span>
<span v-if="index === 'b'"></span>
<span v-if="index === 'c'"></span>
<span>{{item}}</span>
</div>
</template>
</template>
<span class="s2">
<span class="s2-s1" :style="{width: affObj.a/affObj.z * 100 + '%',background: '#CC9D12'}"></span>
<span class="s2-s1" :style="{width: affObj.b/affObj.z * 100 + '%',background: '#CC7733'}"></span>
<span class="s2-s1" :style="{width: affObj.c/affObj.z * 100 + '%',background: '#CC5B41'}"></span>
</span>
</a-popover>
</div>
</div>
</div>
</template>
<script>
import {getHealthIndex} from "@/api/MyBrand"
export default {
name: "negativeData",
props: ["brand"],
data() {
return {
count: 0,
countArr: [],
load: false,
form: {
token: "",
sBrand: this.getWarningBrand,
sSeriesName: '',
},
affObj: {
a: 0,
b: 0,
c: 0,
z: 0,
},
};
},
created() {
this.form.token = this.getToken;
this.form.sBrand = this.getWarningBrand.brandname || this.brand;
this.form.sSeriesName = this.getWarningSeries || '';
this.getData();
},
methods: {
getData() {
let obj = Object.assign({}, this.getCtime2, this.form)
getHealthIndex(obj).then(res => {
let data = res.data;
this.countArr = data.crisis || [];
this.count = data.crisis[0].value + data.crisis[1].value + data.crisis[2].value;
this.affObj.a = data.crisis[0].value || 0;
this.affObj.b = data.crisis[1].value || 0;
this.affObj.c = data.crisis[2].value || 0;
this.affObj.z = this.count;
})
},
},
};
</script>
<style lang="less" scoped>
.bd-outter {
width: 620px;
height: 272px;
border: 2px solid #0f2a4d;
border-radius: 2px;
margin-top: 16px;
}
.bd-inner {
padding: 16px;
.bd-o-d1 {
width: 588px;
height: 88px;
border: 1px solid #0f2a4d;
border-radius: 2px;
display: flex;
justify-content: space-between;
align-items: center;
.d1 {
display: flex;
height: 100%;
justify-content: flex-start;
align-items: center;
.m1 {
display: block;
width: 64px;
height: 64px;
margin-left: 16px;
}
.s1 {
display: block;
color: #fff;
font-size: 20px;
margin-left: 12px;
}
}
.s2 {
display: block;
color: #fff;
font-size: 44px;
font-family: Bebas;
margin-right: 16px;
display: flex;
justify-content: flex-end;
width: 276px;
cursor: pointer;
.s2-s1 {
display: block;
width: 102px;
height: 36px;
background: #3373cc;
margin-right: 2px;
}
}
}
}
.pd-item {
display: flex;
justify-content: space-between;
color: #fff;
border-bottom: 1px solid #173b6d;
padding: 10px;
}
</style>

@ -9,7 +9,7 @@
<template>
<div class="warn-outter" v-loading="load">
<div class="warn-inner">
<vLabel-div title="危机消息">
<vLabel-div title="负面消息">
<a class="more" @click="goMore"></a>
</vLabel-div>
<div class="warn-bd">

Loading…
Cancel
Save