prod
lily.zhang 3 years ago
parent fe596f2abd
commit fd709c1822

@ -1,7 +1,7 @@
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2021-10-11 10:42:36 * @Date: 2021-10-11 10:42:36
* @LastEditTime: 2021-10-23 15:06:25 * @LastEditTime: 2021-11-16 14:00:51
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: /data-show/src/components/v-modal/index.vue * @FilePath: /data-show/src/components/v-modal/index.vue
@ -72,7 +72,7 @@ export default {
position: fixed; position: fixed;
width: 100%; width: 100%;
height: 100%; height: 100%;
z-index: 200; z-index: 1100;
top: 0px; top: 0px;
left: 0px; left: 0px;
background-color: rgba(0, 0, 0, 0.45); background-color: rgba(0, 0, 0, 0.45);

@ -1,7 +1,7 @@
/* /*
* @Author: your name * @Author: your name
* @Date: 2021-10-12 13:56:13 * @Date: 2021-10-12 13:56:13
* @LastEditTime: 2021-11-16 10:26:56 * @LastEditTime: 2021-11-16 11:58:04
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: /data-show/src/mixins/index.js * @FilePath: /data-show/src/mixins/index.js
@ -187,6 +187,14 @@ export default {
sClock += ss; sClock += ss;
return clock + sClock; return clock + sClock;
}, },
btnPrm(val) {
let b = false;
let buttonpermsStr = store.getters.getLevelBtn || [];
let n = buttonpermsStr.findIndex(ele => ele.btn === val);
if(n === -1) b = false;
else b = true;
return b;
}
}, },
filters: { filters: {
// 处理超出字后面... // 处理超出字后面...

@ -1,7 +1,7 @@
<!-- <!--
* @Author: xw * @Author: xw
* @Date: 2021-10-12 11:06:58 * @Date: 2021-10-12 11:06:58
* @LastEditTime: 2021-11-12 17:57:31 * @LastEditTime: 2021-11-16 15:43:24
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: 热门事件 * @Description: 热门事件
* @FilePath: /data-show/src/views/BrandInsight/popularEvents/index.vue * @FilePath: /data-show/src/views/BrandInsight/popularEvents/index.vue
@ -49,14 +49,12 @@ export default {
Object.keys(type).forEach((ele) => { Object.keys(type).forEach((ele) => {
obj[ele] = []; obj[ele] = [];
}); });
this.sortDataArr(arr)
let dx = [];
arr.forEach((ele) => { arr.forEach((ele) => {
let m1 = moment(ele.maxSourcetime).format('HH:mm'); let m1 = moment(ele.maxSourcetime).format('HH:mm');
// let m2 = moment(ele.maxSourcetime); // let m2 = moment(m1).valueOf()
// let duration = m2.diff(m1); dx.push(m1)
// let str= moment.utc(time).format('HH:mm')
let a = [ let a = [
m1, m1,
ele.events_count * 1, ele.events_count * 1,
@ -69,10 +67,33 @@ export default {
]; ];
obj[ele.events_type].push(a); obj[ele.events_type].push(a);
}); });
this.opt = createOpt(obj);
this.opt = createOpt(dx, obj);
this.load = false; this.load = false;
}); });
}, },
//
sortDataArr(arr) {
for(let i=0; i < arr.length; i++) {
for(let j = i+1; j < arr.length; j++) {
let t1 = moment(arr[i].maxSourcetime).format('HH:mm');
let t2 = moment(arr[j].maxSourcetime).format('HH:mm');
let a = t1.split(":");
let x1 = a[0]*60 + a[1]*1;
let b = t2.split(":");
let x2 = b[0]*60 + b[1]*1;
let diff = x2 - x1;
if(diff < 0) {
let ele1 = arr[i];
let ele2 = arr[j];
let ele3 = ele1;
arr[i] = ele2;
arr[j] = ele3;
}
}
}
}
}, },
}; };
</script> </script>

@ -1,7 +1,7 @@
/* /*
* @Author: your name * @Author: your name
* @Date: 2021-10-12 11:16:44 * @Date: 2021-10-12 11:16:44
* @LastEditTime: 2021-11-12 17:58:45 * @LastEditTime: 2021-11-16 15:44:07
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: /data-show/src/views/BrandInsight/popularEvents/opt.js * @FilePath: /data-show/src/views/BrandInsight/popularEvents/opt.js
@ -25,14 +25,14 @@ function createData(obj = {}) {
data: obj[key], data: obj[key],
type: 'scatter', type: 'scatter',
symbolSize: function (data) { symbolSize: function (data) {
return data[2] / Math.E return data[2]/1.2
} }
} }
arr.push(o) arr.push(o)
} }
return arr return arr
} }
export default function createOpt(ds = {}) { export default function createOpt(dx = [], ds = {}) {
const data = createData(ds) const data = createData(ds)
return { return {
title: { title: {
@ -86,7 +86,7 @@ export default function createOpt(ds = {}) {
splitLine: { splitLine: {
show: false show: false
}, },
// data: ['00:00', '04:00', '08:00', '12:00', '16:00', '20:00', '24:00'], data: dx,
axisLabel : { axisLabel : {
// formatter: (value) => { // formatter: (value) => {

@ -1,7 +1,7 @@
<!-- <!--
* @Author: xw * @Author: xw
* @Date: 2021-10-12 09:32:35 * @Date: 2021-10-12 09:32:35
* @LastEditTime: 2021-11-16 10:48:54 * @LastEditTime: 2021-11-16 14:25:51
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: 舆情传播趋势 * @Description: 舆情传播趋势
* @FilePath: /data-show/src/views/BrandInsight/titsopo/index.vue * @FilePath: /data-show/src/views/BrandInsight/titsopo/index.vue
@ -9,7 +9,7 @@
<template> <template>
<div class="tit-outter" v-loading="load"> <div class="tit-outter" v-loading="load">
<div class="tit-header"> <div class="tit-header">
<a-button type="primary" size="small" @click="goIDE"></a-button> <a-button type="primary" size="small" @click="goIDE" v-has="'btn_brand_datalist'"></a-button>
<a-button type="primary" style="margin-left: 1rem;margin-right: 1rem;" size="small" :loading="btnLoading" @click="exportData" v-has="'btn_brand_toppt'"></a-button> <a-button type="primary" style="margin-left: 1rem;margin-right: 1rem;" size="small" :loading="btnLoading" @click="exportData" v-has="'btn_brand_toppt'"></a-button>
</div> </div>
<div class="tit-inner"> <div class="tit-inner">
@ -78,6 +78,9 @@ export default {
}, },
// //
clickEchars(data = []) { clickEchars(data = []) {
if(!this.btnPrm('btn_brand_datalist')) {
return
}
let qudao = []; let qudao = [];
let startTime = ""; let startTime = "";
let endTime = moment(new Date()).format("YYYY-MM-DD hh:mm:ss"); let endTime = moment(new Date()).format("YYYY-MM-DD hh:mm:ss");
@ -107,8 +110,12 @@ export default {
let obj = Object.assign({}, this.getCtime2, this.form); let obj = Object.assign({}, this.getCtime2, this.form);
obj.iContrastType = 1; obj.iContrastType = 1;
this.btnLoading = true; this.btnLoading = true;
getToPptTask(obj).then(res => { getToPptTask(obj).then(() => {
console.log(res) this.$notification.open({
message: `数据生成中`,
description: '请前往个人中心查看下载进度',
placement: 'bottomRight',
});
this.btnLoading = false; this.btnLoading = false;
}) })
} }

@ -1,7 +1,7 @@
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2021-10-19 19:05:36 * @Date: 2021-10-19 19:05:36
* @LastEditTime: 2021-11-04 16:06:20 * @LastEditTime: 2021-11-16 17:20:04
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: /data-show/src/views/EventDEC/incidentSpreadSituation/index.vue * @FilePath: /data-show/src/views/EventDEC/incidentSpreadSituation/index.vue
@ -9,9 +9,9 @@
<template> <template>
<div class="iss-outter"> <div class="iss-outter">
<v-label-div title="事件传播态势"> <v-label-div title="事件传播态势">
<a-select :default-value="1" :size="$vuiSize" style="width: 120px; margin-left: 40px; margin-right: 8px" v-model="selVal" @change="handleChange"> <a-select v-model="form.sTimeType" :size="$vuiSize" style="width: 7rem; margin-left: 2.2rem; margin-right: 0.5rem" @change="handleChange">
<a-select-option :style="{ color: '#fff' }" v-for="item in selDatas" :value="item.key" :key="item.key"> <a-select-option :style="{ color: '#fff' }" v-for="item in selDatas" :value="item.key" :key="item.key">
{{ item.label }} {{ item.value }}
</a-select-option> </a-select-option>
</a-select> </a-select>
</v-label-div> </v-label-div>
@ -23,7 +23,7 @@
<script> <script>
import createOpt from "./opt"; import createOpt from "./opt";
import { getTwoTime } from "@/api/comm"; import { getOneTime } from "@/api/comm";
import { getSourcetypeTime } from "@/api/EventdEC"; import { getSourcetypeTime } from "@/api/EventdEC";
export default { export default {
name: "incidentSpreadSituation", name: "incidentSpreadSituation",
@ -36,47 +36,33 @@ export default {
}, },
}, },
opt: {}, opt: {},
selVal: 1, selDatas: [],
selDatas: [
{
key: 1,
label: "24小时",
},
{
key: 2,
label: "最近7天",
},
{
key: 3,
label: "最近30天",
},
{
key: 4,
label: "自定义",
},
],
form: { form: {
sBrand: "",
token: "", token: "",
sSeriesName: "" sRele: "",
sTimeType: "",
}, },
}; };
}, },
created() { created() {
this.form.token = this.getToken; this.form.token = this.getToken;
this.brand = this.getBrand.brandname || "奥迪"; this.form.sRele = this.id;
this.form.sSeriesName = this.getModel.name; this.getSelect().then(() => {
this.getDdta(); this.getDdta();
});
}, },
methods: { methods: {
// //
getSelect() { getSelect() {
getTwoTime().then((res) => { return new Promise((resolve, reject) => {
this.selDatas = res.data; getOneTime().then((res) => {
if (!this.form.sTimeType) { this.selDatas = res.data;
this.form.sTimeType = this.selDatas[0].key; this.form.sTimeType = this.selDatas[0].key
this.setCtime2(this.form); resolve(res)
} }).catch(() => {
reject(false)
});
}); });
}, },
getDdta() { getDdta() {
@ -98,10 +84,7 @@ export default {
}, },
// //
handleChange() { handleChange() {
this.setCtime2(this.form); this.getDdta();
if (this.form.sTimeType != 4) {
this.reload();
}
}, },
}, },
}; };

@ -1,13 +1,13 @@
/* /*
* @Author: your name * @Author: your name
* @Date: 2021-10-12 10:11:24 * @Date: 2021-10-12 10:11:24
* @LastEditTime: 2021-11-01 14:25:41 * @LastEditTime: 2021-11-16 17:13:35
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: /data-show/src/views/BrandInsight/titsopo/opt.js * @FilePath: /data-show/src/views/BrandInsight/titsopo/opt.js
*/ */
import * as echarts from "echarts"; import * as echarts from "echarts";
// import { bigNumberTransform } from "@/utils/gol/dataTool" import { bigNumberTransform } from "@/utils/gol/dataTool"
let colors = ['#546fc5', '#91cb74', '#f9c857', '#ed6565', '#72bfde', '#3aa272', '#fb8351']; let colors = ['#546fc5', '#91cb74', '#f9c857', '#ed6565', '#72bfde', '#3aa272', '#fb8351'];
function createData(ds = []) { function createData(ds = []) {
let arr = []; let arr = [];
@ -25,7 +25,7 @@ function createData(ds = []) {
symbol: 'none', symbol: 'none',
areaStyle: { areaStyle: {
normal: { normal: {
opacity: 0.4, opacity: 0.2,
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0, color: colors[j] // 0% 处的颜色 offset: 0, color: colors[j] // 0% 处的颜色
}, { }, {
@ -51,10 +51,10 @@ export default function createOpt(dx=[], ds=[]) {
let data = createData(ds) let data = createData(ds)
return { return {
grid: { grid: {
left: '3%', left: 10,
right: '2%', right: '5%',
bottom: '3%', bottom: 10,
top: '15%', top: 44,
containLabel: true containLabel: true
}, },
tooltip: { tooltip: {
@ -70,10 +70,13 @@ export default function createOpt(dx=[], ds=[]) {
legend: { legend: {
icon: 'roundRect', icon: 'roundRect',
textStyle: { //图例文字的样式 textStyle: { //图例文字的样式
color: '#fff' color: '#fff',
fontSize: 10
}, },
y: 12, y: 12,
x: 16 x: 16,
itemWidth: 12,
itemHeight: 12
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
@ -103,6 +106,12 @@ export default function createOpt(dx=[], ds=[]) {
color: "#fff", color: "#fff",
}, },
}, },
axisLabel: {
formatter: (value) => {
let str = bigNumberTransform(value);
return str;
}
},
splitLine: { splitLine: {
lineStyle: { lineStyle: {
type: "dashed", // y轴分割线类型 type: "dashed", // y轴分割线类型

@ -1,7 +1,7 @@
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2021-10-19 15:57:11 * @Date: 2021-10-19 15:57:11
* @LastEditTime: 2021-10-20 12:02:38 * @LastEditTime: 2021-11-16 17:16:55
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: /data-show/src/views/EventDEC/index.vue * @FilePath: /data-show/src/views/EventDEC/index.vue
@ -14,18 +14,17 @@
<v-btn @click="goback"></v-btn> <v-btn @click="goback"></v-btn>
</v-label-div> </v-label-div>
<div class="edec-d1-dd1"> <div class="edec-d1-dd1">
<div class="d1">{{this.form.sBrand}}</div> <div class="d1">{{eventObj.events_type}}</div>
<div class="d2"> <div class="d2">
<div class="s1">延续哈弗H6设计 哈弗H6S内饰官图发布</div> <div class="s1">{{eventObj.events_title}}</div>
<div class="s2">此前有报道称广汽丰田赛那SIENNA(参数|询价)将于8月29日亮相2021成都车展不过我们从官方获悉到最新消息新车将于8月28日在成都等多城市联合首发亮相并实车现身成都车展按照规划新车有望在2021年下半年正式上市作为丰田旗下的一款MPV车型由广汽丰田进行国产在官方的释义中赛那的名称中指赛过超越意味着霸气尽显强者姿态一览无余则包含了霎那不负片刻快乐以及致远时刻向幸福出发的美好寓意此前有报道称广汽丰田赛那SIENNA(参数|询价)将于8月29日亮相2021成都车</div> <div class="s2">{{eventObj.description}}</div>
</div> </div>
</div> </div>
<div class="edec-d1-dd2"> <div class="edec-d1-dd2">
<div class="d1" style="margin-left: 16px"> <div class="d1" style="margin-left: 16px">
<img class="m1" src="../../assets/images/EventInsight/ic_kssj.png" /> <img class="m1" src="../../assets/images/EventInsight/ic_kssj.png" />
<span class="s1">开始时间</span> <span class="s1">开始时间</span>
<span class="s2">{{Time}}</span> <span class="s2">{{eventObj.source_time}}</span>
<a-pagination v-model="form.iPageIndex" :Time="Time" show-less-items/>
</div> </div>
<div class="d1"> <div class="d1">
<img class="m1" src="../../assets/images/EventInsight/ic_yxl.png" /> <img class="m1" src="../../assets/images/EventInsight/ic_yxl.png" />
@ -35,8 +34,7 @@
<div class="d1"> <div class="d1">
<img class="m1" src="../../assets/images/EventInsight/ic_cbl.png" /> <img class="m1" src="../../assets/images/EventInsight/ic_cbl.png" />
<span class="s1">传播总量</span> <span class="s1">传播总量</span>
<span class="s2">{{total}}</span> <span class="s2">{{eventObj.events_count}}</span>
<a-pagination v-model="form.iPageIndex" :total="total" show-less-items/>
</div> </div>
</div> </div>
</div> </div>
@ -68,12 +66,12 @@ import wbUserEDE from "./wbUserEDE";
import tailAnalysisED from "./tailAnalysisED"; import tailAnalysisED from "./tailAnalysisED";
import kmdED from "./kmdED" import kmdED from "./kmdED"
import pnwcWord from "./pnwcWord" import pnwcWord from "./pnwcWord"
import {getEventData,getList,toExcel,getCountOrEffectOrHot} from '@/api/EventdEC' import {getEventData} from '@/api/EventdEC'
export default { export default {
name: "eventDEC", name: "eventDEC",
components: { components: {
incidentSpreadSituation, // incidentSpreadSituation, //
tonalCommunicationPosture, // tonalCommunicationPosture, //
esprocess, // esprocess, //
mediaInterpretationEc, // - mediaInterpretationEc, // -
mediaInterpretationED, // mediaInterpretationED, //
@ -88,20 +86,24 @@ export default {
total: 0, total: 0,
Time: "", Time: "",
events_id: "", events_id: "",
eventObj: {
events_type: "",
events_title: "",
description: "",
source_time: "",
events_count: 0
},
form: { form: {
sBrand: "", sRele: "",
token: "", token: "",
} }
} }
}, },
created() { created() {
this.form.token = this.getToken; this.form.token = this.getToken;
this.form.sBrand = this.getBrand.brandname || '奥迪';
this.events_id = this.$route.query.events_id || ""; this.events_id = this.$route.query.events_id || "";
this.form.sRele = this.events_id;
this.getDdta(); this.getDdta();
this.getDdta1();
this.getDdta2();
this.getDdta3();
}, },
methods: { methods: {
getDdta(){ getDdta(){
@ -109,36 +111,8 @@ export default {
this.load = true; this.load = true;
getEventData(obj).then(res => { getEventData(obj).then(res => {
let data = res.data || []; let data = res.data || [];
this.data = data; this.eventObj = {...data[0]._source};
this.load = false; console.log(this.eventObj)
})
},
getDdta1(){
let obj = Object.assign({},this.form);
this.load = true;
getList(obj).then(res => {
let data = res.data;
let totalNum = res.totalNum || 0;
this.total = totalNum;
this.data = data;
this.load = false;
})
},
getDdta2(){
let obj = Object.assign({},this.form);
this.load = true;
toExcel(obj).then(res => {
let data = res.data;
this.data = data;
this.load = false;
})
},
getDdta3(){
let obj = Object.assign({},this.form);
this.load = true;
getCountOrEffectOrHot(obj).then(res => {
let data = res.data;
this.data = data;
this.load = false; this.load = false;
}) })
}, },

@ -1,17 +1,17 @@
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2021-10-19 19:35:25 * @Date: 2021-10-19 19:35:25
* @LastEditTime: 2021-11-04 16:04:07 * @LastEditTime: 2021-11-16 17:22:48
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: /data-show/src/views/EventDEC/tonalCommunicationPosture/index.vue * @FilePath: /data-show/src/views/EventDEC/tonalCommunicationPosture/index.vue
--> -->
<template> <template>
<div class="tcp-outter"> <div class="tcp-outter">
<v-label-div title="事件传播态势"> <v-label-div title="调性传播态势">
<a-select :default-value="1" :size="$vuiSize" style="width: 120px; margin-left: 40px; margin-right: 8px" v-model="selVal" @change="handleChange"> <a-select v-model="form.sTimeType" :size="$vuiSize" style="width: 120px; margin-left: 40px; margin-right: 8px" @change="handleChange">
<a-select-option :style="{ color: '#fff' }" v-for="item in selDatas" :value="item.key" :key="item.key"> <a-select-option :style="{ color: '#fff' }" v-for="item in selDatas" :value="item.key" :key="item.key">
{{ item.label }} {{ item.value }}
</a-select-option> </a-select-option>
</a-select> </a-select>
</v-label-div> </v-label-div>
@ -23,7 +23,7 @@
<script> <script>
import createOpt from "./opt" import createOpt from "./opt"
import { getTwoTime } from "@/api/comm"; import { getOneTime } from "@/api/comm";
import { getAffectionsTime } from "@/api/EventdEC"; import { getAffectionsTime } from "@/api/EventdEC";
export default { export default {
name: "tonalCommunicationPosture", name: "tonalCommunicationPosture",
@ -36,47 +36,34 @@ export default {
}, },
}, },
opt: {}, opt: {},
selVal: 1,
selDatas: [ selDatas: [
{
key: 1,
label: "24小时",
},
{
key: 2,
label: "最近7天",
},
{
key: 3,
label: "最近30天",
},
{
key: 4,
label: "自定义",
},
], ],
form: { form: {
sBrand: "",
token: "", token: "",
sSeriesName: "" sRele: "",
sTimeType: "",
}, },
}; };
}, },
created() { created() {
this.form.token = this.getToken; this.form.token = this.getToken;
this.brand = this.getBrand.brandname || "奥迪"; this.form.sRele = this.id;
this.form.sSeriesName = this.getModel.name; this.getSelect().then(() => {
this.getDdta(); this.getDdta();
})
}, },
methods: { methods: {
// //
getSelect() { getSelect() {
getTwoTime().then((res) => { return new Promise((resolve, reject) => {
this.selDatas = res.data; getOneTime().then((res) => {
if (!this.form.sTimeType) { this.selDatas = res.data;
this.form.sTimeType = this.selDatas[0].key; this.form.sTimeType = this.selDatas[0].key
this.setCtime2(this.form); resolve(res)
} }).catch(() => {
reject(false)
});
}); });
}, },
getDdta() { getDdta() {
@ -98,10 +85,7 @@ export default {
}, },
// //
handleChange() { handleChange() {
this.setCtime2(this.form); this.getDdta();
if (this.form.sTimeType != 4) {
this.reload();
}
}, },
}, },
}; };

@ -2,7 +2,7 @@
/* /*
* @Author: your name * @Author: your name
* @Date: 2021-10-09 11:38:06 * @Date: 2021-10-09 11:38:06
* @LastEditTime: 2021-11-01 19:15:48 * @LastEditTime: 2021-11-16 17:25:40
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: /data-show/src/views/Index/barometer/opt.js * @FilePath: /data-show/src/views/Index/barometer/opt.js
@ -29,7 +29,7 @@ function createData(ds = []) {
}, },
areaStyle: { areaStyle: {
normal: { normal: {
opacity: 0.4, opacity: 0.2,
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0, color: colors[j] // 0% 处的颜色 offset: 0, color: colors[j] // 0% 处的颜色
}, { }, {
@ -92,6 +92,7 @@ export default function createOpt(dx = [], ds = []) {
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
boundaryGap: false,
axisTick: { axisTick: {
show: false, show: false,
}, },

@ -1,7 +1,7 @@
/* /*
* @Author: your name * @Author: your name
* @Date: 2021-10-27 15:26:21 * @Date: 2021-10-27 15:26:21
* @LastEditTime: 2021-10-28 10:28:34 * @LastEditTime: 2021-11-16 14:03:35
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: /data-show/src/views/IndustryDataExport/getApiData.js * @FilePath: /data-show/src/views/IndustryDataExport/getApiData.js
@ -167,6 +167,7 @@ export default {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
getToExcelField({sType: sType, token: token}).then(res => { getToExcelField({sType: sType, token: token}).then(res => {
let data = res.data; let data = res.data;
console.log(data)
let arr = []; let arr = [];
data.forEach((ele) => { data.forEach((ele) => {
let obj = { let obj = {

@ -1,7 +1,7 @@
<!-- <!--
* @Author: xw * @Author: xw
* @Date: 2021-10-11 14:11:04 * @Date: 2021-10-11 14:11:04
* @LastEditTime: 2021-10-29 16:16:49 * @LastEditTime: 2021-11-16 13:57:22
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: 行业数据导出 * @Description: 行业数据导出
* @FilePath: /data-show/src/views/IndustryDataExport/index.vue * @FilePath: /data-show/src/views/IndustryDataExport/index.vue
@ -39,7 +39,7 @@
<div class="ide-d2"> <div class="ide-d2">
<span class="s1" v-if="!form.token"><span class="ss1">{{totalNum}}</span>条数据</span> <span class="s1" v-if="!form.token"><span class="ss1">{{totalNum}}</span>条数据</span>
<span class="s1" v-if="form.token"><span class="ss1">{{totalNum}}</span>条数据已选中<span class="ss1">{{secIds.length}}</span>条数据</span> <span class="s1" v-if="form.token"><span class="ss1">{{totalNum}}</span>条数据已选中<span class="ss1">{{secIds.length}}</span>条数据</span>
<a-button type="primary" v-if="form.token" @click="handlerExport"></a-button> <a-button type="primary" v-if="form.token" @click="handlerExport" v-has="btnUrl"></a-button>
</div> </div>
<v-table :row-selection="rowSelection" :columns="columns" :data="tbData" :loading="tableLoading" :pagination="pagination" @change="handlerPage"> <v-table :row-selection="rowSelection" :columns="columns" :data="tbData" :loading="tableLoading" :pagination="pagination" @change="handlerPage">
<template slot="titlex" slot-scope="text, record"> <template slot="titlex" slot-scope="text, record">
@ -174,6 +174,7 @@ export default {
iNum: "", iNum: "",
sField: "", sField: "",
}, },
btnUrl: ""
}; };
}, },
created() { created() {

@ -1,7 +1,7 @@
/* /*
* @Author: your name * @Author: your name
* @Date: 2021-10-27 15:29:37 * @Date: 2021-10-27 15:29:37
* @LastEditTime: 2021-11-11 10:45:41 * @LastEditTime: 2021-11-16 13:55:30
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: /data-show/src/views/IndustryDataExport/tableEvent.js * @FilePath: /data-show/src/views/IndustryDataExport/tableEvent.js
@ -26,6 +26,11 @@ export default {
// 初始化页面 // 初始化页面
initDoc() { initDoc() {
this.title = this.$route.query.title || '行业数据' this.title = this.$route.query.title || '行业数据'
if(this.title === '品牌-行业数据') {
this.btnUrl = 'btn_brand_c_toppt'
} else if(this.title === '车型-行业数据') {
this.btnUrl = 'btn_model_toexcel'
}
Promise.all([ Promise.all([
this.getQuDao(), this.getQuDao(),
this.getQingGan(), this.getQingGan(),

@ -1,7 +1,7 @@
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2021-10-25 11:34:57 * @Date: 2021-10-25 11:34:57
* @LastEditTime: 2021-10-26 10:45:53 * @LastEditTime: 2021-11-16 13:35:42
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: /data-show/src/views/MarketingAnalysis/brandSalesRankingTOP10Ranking/index.vue * @FilePath: /data-show/src/views/MarketingAnalysis/brandSalesRankingTOP10Ranking/index.vue
@ -38,7 +38,7 @@ export default {
// //
getData() { getData() {
this.load = true; this.load = true;
let obj = Object.assign({}, this.getCTime, this.form); let obj = Object.assign({}, this.getCtime, this.form);
getCheZhuBrandMKTCount0528(obj).then((res) => { getCheZhuBrandMKTCount0528(obj).then((res) => {
let data = res.data; let data = res.data;
let dx = []; let dx = [];

@ -1,7 +1,7 @@
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2021-10-25 11:03:30 * @Date: 2021-10-25 11:03:30
* @LastEditTime: 2021-11-03 17:09:42 * @LastEditTime: 2021-11-16 13:35:57
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: /data-show/src/views/MarketingAnalysis/brandVolumeTOP10/index.vue * @FilePath: /data-show/src/views/MarketingAnalysis/brandVolumeTOP10/index.vue
@ -38,7 +38,7 @@ export default {
methods: { methods: {
// //
getData() { getData() {
let obj = Object.assign({}, this.getCTime, this.form); let obj = Object.assign({}, this.getCtime, this.form);
this.load = true; this.load = true;
getBrandSourceType0528(obj).then((res) => { getBrandSourceType0528(obj).then((res) => {
let data = res.data || []; let data = res.data || [];

@ -1,7 +1,7 @@
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2021-10-25 11:21:38 * @Date: 2021-10-25 11:21:38
* @LastEditTime: 2021-10-26 10:29:22 * @LastEditTime: 2021-11-16 13:36:06
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: /data-show/src/views/MarketingAnalysis/keyActiveMediaTOP10Ranking/index.vue * @FilePath: /data-show/src/views/MarketingAnalysis/keyActiveMediaTOP10Ranking/index.vue
@ -39,7 +39,7 @@ export default {
// //
getData() { getData() {
this.load = true; this.load = true;
let obj = Object.assign({}, this.getCTime, this.form); let obj = Object.assign({}, this.getCtime, this.form);
getWebsite(obj).then((res) => { getWebsite(obj).then((res) => {
let data = res.data || []; let data = res.data || [];
let dx = []; let dx = [];

@ -1,118 +1,119 @@
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2021-10-15 15:58:57 * @Date: 2021-10-15 15:58:57
* @LastEditTime: 2021-11-03 15:04:18 * @LastEditTime: 2021-11-16 13:41:08
* @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.data" <vue-scroll>
:key="n" <v-ranking-bcm v-for="(it, n) in item.data" :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 { getSourceCountMKT0528C } from "@/api/MarketingComparison/index.js"; import { getSourceCountMKT0528C } from "@/api/MarketingComparison/index.js";
import vRankingBcm from "./v-ranking-bcm"; import vRankingBcm from "./v-ranking-bcm";
export default { export default {
name: "mcTOPMedia", name: "mcTOPMedia",
components: { components: {
vRankingBcm, vRankingBcm,
}, },
data() { data() {
return { return {
form: { form: {
token: "", token: "",
sJson: "", sJson: "",
load: false load: false,
}, },
colors: [ colors: [
"#3373CC", "#3373CC",
"#63AECC", "#63AECC",
"#54BF93", "#54BF93",
"#CC9D12", "#CC9D12",
"#CC7733", "#CC7733",
"#CC5B41", "#CC5B41",
], ],
arrList: [], arrList: [],
};
},
created() {
this.initData();
},
methods: {
initData() {
this.form.token = this.getToken;
let arr = this.getSComparison;
let sourceData = [];
arr.forEach((ele) => {
let o = {
sBrand: ele.brand,
sSeriesName: ele.model,
sStartTime: ele.startTime,
sEndTime: ele.endTime,
}; };
sourceData.push(o);
});
this.form.sJson = JSON.stringify(sourceData); //json
this.getData();
}, },
getData() { created() {
let obj = Object.assign({}, this.getCtime, this.form); this.initData();
this.load = true; },
getSourceCountMKT0528C(obj).then((res) => { methods: {
let data = res.data || []; initData() {
// this.form.token = this.getToken;
data.forEach((ele) => { let arr = this.getSComparison;
for (let index = 0; index < ele.data.length; index++) { let sourceData = [];
ele.data[index].num = index + 1; arr.forEach((ele) => {
} let o = {
ele.data = ele.data.slice(0,5); sBrand: ele.brand,
}); sSeriesName: ele.model,
this.arrList = data; sStartTime: ele.startTime,
this.load = false; sEndTime: ele.endTime,
}); };
sourceData.push(o);
});
this.form.sJson = JSON.stringify(sourceData); //json
this.getData();
},
getData() {
let obj = Object.assign({}, this.getCtime, this.form);
this.load = true;
getSourceCountMKT0528C(obj).then((res) => {
let data = res.data || [];
//
data.forEach((ele) => {
for (let index = 0; index < ele.data.length; index++) {
ele.data[index].num = index + 1;
}
ele.data = ele.data.slice(0, 5);
});
this.arrList = data;
this.load = 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>

@ -1,7 +1,7 @@
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2021-10-15 15:58:57 * @Date: 2021-10-15 15:58:57
* @LastEditTime: 2021-11-16 11:23:15 * @LastEditTime: 2021-11-16 12:04:29
* @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
@ -87,7 +87,6 @@ export default {
}; };
showData.push(obj); showData.push(obj);
}); });
console.log(showData)
showData.forEach((ele) => { showData.forEach((ele) => {
// //
for ( for (

@ -1,7 +1,7 @@
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2021-10-25 13:20:36 * @Date: 2021-10-25 13:20:36
* @LastEditTime: 2021-11-01 17:34:18 * @LastEditTime: 2021-11-16 15:53:19
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: /data-show/src/views/ModelInsight/ml-brand-data/index.vue * @FilePath: /data-show/src/views/ModelInsight/ml-brand-data/index.vue
@ -24,7 +24,7 @@
<span>{{item.value}}</span> <span>{{item.value}}</span>
</div> </div>
</template> </template>
<span class="s2">{{count}}</span> <span class="s2">{{count|formatMoney(0,'',',')}}</span>
</a-popover> </a-popover>
</div> </div>
</div> </div>

@ -1,7 +1,7 @@
<!-- <!--
* @Author: xw * @Author: xw
* @Date: 2021-10-12 09:32:35 * @Date: 2021-10-12 09:32:35
* @LastEditTime: 2021-11-01 17:35:19 * @LastEditTime: 2021-11-16 14:25:41
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: 舆情传播趋势 * @Description: 舆情传播趋势
* @FilePath: /data-show/src/views/BrandInsight/titsopo/index.vue * @FilePath: /data-show/src/views/BrandInsight/titsopo/index.vue
@ -9,8 +9,8 @@
<template> <template>
<div class="tit-outter" v-loading="load"> <div class="tit-outter" v-loading="load">
<div class="tit-header"> <div class="tit-header">
<a-button type="primary" size="small" @click="goIDE"></a-button> <a-button type="primary" size="small" @click="goIDE" v-has="'btn_model_datalist'"></a-button>
<a-button type="primary" style="margin-left: 16px;margin-right: 16px;" size="small">导出报告</a-button> <a-button type="primary" :loading="btnLoading" style="margin-left: 1rem;margin-right: 1rem;" size="small" v-has="'btn_model_toppt'" @click="exportData"></a-button>
</div> </div>
<div class="tit-inner"> <div class="tit-inner">
<vLabel-div title="舆情传播趋势"></vLabel-div> <vLabel-div title="舆情传播趋势"></vLabel-div>
@ -23,6 +23,7 @@
<script> <script>
import { getSourcetypeTime } from "@/api/ModelInsight"; import { getSourcetypeTime } from "@/api/ModelInsight";
import { getToPptTask } from "@/api/BrandInsight";
import moment from "moment"; import moment from "moment";
import createOpt from "./opt"; import createOpt from "./opt";
export default { export default {
@ -31,6 +32,7 @@ export default {
data() { data() {
return { return {
load: false, load: false,
btnLoading: false,
form: { form: {
sBrand: "", sBrand: "",
sSeriesName: "", sSeriesName: "",
@ -85,20 +87,48 @@ export default {
this.load = false; this.load = false;
}); });
}, },
clickEchars(data = []) { clickEchars(data = []) {
if (!this.btnPrm("btn_model_datalist")) {
return;
}
let qudao = []; let qudao = [];
let startTime = ""; let startTime = "";
let endTime = moment(new Date()).format('YYYY-MM-DD hh:mm:ss'); let endTime = moment(new Date()).format("YYYY-MM-DD hh:mm:ss");
data.forEach(ele => { data.forEach((ele) => {
let seriesName = ele.seriesName; let seriesName = ele.seriesName;
startTime = ele.name; startTime = ele.name;
qudao.push(seriesName); qudao.push(seriesName);
}) });
let sTimeType = 4; let sTimeType = 4;
this.$router.push({ this.$router.push({
path: "/industryDataExport", path: "/industryDataExport",
query: { startTime, endTime, qudao, sTimeType, token: this.getToken, action: 'getList', sType: 'BrandData', brand: this.form.sBrand, seriesName: this.form.sSeriesName, title: "车型-行业数据" }, query: {
startTime,
endTime,
qudao,
sTimeType,
token: this.getToken,
action: "getList",
sType: "BrandData",
brand: this.form.sBrand,
seriesName: this.form.sSeriesName,
title: "车型-行业数据",
},
}); });
},
//
exportData() {
let obj = Object.assign({}, this.getCtime2, this.form);
obj.iContrastType = 2;
this.btnLoading = true;
getToPptTask(obj).then(() => {
this.$notification.open({
message: `数据生成中`,
description: '请前往个人中心查看下载进度',
placement: 'bottomRight',
});
this.btnLoading = false;
})
} }
}, },
}; };

@ -1,7 +1,7 @@
<!-- <!--
* @Author: xw * @Author: xw
* @Date: 2021-10-12 11:06:58 * @Date: 2021-10-12 11:06:58
* @LastEditTime: 2021-11-12 18:01:54 * @LastEditTime: 2021-11-16 15:48:12
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: 热门事件 * @Description: 热门事件
* @FilePath: /data-show/src/views/BrandInsight/popularEvents/index.vue * @FilePath: /data-show/src/views/BrandInsight/popularEvents/index.vue
@ -58,11 +58,11 @@ export default {
Object.keys(type).forEach((ele) => { Object.keys(type).forEach((ele) => {
obj[ele] = []; obj[ele] = [];
}); });
this.sortDataArr(arr)
let dx = []
arr.forEach((ele) => { arr.forEach((ele) => {
let m1 = moment(ele.maxSourcetime).format('HH:mm'); let m1 = moment(ele.maxSourcetime).format('HH:mm');
// let m2 = moment(ele.maxSourcetime); dx.push(m1)
// let duration = m2.diff(m1, "hours");
// let str= moment.utc(time).format('HH:mm')
let a = [ let a = [
m1, m1,
ele.events_count * 1, ele.events_count * 1,
@ -75,9 +75,30 @@ export default {
]; ];
obj[ele.events_type].push(a); obj[ele.events_type].push(a);
}); });
this.opt = createOpt(obj); this.opt = createOpt(dx, obj);
this.load = false; this.load = false;
}) })
},
//
sortDataArr(arr) {
for(let i=0; i < arr.length; i++) {
for(let j = i+1; j < arr.length; j++) {
let t1 = moment(arr[i].maxSourcetime).format('HH:mm');
let t2 = moment(arr[j].maxSourcetime).format('HH:mm');
let a = t1.split(":");
let x1 = a[0]*60 + a[1]*1;
let b = t2.split(":");
let x2 = b[0]*60 + b[1]*1;
let diff = x2 - x1;
if(diff < 0) {
let ele1 = arr[i];
let ele2 = arr[j];
let ele3 = ele1;
arr[i] = ele2;
arr[j] = ele3;
}
}
}
} }
} }
} }

@ -1,7 +1,7 @@
/* /*
* @Author: your name * @Author: your name
* @Date: 2021-10-12 11:16:44 * @Date: 2021-10-12 11:16:44
* @LastEditTime: 2021-11-12 18:01:26 * @LastEditTime: 2021-11-16 15:49:47
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: /data-show/src/views/BrandInsight/popularEvents/opt.js * @FilePath: /data-show/src/views/BrandInsight/popularEvents/opt.js
@ -18,14 +18,14 @@ function createData(obj = {}) {
data: obj[key], data: obj[key],
type: 'scatter', type: 'scatter',
symbolSize: function (data) { symbolSize: function (data) {
return data[2] return data[2] / 1.2
} }
} }
arr.push(o) arr.push(o)
} }
return arr return arr
} }
export default function createOpt(ds = {}) { export default function createOpt(dx = [], ds = {}) {
const data = createData(ds) const data = createData(ds)
return { return {
title: { title: {
@ -37,8 +37,11 @@ export default function createOpt(ds = {}) {
x: 16, x: 16,
icon: 'roundRect', icon: 'roundRect',
textStyle: { //图例文字的样式 textStyle: { //图例文字的样式
color: '#fff' color: '#fff',
} fontSize: 10
},
itemWidth: 12,
itemHeight: 12
}, },
grid: { grid: {
left: 16, left: 16,
@ -76,7 +79,7 @@ export default function createOpt(ds = {}) {
splitLine: { splitLine: {
show: false show: false
}, },
// data: ['00:00', '04:00', '08:00', '12:00', '16:00', '20:00', '24:00'], data: dx,
axisLabel : { axisLabel : {
// formatter: (value) => { // formatter: (value) => {

Loading…
Cancel
Save