From 28ceafd3aa7f113e8991a1ef5f44cde8d6122544 Mon Sep 17 00:00:00 2001 From: liuyongli <1598631486@qq.com> Date: Mon, 15 Nov 2021 13:28:39 +0800 Subject: [PATCH] =?UTF-8?q?lyl=E4=BA=8B=E4=BB=B6=E6=B4=9E=E5=AF=9F?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E4=BA=8B=E4=BB=B6=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/EventdEC/index.js | 207 ++++++++++++ src/views/EventDEC/esprocess/index.vue | 41 ++- .../incidentSpreadSituation/index.vue | 64 +++- .../EventDEC/incidentSpreadSituation/opt.js | 138 ++++---- src/views/EventDEC/index.vue | 88 ++++- src/views/EventDEC/kmdED/index.vue | 80 +++-- .../EventDEC/mediaInterpretationED/index.vue | 105 ++++-- .../EventDEC/mediaInterpretationED/opt.js | 39 ++- .../EventDEC/mediaInterpretationEc/index.vue | 116 +++++-- .../EventDEC/mediaInterpretationEc/opt.js | 304 +++++++----------- src/views/EventDEC/pnwcWord/index.vue | 61 +++- src/views/EventDEC/pnwcWord/opt.js | 304 +++++++----------- src/views/EventDEC/tailAnalysisED/index.vue | 51 ++- src/views/EventDEC/tailAnalysisED/opt.js | 138 ++++---- .../tonalCommunicationPosture/index.vue | 58 +++- .../EventDEC/tonalCommunicationPosture/opt.js | 133 +++++--- src/views/EventDEC/wbUserEDE/index.vue | 55 +++- src/views/EventDEC/wbUserEDE/opt.js | 178 +++++----- 18 files changed, 1333 insertions(+), 827 deletions(-) create mode 100644 src/api/EventdEC/index.js diff --git a/src/api/EventdEC/index.js b/src/api/EventdEC/index.js new file mode 100644 index 0000000..75116f8 --- /dev/null +++ b/src/api/EventdEC/index.js @@ -0,0 +1,207 @@ +import httpService from "@/request" +// 事件详情-信息 +export function getEventData(params) { + let obj = Object.assign({action: 'getEventData'}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} +// 单个事件数据-进入数据列表页 +export function getList(params) { + let obj = Object.assign({action: 'getList', sType: 'BrandDataHot'}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} +// 单个事件数据列表导出 +export function toExcel(params) { + let obj = Object.assign({action: 'toExcel', sType: 'BrandData'}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} +// 事件影响力-事件影响力 +export function getCountOrEffectOrHot(params) { + let obj = Object.assign({action: 'getCountOrEffectOrHot', sType: 'HotEvent'}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} +// 传播态势-传播态势 +export function getSourcetypeTime(params) { + let obj = Object.assign({action: 'getSourcetypeTime', sType: 'HotEvent'}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} +// 调性分布趋势-调性分布趋势 +export function getAffectionsTime(params) { + let obj = Object.assign({action: 'getAffectionsTime', sType: 'HotEvent'}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} +// 事件传播历程-事件传播历程 +export function getEventSpreadProcess0528(params) { + let obj = Object.assign({action: 'getEventSpreadProcess0528', sType: 'HotEvent'}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} +// 媒体解读-列表 +export function getSource(params) { + let obj = Object.assign({action: 'getSource', sType: 'HotEvent'}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} + +// 媒体解读-热门词云 +export function getHotWord(params) { + let obj = Object.assign({action: 'getHotWord', sType: 'HotEvent'}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} +//媒体解读-正面词云 +export function getPositive(params) { + let obj = Object.assign({action: 'getPositive', sType: 'HotEvent'}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} +// 媒体解读-负面词云 +export function getNegative(params) { + let obj = Object.assign({action: 'getNegative', sType: 'HotEvent'}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} +// 传播途径-传播途径 +export function getDiffuseZhuTi(params) { + let obj = Object.assign({action: 'getDiffuseZhuTi', sType: 'BrandWeiBo'}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} +// 微博调性分布-微博调性分布 +export function getAffections(params) { + let obj = Object.assign({action: 'getAffections', sType: 'BrandWeiBo'}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} +// 尾翼分析-传播态势 +export function getSourcetypeTime1(params) { + let obj = Object.assign({action: 'getSourcetypeTime', sType: 'BrandWeiYi'}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} +// 尾翼分析-重点媒体分布 +export function getWebsite(params) { + let obj = Object.assign({action: 'getWebsite', sType: 'BrandWeiYi'}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} +// 尾翼分析-正面词云 +// export function getPositive(params) { +// let obj = Object.assign({action: 'getPositive', sType: 'BrandWeiYi'}, params) +// return httpService({ +// url: `/api/v6.ashx`, +// method: 'post', +// data: obj, +// headers: { +// 'content-type': 'application/x-www-form-urlencoded' +// } +// }) +// } +// 尾翼分析-负面词云 +// export function getNegative(params) { +// let obj = Object.assign({action: 'getNegative', sType: 'BrandWeiYi'}, params) +// return httpService({ +// url: `/api/v6.ashx`, +// method: 'post', +// data: obj, +// headers: { +// 'content-type': 'application/x-www-form-urlencoded' +// } +// }) +// } + diff --git a/src/views/EventDEC/esprocess/index.vue b/src/views/EventDEC/esprocess/index.vue index fd0ae03..f5e80eb 100644 --- a/src/views/EventDEC/esprocess/index.vue +++ b/src/views/EventDEC/esprocess/index.vue @@ -10,7 +10,7 @@
-
+
@@ -99,14 +99,45 @@ diff --git a/src/views/EventDEC/incidentSpreadSituation/index.vue b/src/views/EventDEC/incidentSpreadSituation/index.vue index db8f48e..b3404b3 100644 --- a/src/views/EventDEC/incidentSpreadSituation/index.vue +++ b/src/views/EventDEC/incidentSpreadSituation/index.vue @@ -22,12 +22,20 @@ diff --git a/src/views/EventDEC/incidentSpreadSituation/opt.js b/src/views/EventDEC/incidentSpreadSituation/opt.js index d9eea98..af8cf40 100644 --- a/src/views/EventDEC/incidentSpreadSituation/opt.js +++ b/src/views/EventDEC/incidentSpreadSituation/opt.js @@ -1,18 +1,60 @@ /* * @Author: your name * @Date: 2021-10-12 10:11:24 - * @LastEditTime: 2021-10-19 19:34:14 + * @LastEditTime: 2021-11-01 14:25:41 * @LastEditors: Please set LastEditors * @Description: In User Settings Edit * @FilePath: /data-show/src/views/BrandInsight/titsopo/opt.js */ -export default function createOpt() { +import * as echarts from "echarts"; +// import { bigNumberTransform } from "@/utils/gol/dataTool" +let colors = ['#546fc5', '#91cb74', '#f9c857', '#ed6565', '#72bfde', '#3aa272', '#fb8351']; +function createData(ds = []) { + let arr = []; + for (let i = 0; i < ds.length; i++) { + let arr1 = ds[i]; + for (let j = 0; j < arr1.length; j++) { + let n = arr.findIndex(ele => { + return ele.name === arr1[j].key; + }) + if (n === -1) { + let obj = + { + name: arr1[j].key, + type: 'line', + symbol: 'none', + areaStyle: { + normal: { + opacity: 0.4, + color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ + offset: 0, color: colors[j] // 0% 处的颜色 + }, { + offset: 1, color: '#000' // 100% 处的颜色 + }] + ), + } + }, + emphasis: { + focus: 'series' + }, + data: [arr1[j].value] + } + arr.push(obj) + } else { + arr[n].data.push(arr1[j].value) + } + } + } + return arr; +} +export default function createOpt(dx=[], ds=[]) { + let data = createData(ds) return { grid: { - left: 16, - right: 26, - bottom: 16, - top: 52, + left: '3%', + right: '2%', + bottom: '3%', + top: '15%', containLabel: true }, tooltip: { @@ -45,7 +87,13 @@ export default function createOpt() { color: "#fff", }, }, - data: ['00:00', '04:00', '08:00', '12:00', '16:00', '20:00', '24:00'] + axisLabel: { + formatter: (value) => { + let str = value.substring(10, 16) + return str; + } + }, + data: dx }, yAxis: { type: 'value', @@ -62,80 +110,6 @@ export default function createOpt() { }, }, }, - series: [ - { - name: '新闻', - type: 'line', - symbol: 'none', - areaStyle: { - opacity: 0.4 - }, - emphasis: { - focus: 'series' - }, - data: [2000, 1600, 1000, 2200, 2300, 2100, 1900] - }, - { - name: '微信', - type: 'line', - symbol: 'none', - areaStyle: { - opacity: 0.4 - }, - emphasis: { - focus: 'series' - }, - data: [1000, 1100, 1300, 2000, 1800, 2100, 1600] - }, - { - name: '论坛', - type: 'line', - symbol: 'none', - areaStyle: { - opacity: 0.4 - }, - emphasis: { - focus: 'series' - }, - data: [1200, 1200, 1400, 2100, 1400, 1900, 2000] - }, - { - name: '微博', - type: 'line', - symbol: 'none', - areaStyle: { - opacity: 0.4 - }, - emphasis: { - focus: 'series' - }, - data: [1200, 1200, 1350, 1550, 1750, 1900, 2000] - }, - { - name: 'APP', - type: 'line', - symbol: 'none', - areaStyle: { - opacity: 0.4 - }, - emphasis: { - focus: 'series' - }, - data: [1260, 1280, 1390, 1570, 1790, 1950, 2020] - }, - { - name: '其他', - type: 'line', - symbol: 'none', - areaStyle: { - opacity: 0.4 - }, - emphasis: { - focus: 'series' - }, - data: [1260, 1280, 1390, 1570, 1790, 1950, 2020] - }, - - ] + series: data } } diff --git a/src/views/EventDEC/index.vue b/src/views/EventDEC/index.vue index 753ef79..001a3d2 100644 --- a/src/views/EventDEC/index.vue +++ b/src/views/EventDEC/index.vue @@ -14,7 +14,7 @@ 返回
-
新车上市
+
{{this.form.sBrand}}
延续哈弗H6设计 哈弗H6S内饰官图发布
此前,有报道称,广汽丰田赛那SIENNA(参数|询价)将于8月29日亮相2021成都车展。不过我们从官方获悉到最新消息,新车将于8月28日在成都等多城市联合首发亮相,并实车现身成都车展。按照规划,新车有望在2021年下半年正式上市。作为丰田旗下的一款MPV车型,由广汽丰田进行国产。在官方的释义中,“赛那”的名称中,“赛”指赛过,超越,意味着霸气尽显,强者姿态一览无余;“那”则包含了“霎那”不负片刻快乐,以及“致远”时刻向幸福出发的美好寓意。此前,有报道称,广汽丰田赛那SIENNA(参数|询价)将于8月29日亮相2021成都车…
@@ -24,7 +24,8 @@
开始时间: - 2021-08-01 00:59:18 + {{Time}} +
@@ -34,23 +35,24 @@
传播总量: - 3467 + {{total}} +
- - - - - - + + + + + +
- +
- - + +
@@ -66,6 +68,7 @@ import wbUserEDE from "./wbUserEDE"; import tailAnalysisED from "./tailAnalysisED"; import kmdED from "./kmdED" import pnwcWord from "./pnwcWord" +import {getEventData,getList,toExcel,getCountOrEffectOrHot} from '@/api/EventdEC' export default { name: "eventDEC", components: { @@ -79,7 +82,66 @@ export default { kmdED, // 重点媒体分布 pnwcWord // 正负词云 }, + data() { + return { + gValue: 0, + total: 0, + Time: "", + events_id: "", + form: { + sBrand: "", + token: "", + } + } + }, + created() { + this.form.token = this.getToken; + this.form.sBrand = this.getBrand.brandname || '奥迪'; + this.events_id = this.$route.query.events_id || ""; + this.getDdta(); + this.getDdta1(); + this.getDdta2(); + this.getDdta3(); + }, methods: { + getDdta(){ + let obj = Object.assign({},this.form); + this.load = true; + getEventData(obj).then(res => { + let data = res.data || []; + this.data = data; + this.load = false; + }) + }, + 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; + }) + }, goback() { this.$router.go(-1); }, @@ -170,4 +232,4 @@ export default { justify-content: flex-start; } } - + \ No newline at end of file diff --git a/src/views/EventDEC/kmdED/index.vue b/src/views/EventDEC/kmdED/index.vue index f544fec..1e16fd2 100644 --- a/src/views/EventDEC/kmdED/index.vue +++ b/src/views/EventDEC/kmdED/index.vue @@ -9,34 +9,74 @@