From 7c84faf45727994e3089742b49c3852aa176bc09 Mon Sep 17 00:00:00 2001 From: zx <604444282@qq.com> Date: Tue, 9 Nov 2021 17:37:37 +0800 Subject: [PATCH 1/7] =?UTF-8?q?zx-=E5=93=81=E7=89=8C=E5=AF=B9=E6=AF=94-?= =?UTF-8?q?=E8=87=B3=E5=BE=AE=E5=8D=9A=E5=86=85=E5=AE=B9=E6=96=B9=E5=90=91?= =?UTF-8?q?=E5=AF=B9=E6=AF=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/BrandComparison/BrandWeibo.js | 79 +++++ src/api/BrandComparison/HotEvent.js | 27 ++ src/api/BrandComparison/index.js | 44 ++- src/mixins/index.js | 1 - src/utils/gol/bubbleWord.js | 32 +- .../brandCommunicationTOPMedia/index.vue | 308 +++++----------- .../brandEventComparison/index.vue | 245 +++++++++---- .../brandEventComparison/opt.js | 93 ++--- .../channelDistribution/index.vue | 4 +- .../index.vue | 82 ++++- .../comparisonOfWeiboInformation/index.vue | 82 ++++- .../keyMediaCommunicationComparison/index.vue | 67 ++-- .../overallWordCloudComparison/index.vue | 155 +++++--- .../userAreaDistribution/index.vue | 113 ++++-- .../weiboBigVComparison/index.vue | 76 +++- .../weiboBigVComparison/opt.js | 186 +++++----- .../weiboContentDirectionComparison/index.vue | 332 ++++++------------ .../weiboTuneComparison/index.vue | 159 ++++++--- .../weiboTuneComparison/wbRoundata/index.vue | 14 +- .../weiboTuneComparison/wbRoundata/opt.js | 175 ++++----- 20 files changed, 1255 insertions(+), 1019 deletions(-) create mode 100644 src/api/BrandComparison/BrandWeibo.js create mode 100644 src/api/BrandComparison/HotEvent.js diff --git a/src/api/BrandComparison/BrandWeibo.js b/src/api/BrandComparison/BrandWeibo.js new file mode 100644 index 0000000..bb8a285 --- /dev/null +++ b/src/api/BrandComparison/BrandWeibo.js @@ -0,0 +1,79 @@ +import httpService from "@/request" + +// 品牌对比-微博信息量对比 +export function getContrastCount0528C(params) { + let obj = Object.assign({action: 'getContrastCount0528C', sType: 'BrandWeiBo', iContrastType: 1}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} + +// 品牌对比-微博互动人数对比 +export function getInteractCount0528C(params) { + let obj = Object.assign({action: 'getInteractCount0528C', sType: 'BrandWeiBo', iContrastType: 1}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} + +// 品牌对比-微博大V对比 +export function getBoauthen0528C(params) { + let obj = Object.assign({action: 'getBoauthen0528C', sType: 'BrandWeiBo', iContrastType: 1}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} + +// 品牌对比-微博调性对比 +export function getAffectionsC(params) { + let obj = Object.assign({action: 'getAffectionsC', sType: 'BrandWeiBo', iContrastType: 1}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} + +// 品牌对比-微博内容方向 +export function getDirect0528C(params) { + let obj = Object.assign({action: 'getDirect0528C', sType: 'BrandWeiBo', iContrastType: 1}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} + +// 品牌对比-用户区域分布 +export function getRegionWeiBoC(params) { + let obj = Object.assign({action: 'getRegionWeiBoC', sType: 'BrandWeiBo', iContrastType: 1}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} \ No newline at end of file diff --git a/src/api/BrandComparison/HotEvent.js b/src/api/BrandComparison/HotEvent.js new file mode 100644 index 0000000..3e6c629 --- /dev/null +++ b/src/api/BrandComparison/HotEvent.js @@ -0,0 +1,27 @@ +import httpService from "@/request" + +// 品牌对比-品牌事件对比 +export function getSourcetypeC(params) { + let obj = Object.assign({action: 'getSourcetypeC', sType: 'HotEvent0528', iContrastType: 1}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} + +// 品牌对比-事件上榜车型 +export function getContrastCount0528C(params) { + let obj = Object.assign({action: 'getContrastCount0528C', sType: 'HotEvent0528', iContrastType: 1}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} \ No newline at end of file diff --git a/src/api/BrandComparison/index.js b/src/api/BrandComparison/index.js index 4c5d601..26ece9a 100644 --- a/src/api/BrandComparison/index.js +++ b/src/api/BrandComparison/index.js @@ -54,7 +54,7 @@ export function getInteractCount0528C(params) { // 品牌对比-渠道分布 export function getSourcetypeC(params) { - let obj = Object.assign({action: 'getSourcetypeC', sType: 'BrandOverview', iContrastType: 1}, params) + let obj = Object.assign({action: 'getSourcetypeC', iContrastType: 1}, params) return httpService({ url: `/api/v6.ashx`, method: 'post', @@ -63,4 +63,44 @@ export function getSourcetypeC(params) { 'content-type': 'application/x-www-form-urlencoded' } }) -} \ No newline at end of file +} + +// 品牌对比-重点媒体传播对比 +export function getSourceCount0528C(params) { + let obj = Object.assign({action: 'getSourceCount0528C', sType: 'BrandOverview', iContrastType: 1}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} + +// 品牌对比-品牌传播top媒体 +export function getSourceTopCount0528C(params) { + let obj = Object.assign({action: 'getSourceTopCount0528C', sType: 'BrandOverview', iContrastType: 1}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} + +// 品牌对比-整体词云对比 +export function getPositiveAndNegative0528C(params) { + let obj = Object.assign({action: 'getPositiveAndNegative0528C', sType: 'BrandOverview', iContrastType: 1}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} + diff --git a/src/mixins/index.js b/src/mixins/index.js index c8d2f74..0542793 100644 --- a/src/mixins/index.js +++ b/src/mixins/index.js @@ -9,7 +9,6 @@ import { mapGetters, mapActions } from "vuex"; import Loading from './loading' function detectZoom (){ - console.log(2222) let ratio = 0, screen = window.screen, ua = navigator.userAgent.toLowerCase(); diff --git a/src/utils/gol/bubbleWord.js b/src/utils/gol/bubbleWord.js index b9a927f..4fa56fa 100644 --- a/src/utils/gol/bubbleWord.js +++ b/src/utils/gol/bubbleWord.js @@ -6,12 +6,12 @@ * @Description: In User Settings Edit * @FilePath: /data-show/src/utils/gol/bubbleWord.js */ -import {compare} from "./dataTool" - // 将后台数据转成数组 +import { compare } from "./dataTool" +// 将后台数据转成数组 function doWordCloud(data) { let arr1 = []; for (let key in data) { - let obj = { name: key, value: data[key] }; + let obj = { key: key, value: data[key] }; arr1.push(obj); } return arr1; @@ -93,12 +93,17 @@ function bubbleChart(data = [], format = []) { // 创建词云图 export default function createWordCloud(obj) { - let words = doWordCloud(obj); - words.sort(compare('value')); - let bubble = bubbleChart(words, ['name', 'value']); + let bubble = null; + if (Array.isArray(obj)) { + bubble = bubbleChart(obj, ['key', 'value']); + } else { + let words = doWordCloud(obj); + words.sort(compare('value')); + bubble = bubbleChart(words, ['key', 'value']); + } return { animationEasingUpdate: 'bounceIn', - tooltip: { + tooltip: { backgroundColor: "#08182F", color: "#fff", borderColor: "#3373CC", @@ -106,8 +111,9 @@ export default function createWordCloud(obj) { color: "#fff", //设置文字颜色 }, extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;", - formatter: function(param) { + formatter: function (param) { let data = param.data; + console.log(data) return `${data.name}
${data.value}` } }, @@ -115,13 +121,13 @@ export default function createWordCloud(obj) { type: 'graph', layout: 'force', label: { - show:true, - color:"#FFF", - fontSize:12, - + show: true, + color: "#FFF", + fontSize: 12, + }, force: { - gravity:0.2, + gravity: 0.2, repulsion: bubble.repulsion, edgeLength: 10 }, diff --git a/src/views/BrandComparison/brandCommunicationTOPMedia/index.vue b/src/views/BrandComparison/brandCommunicationTOPMedia/index.vue index 7b0710c..422d204 100644 --- a/src/views/BrandComparison/brandCommunicationTOPMedia/index.vue +++ b/src/views/BrandComparison/brandCommunicationTOPMedia/index.vue @@ -7,236 +7,108 @@ * @FilePath: /data-show/src/views/BrandComparison/brandCommunicationTOPMedia/index.vue --> diff --git a/src/views/BrandComparison/brandEventComparison/index.vue b/src/views/BrandComparison/brandEventComparison/index.vue index 3006677..4b5423b 100644 --- a/src/views/BrandComparison/brandEventComparison/index.vue +++ b/src/views/BrandComparison/brandEventComparison/index.vue @@ -7,96 +7,185 @@ * @FilePath: /data-show/src/views/BrandComparison/brandEventComparison/index.vue --> diff --git a/src/views/BrandComparison/brandEventComparison/opt.js b/src/views/BrandComparison/brandEventComparison/opt.js index 949390c..c743ed9 100644 --- a/src/views/BrandComparison/brandEventComparison/opt.js +++ b/src/views/BrandComparison/brandEventComparison/opt.js @@ -6,7 +6,38 @@ * @Description: In User Settings Edit * @FilePath: /data-show/src/views/BrandComparison/channelDistribution/opt.js */ -export default function createOpt() { + +/*series: [ + { + name: '奥迪', + type: 'bar', + barGap: 0, + barWidth: 20, + emphasis: { + focus: 'series' + }, + data: [320, 332, 301, 334, 390, 400] + },*/ +function createData(dataList = []) { + let arr = []; + dataList.forEach(ele => { + let o = { + name: ele.Name, + type: 'bar', + barGap: 0, + barWidth: 20, + emphasis: { + focus: 'series' + }, + data: [ele.Data.新闻,ele.Data.论坛,ele.Data.微信,ele.Data.APP,ele.Data.微博,ele.Data.其他] + }; + arr.push(o) + }) + return arr; +} + +export default function createOpt(dataList = [], brandList = []) { + let info = createData(dataList); return { grid: { top: "56px", @@ -16,7 +47,7 @@ export default function createOpt() { containLabel: true, }, legend: { - data: ['奥迪', '宝马', '奔驰', '吉利', '大众', '别克'], + data: brandList, textStyle: { //图例文字的样式 color: '#fff' }, @@ -65,62 +96,6 @@ export default function createOpt() { }, } ], - series: [ - { - name: '奥迪', - type: 'bar', - barGap: 0, - barWidth: 20, - emphasis: { - focus: 'series' - }, - data: [320, 332, 301, 334, 390, 400] - }, - { - name: '宝马', - type: 'bar', - barWidth: 20, - emphasis: { - focus: 'series' - }, - data: [220, 182, 191, 234, 290, 300] - }, - { - name: '奔驰', - type: 'bar', - barWidth: 20, - emphasis: { - focus: 'series' - }, - data: [150, 232, 201, 154, 190, 200] - }, - { - name: '吉利', - type: 'bar', - barWidth: 20, - emphasis: { - focus: 'series' - }, - data: [98, 77, 101, 99, 40, 44] - }, - { - name: '大众', - type: 'bar', - barWidth: 20, - emphasis: { - focus: 'series' - }, - data: [198, 177, 101, 199, 140, 145] - }, - { - name: '别克', - type: 'bar', - barWidth: 20, - emphasis: { - focus: 'series' - }, - data: [298, 277, 201, 299, 240, 250] - } - ] + series: info } } \ No newline at end of file diff --git a/src/views/BrandComparison/channelDistribution/index.vue b/src/views/BrandComparison/channelDistribution/index.vue index d058c53..420281c 100644 --- a/src/views/BrandComparison/channelDistribution/index.vue +++ b/src/views/BrandComparison/channelDistribution/index.vue @@ -16,7 +16,7 @@ diff --git a/src/views/BrandComparison/comparisonOfWeiboInformation/index.vue b/src/views/BrandComparison/comparisonOfWeiboInformation/index.vue index 81b5813..6c56a71 100644 --- a/src/views/BrandComparison/comparisonOfWeiboInformation/index.vue +++ b/src/views/BrandComparison/comparisonOfWeiboInformation/index.vue @@ -7,33 +7,77 @@ * @FilePath: /data-show/src/views/BrandComparison/comparisonOfWeiboInformation/index.vue --> diff --git a/src/views/BrandComparison/keyMediaCommunicationComparison/index.vue b/src/views/BrandComparison/keyMediaCommunicationComparison/index.vue index 94db68f..426e390 100644 --- a/src/views/BrandComparison/keyMediaCommunicationComparison/index.vue +++ b/src/views/BrandComparison/keyMediaCommunicationComparison/index.vue @@ -7,36 +7,61 @@ * @FilePath: /data-show/src/views/BrandComparison/keyMediaCommunicationComparison/index.vue --> diff --git a/src/views/BrandComparison/overallWordCloudComparison/index.vue b/src/views/BrandComparison/overallWordCloudComparison/index.vue index d96ff8f..e843743 100644 --- a/src/views/BrandComparison/overallWordCloudComparison/index.vue +++ b/src/views/BrandComparison/overallWordCloudComparison/index.vue @@ -7,75 +7,124 @@ * @FilePath: /data-show/src/views/BrandComparison/overallWordCloudComparison/index.vue --> diff --git a/src/views/BrandComparison/userAreaDistribution/index.vue b/src/views/BrandComparison/userAreaDistribution/index.vue index 6e7256c..a5c7ca1 100644 --- a/src/views/BrandComparison/userAreaDistribution/index.vue +++ b/src/views/BrandComparison/userAreaDistribution/index.vue @@ -7,53 +7,92 @@ * @FilePath: /data-show/src/views/WeiboDetails/weiboUserActiveArea/index.vue --> diff --git a/src/views/BrandComparison/weiboBigVComparison/index.vue b/src/views/BrandComparison/weiboBigVComparison/index.vue index 139ed2f..f16b1f6 100644 --- a/src/views/BrandComparison/weiboBigVComparison/index.vue +++ b/src/views/BrandComparison/weiboBigVComparison/index.vue @@ -7,32 +7,70 @@ * @FilePath: /data-show/src/views/BrandComparison/weiboBigVComparison/index.vue --> diff --git a/src/views/BrandComparison/weiboBigVComparison/opt.js b/src/views/BrandComparison/weiboBigVComparison/opt.js index aa29fd1..73914a7 100644 --- a/src/views/BrandComparison/weiboBigVComparison/opt.js +++ b/src/views/BrandComparison/weiboBigVComparison/opt.js @@ -6,61 +6,8 @@ * @Description: In User Settings Edit * @FilePath: /data-show/src/views/Index/spreadTheSound/opt.js */ -export default function createOpt() { - return { - grid: { - left: 16, - right: 16, - bottom: 16, - top: 56, - containLabel: true - }, - tooltip: { - trigger: "axis", - backgroundColor: "#08182F", - color: "#fff", - borderColor: "#3373CC", - textStyle: { - color: "#fff", //设置文字颜色 - }, - extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;" - }, - legend: { - textStyle: { //图例文字的样式 - color: '#fff' - }, - y: 10, - x: 16 - }, - xAxis: { - type: 'category', - axisTick: { - show: false, - }, - axisLine: { - show: false, - lineStyle: { - color: "#fff", - }, - }, - data: ['名人', '媒体', '企业', '政府', '个人大v'] - }, - yAxis: { - type: 'value', - axisLine: { - show: false, - lineStyle: { - color: "#fff", - }, - }, - splitLine: { - lineStyle: { - type: "dashed", // y轴分割线类型 - color: "#012b4b", - }, - }, - }, - series: [ +/* +series: [ { name: '奥迪', type: 'bar', @@ -71,57 +18,82 @@ export default function createOpt() { }, data: [320, 302, 301, 334, 390] }, - { - name: '宝马', - type: 'bar', - stack: 'total', - barWidth: 24, - emphasis: { - focus: 'series' - }, - data: [120, 132, 101, 134, 90] - }, - { - name: '奔驰', - type: 'bar', - stack: 'total', - barWidth: 24, - emphasis: { - focus: 'series' - }, - data: [220, 182, 191, 234, 290] - }, - { - name: '吉利', - type: 'bar', - stack: 'total', - barWidth: 24, - emphasis: { - focus: 'series' - }, - data: [150, 212, 201, 154, 190] - }, - { - name: '大众', - type: 'bar', - stack: 'total', - barWidth: 24, - emphasis: { - focus: 'series' - }, - data: [820, 832, 901, 934, 1290] - }, - { - name: '别克', - type: 'bar', - stack: 'total', - barWidth: 24, - emphasis: { - focus: 'series' - }, - data: [820, 832, 901, 934, 1290] - } - ] - } +*/ +function createData(dataList = []) { + let arr = []; + dataList.forEach(ele => { + let o = { + name: ele.key, + type: 'bar', + stack: 'total', + barWidth: 24, + emphasis: { + focus: 'series' + }, + //索引各类型大v的值,0表示名人,1表示政府,2表示企业,3表示媒体,4表示个人大V + data: [ele.value[0].value, ele.value[3].value, ele.value[2].value, ele.value[1].value, ele.value[4].value] + }; + arr.push(o); + }) + return arr; +} + +export default function createOpt(dataList = []) { + let info = createData(dataList); + return { + grid: { + left: 16, + right: 16, + bottom: 16, + top: 56, + containLabel: true + }, + tooltip: { + trigger: "axis", + backgroundColor: "#08182F", + color: "#fff", + borderColor: "#3373CC", + textStyle: { + color: "#fff", //设置文字颜色 + }, + extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;" + }, + legend: { + textStyle: { //图例文字的样式 + color: '#fff' + }, + y: 10, + x: 16 + }, + xAxis: { + type: 'category', + axisTick: { + show: false, + }, + axisLine: { + show: false, + lineStyle: { + color: "#fff", + }, + }, + data: ['名人', '媒体', '企业', '政府', '个人大v'] + }, + yAxis: { + type: 'value', + axisLine: { + show: false, + lineStyle: { + color: "#fff", + }, + }, + splitLine: { + lineStyle: { + type: "dashed", // y轴分割线类型 + color: "#012b4b", + }, + }, + }, + series: info + } } \ No newline at end of file diff --git a/src/views/BrandComparison/weiboContentDirectionComparison/index.vue b/src/views/BrandComparison/weiboContentDirectionComparison/index.vue index d08894e..e1cca02 100644 --- a/src/views/BrandComparison/weiboContentDirectionComparison/index.vue +++ b/src/views/BrandComparison/weiboContentDirectionComparison/index.vue @@ -7,235 +7,131 @@ * @FilePath: /data-show/src/views/BrandComparison/brandCommunicationTOPMedia/index.vue --> diff --git a/src/views/BrandComparison/weiboTuneComparison/index.vue b/src/views/BrandComparison/weiboTuneComparison/index.vue index 23a2b69..0b8bb95 100644 --- a/src/views/BrandComparison/weiboTuneComparison/index.vue +++ b/src/views/BrandComparison/weiboTuneComparison/index.vue @@ -7,70 +7,125 @@ * @FilePath: /data-show/src/views/BrandComparison/weiboTuneComparison/index.vue --> diff --git a/src/views/BrandComparison/weiboTuneComparison/wbRoundata/index.vue b/src/views/BrandComparison/weiboTuneComparison/wbRoundata/index.vue index 0baf57d..da4459e 100644 --- a/src/views/BrandComparison/weiboTuneComparison/wbRoundata/index.vue +++ b/src/views/BrandComparison/weiboTuneComparison/wbRoundata/index.vue @@ -27,10 +27,22 @@ export default { type: String, default: "", }, + data: { + type: Object, + default: () => {} + } + }, + watch: { + data: { + handler(val) { + this.opt = createOpt(val) + }, + immediate: true + } }, data() { return { - opt: createOpt(), + //opt: createOpt(), }; }, methods: { diff --git a/src/views/BrandComparison/weiboTuneComparison/wbRoundata/opt.js b/src/views/BrandComparison/weiboTuneComparison/wbRoundata/opt.js index 72c0191..9006c30 100644 --- a/src/views/BrandComparison/weiboTuneComparison/wbRoundata/opt.js +++ b/src/views/BrandComparison/weiboTuneComparison/wbRoundata/opt.js @@ -7,109 +7,84 @@ * @FilePath: /data-show/src/views/BrandInsight/weiboKol/opt.js */ import * as echarts from "echarts"; -export default function createOpt() { - return { - series: [ - { - name: 'Access From0', - type: 'pie', - radius: ['70%', '92%'], - avoidLabelOverlap: false, - label: { - show: false, - position: 'center', - lineHeight: 40 - }, - emphasis: { - label: { +function createData(obj = {}) { + if (JSON.stringify(obj) === '{}') { + return; + } + let arr = []; + for (let key in obj) { + let color = ""; + if (key === '正面') { + color = "#3373CC" + } else if (key === '负面') { + color = "#b38b14" + } else { + color = "#54BF93" + } + let o = { + value: obj[key], + name: key, + itemStyle: { + color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{ + //给颜色设置渐变色 前面4个参数,给第一个设置1,第四个设置0 ,就是水平渐变 + //给第一个设置0,第四个设置1,就是垂直渐变 + offset: 0, + color: 'black' + }, { + offset: 1, + color: color + }]) + } + } + arr.push(o) + } + return arr +} +export default function createOpt(obj={}) { + let data = createData(obj); + return { + series: [ + { + name: 'Access From0', + type: 'pie', + radius: ['70%', '92%'], + avoidLabelOverlap: false, + label: { + show: false, + position: 'center', + lineHeight: 28 + }, + emphasis: { + label: { show: true, - fontSize: '20', + fontSize: '18', color: "#ffff", fontWeight: 'bold', - formatter: function(p) { - return `${p.data.name}\n25%\n${p.data.value}` + formatter: function (p) { + return `${p.data.name}\n${p.percent}%\n${p.data.value}` } - } - }, - labelLine: { - show: false - }, - data: [ - { value: 2000, name: '正面', itemStyle: {color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{ - //给颜色设置渐变色 前面4个参数,给第一个设置1,第四个设置0 ,就是水平渐变 - //给第一个设置0,第四个设置1,就是垂直渐变 - offset: 0, - color: 'black' - }, { - offset: 1, - color: '#3373CC' - }])} }, - - { value: 1000, name: '中性', itemStyle: {color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{ - //给颜色设置渐变色 前面4个参数,给第一个设置1,第四个设置0 ,就是水平渐变 - //给第一个设置0,第四个设置1,就是垂直渐变 - offset: 0, - color: 'black' - }, { - offset: 1, - color: '#54BF93' - }])} }, - { value: 1000, name: '负面', itemStyle: {color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{ - //给颜色设置渐变色 前面4个参数,给第一个设置1,第四个设置0 ,就是水平渐变 - //给第一个设置0,第四个设置1,就是垂直渐变 - offset: 0, - color: 'black' - }, { - offset: 1, - color: '#b38b14' - }])} }, - ], + } + }, + labelLine: { + show: false + }, + data: data + }, + { + name: 'Access From1', + type: 'pie', + radius: ['96%', '100%'], + avoidLabelOverlap: false, + label: { + show: false, + position: 'center' + }, + labelLine: { + show: false }, - { - name: 'Access From1', - type: 'pie', - radius: ['96%', '100%'], - avoidLabelOverlap: false, - label: { - show: false, - position: 'center' - }, - labelLine: { - show: false - }, - center: ['50%', '50%'],//边框位置 - data: [ - { value: 2000, name: '正面', itemStyle: {color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{ - //给颜色设置渐变色 前面4个参数,给第一个设置1,第四个设置0 ,就是水平渐变 - //给第一个设置0,第四个设置1,就是垂直渐变 - offset: 0, - color: 'black' - }, { - offset: 1, - color: '#3373CC' - }])} }, - - { value: 1000, name: '中性', itemStyle: {color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{ - //给颜色设置渐变色 前面4个参数,给第一个设置1,第四个设置0 ,就是水平渐变 - //给第一个设置0,第四个设置1,就是垂直渐变 - offset: 0, - color: 'black' - }, { - offset: 1, - color: '#54BF93' - }])} }, - { value: 1000, name: '负面', itemStyle: {color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{ - //给颜色设置渐变色 前面4个参数,给第一个设置1,第四个设置0 ,就是水平渐变 - //给第一个设置0,第四个设置1,就是垂直渐变 - offset: 0, - color: 'black' - }, { - offset: 1, - color: '#b38b14' - }])} }, - - ], - } - ] - } + center: ['50%', '50%'],//边框位置 + data: data + } + ] + } } From b8f4a19ee087595d1bfabd14c37c3de26807c4a1 Mon Sep 17 00:00:00 2001 From: "lily.zhang" Date: Tue, 9 Nov 2021 17:43:06 +0800 Subject: [PATCH 2/7] cxw-010203 --- src/assets/images/ModelInsight/ic_qrft.png | Bin 0 -> 5196 bytes src/assets/images/ModelInsight/ic_qrpl.png | Bin 0 -> 4621 bytes src/router/index.js | 9 +- .../v-ranking-fhtd/index.vue | 4 +- src/views/ForumDetails/index.vue | 4 +- .../FollowPostIDModelAnalysis/index.vue | 48 ++++ .../v-ranking-fpma/index.vue | 231 ++++++++++++++++++ .../FollowPostUserActiveArea/index.vue | 105 ++++++++ .../FollowPostUserActiveArea/opt1.js | 83 +++++++ .../FollowPostUserActiveArea/opt2.js | 94 +++++++ .../FollowPostUserAnalysis/index.vue | 46 ++++ .../FollowPostUserAnalysis/opt.js | 80 ++++++ .../MainPostIDModelAnalysis/index.vue | 48 ++++ .../v-ranking-mpma/index.vue | 231 ++++++++++++++++++ .../MainPostUserActiveArea/index.vue | 105 ++++++++ .../MainPostUserActiveArea/opt1.js | 83 +++++++ .../MainPostUserActiveArea/opt2.js | 94 +++++++ .../MainPostUserAnalysis/index.vue | 46 ++++ .../MainPostUserAnalysis/opt.js | 80 ++++++ .../SuspectedCarBlackID/index.vue | 40 +++ .../SuspectedCarBlackID/opt.js | 90 +++++++ .../ThreadIDRegistrationTime/index.vue | 41 ++++ src/views/ModelForumDetails/index.vue | 69 ++++++ .../ModelForumDetails/mfdCharacters/index.vue | 171 +++++++++++++ .../ModelForumDetails/mfdCharacters/opt.js | 80 ++++++ .../mfdCommunicationTrend/index.vue | 71 ++++++ .../mfdCommunicationTrend/opt.js | 88 +++++++ .../mfdContentType/index.vue | 119 +++++++++ .../ModelForumDetails/mfdContentType/opt.js | 80 ++++++ .../ModelForumDetails/mfdFollowPost/index.vue | 48 ++++ .../ModelForumDetails/mfdHeader/index.vue | 122 +++++++++ .../ModelForumDetails/mfdMainPost/index.vue | 48 ++++ .../mfdNegativeTopic/index.vue | 76 ++++++ .../ModelForumDetails/mfdNegativeTopic/opt.js | 59 +++++ .../mfdPositiveTopic/index.vue | 75 ++++++ .../ModelForumDetails/mfdPositiveTopic/opt.js | 59 +++++ src/views/ModelInsight/index.vue | 4 +- 37 files changed, 2724 insertions(+), 7 deletions(-) create mode 100644 src/assets/images/ModelInsight/ic_qrft.png create mode 100644 src/assets/images/ModelInsight/ic_qrpl.png create mode 100644 src/views/ModelForumDetails/FollowPostIDModelAnalysis/index.vue create mode 100644 src/views/ModelForumDetails/FollowPostIDModelAnalysis/v-ranking-fpma/index.vue create mode 100644 src/views/ModelForumDetails/FollowPostUserActiveArea/index.vue create mode 100644 src/views/ModelForumDetails/FollowPostUserActiveArea/opt1.js create mode 100644 src/views/ModelForumDetails/FollowPostUserActiveArea/opt2.js create mode 100644 src/views/ModelForumDetails/FollowPostUserAnalysis/index.vue create mode 100644 src/views/ModelForumDetails/FollowPostUserAnalysis/opt.js create mode 100644 src/views/ModelForumDetails/MainPostIDModelAnalysis/index.vue create mode 100644 src/views/ModelForumDetails/MainPostIDModelAnalysis/v-ranking-mpma/index.vue create mode 100644 src/views/ModelForumDetails/MainPostUserActiveArea/index.vue create mode 100644 src/views/ModelForumDetails/MainPostUserActiveArea/opt1.js create mode 100644 src/views/ModelForumDetails/MainPostUserActiveArea/opt2.js create mode 100644 src/views/ModelForumDetails/MainPostUserAnalysis/index.vue create mode 100644 src/views/ModelForumDetails/MainPostUserAnalysis/opt.js create mode 100644 src/views/ModelForumDetails/SuspectedCarBlackID/index.vue create mode 100644 src/views/ModelForumDetails/SuspectedCarBlackID/opt.js create mode 100644 src/views/ModelForumDetails/ThreadIDRegistrationTime/index.vue create mode 100644 src/views/ModelForumDetails/index.vue create mode 100644 src/views/ModelForumDetails/mfdCharacters/index.vue create mode 100644 src/views/ModelForumDetails/mfdCharacters/opt.js create mode 100644 src/views/ModelForumDetails/mfdCommunicationTrend/index.vue create mode 100644 src/views/ModelForumDetails/mfdCommunicationTrend/opt.js create mode 100644 src/views/ModelForumDetails/mfdContentType/index.vue create mode 100644 src/views/ModelForumDetails/mfdContentType/opt.js create mode 100644 src/views/ModelForumDetails/mfdFollowPost/index.vue create mode 100644 src/views/ModelForumDetails/mfdHeader/index.vue create mode 100644 src/views/ModelForumDetails/mfdMainPost/index.vue create mode 100644 src/views/ModelForumDetails/mfdNegativeTopic/index.vue create mode 100644 src/views/ModelForumDetails/mfdNegativeTopic/opt.js create mode 100644 src/views/ModelForumDetails/mfdPositiveTopic/index.vue create mode 100644 src/views/ModelForumDetails/mfdPositiveTopic/opt.js diff --git a/src/assets/images/ModelInsight/ic_qrft.png b/src/assets/images/ModelInsight/ic_qrft.png new file mode 100644 index 0000000000000000000000000000000000000000..051d22da708f15a872da946affb7a139d8db676a GIT binary patch literal 5196 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 Dz_ZzC literal 0 HcmV?d00001 diff --git a/src/router/index.js b/src/router/index.js index c69a228..3d04e5e 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -1,7 +1,7 @@ /* * @Author: your name * @Date: 2021-10-08 09:26:29 - * @LastEditTime: 2021-11-08 18:38:19 + * @LastEditTime: 2021-11-09 13:56:50 * @LastEditors: Please set LastEditors * @Description: In User Settings Edit * @FilePath: /data-show/src/router/index.js @@ -35,6 +35,7 @@ import mcIndex from "@/views/MarketingComparison" import ModelTailDetails from "@/views/ModelTailDetails" import ModelEventDetails from "@/views/ModelEventDetails" import ModelWeiboDetails from "@/views/ModelWeiboDetails" +import ModelForumDetails from "@/views/ModelForumDetails" const router = [ { path: '/login', @@ -137,6 +138,12 @@ const router = [ desc: "车型事件详情", component: ModelEventDetails }, + { + path: '/modelForumDetails', + name: "modelForumDetails", + desc: "车型论坛详情", + component: ModelForumDetails + }, { path: '/modelWeiboDetails', name: "modelWeiboDetails", diff --git a/src/views/BrandInsight/forumHotTopicDirection/v-ranking-fhtd/index.vue b/src/views/BrandInsight/forumHotTopicDirection/v-ranking-fhtd/index.vue index ef4b08b..0be9293 100644 --- a/src/views/BrandInsight/forumHotTopicDirection/v-ranking-fhtd/index.vue +++ b/src/views/BrandInsight/forumHotTopicDirection/v-ranking-fhtd/index.vue @@ -1,7 +1,7 @@ + + + + + \ No newline at end of file diff --git a/src/views/ModelForumDetails/FollowPostIDModelAnalysis/v-ranking-fpma/index.vue b/src/views/ModelForumDetails/FollowPostIDModelAnalysis/v-ranking-fpma/index.vue new file mode 100644 index 0000000..f965050 --- /dev/null +++ b/src/views/ModelForumDetails/FollowPostIDModelAnalysis/v-ranking-fpma/index.vue @@ -0,0 +1,231 @@ + + + + + + diff --git a/src/views/ModelForumDetails/FollowPostUserActiveArea/index.vue b/src/views/ModelForumDetails/FollowPostUserActiveArea/index.vue new file mode 100644 index 0000000..357825c --- /dev/null +++ b/src/views/ModelForumDetails/FollowPostUserActiveArea/index.vue @@ -0,0 +1,105 @@ + + + + + + diff --git a/src/views/ModelForumDetails/FollowPostUserActiveArea/opt1.js b/src/views/ModelForumDetails/FollowPostUserActiveArea/opt1.js new file mode 100644 index 0000000..ae40386 --- /dev/null +++ b/src/views/ModelForumDetails/FollowPostUserActiveArea/opt1.js @@ -0,0 +1,83 @@ + + +/* + * @Author: your name + * @Date: 2021-10-09 12:38:34 + * @LastEditTime: 2021-11-09 17:42:17 + * @LastEditors: Please set LastEditors + * @Description: In User Settings Edit + * @FilePath: /data-show/src/views/Index/tailInsight/opt.js + */ +import * as echarts from "echarts"; +import { bigNumberTransform } from "@/utils/gol/dataTool" +export default function createOptD1(dx=[],ds=[]) { + return { + grid: { + left: 16, + right: '5%', + bottom: 10, + top: "1%", + containLabel: true + }, + tooltip: { + trigger: "axis", + backgroundColor: "#08182F", + color: "#fff", + borderColor: "#3373CC", + textStyle: { + color: "#fff", //设置文字颜色 + }, + extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;" + }, + xAxis: { + type: 'value', + axisLine: { + show: false, + lineStyle: { + color: "#fff", + }, + }, + axisLabel: { + formatter: (value) => { + let str = bigNumberTransform(value); + return str; + } + }, + splitLine: { + lineStyle: { + type: "dashed", // y轴分割线类型 + color: "#012b4b", + }, + }, + }, + yAxis: { + type: 'category', + data: dx, + axisTick: { + show: false, + }, + axisLine: { + show: false, + lineStyle: { + color: "#fff", + }, + }, + inverse: true + }, + series: [ + { + name: '2011', + type: 'bar', + barWidth: 20, + data: ds, + color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{ + offset: 0, + color: '#010B19' + }, { + offset: 1, + color: '#54BF93' + }]), + } + ] + } +} diff --git a/src/views/ModelForumDetails/FollowPostUserActiveArea/opt2.js b/src/views/ModelForumDetails/FollowPostUserActiveArea/opt2.js new file mode 100644 index 0000000..c961002 --- /dev/null +++ b/src/views/ModelForumDetails/FollowPostUserActiveArea/opt2.js @@ -0,0 +1,94 @@ +/* + * @Author: your name + * @Date: 2021-10-14 11:53:16 + * @LastEditTime: 2021-11-04 17:17:02 + * @LastEditors: Please set LastEditors + * @Description: In User Settings Edit + * @FilePath: /data-show/src/views/WeiboDetails/weiboUserActiveArea/opt2.js + */ + +export default function createOptD2(dm) { + return { + tooltip: { + trigger: "item", + backgroundColor: "#08182F", + color: "#fff", + borderColor: "#3373CC", + textStyle: { + color: "#fff", //设置文字颜色 + }, + extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;" + }, + // geo: { + // show: true, + // map: 'china', + // roam: false,//地图设置不可拖拽,固定的 + // itemStyle: { + // normal: { + // borderWidth: 0, + // shadowColor: 'rgba(0,54,255, 1)', + // shadowBlur: 100 + // } + // } + // }, + visualMap: { + type: 'continuous', + show: false, + min: 0, + max: 2000, + text: ['高', '低'], + orient: 'horizontal', + itemWidth: 15, + itemHeight: 200, + right: 0, + bottom: 30, + inRange: { + color: ['#0393d2', '#75ddff'] + }, + textStyle: { + color: 'white' + } + }, + series: [ + { + name: "微博区域", + type: "map", + mapType: "china", + roam: false, + zoom: 1,//默认地图在容器中显示zoom:1,可根据需求放大缩小地图 + left: 16, + top: 20, + right: 10, + bottom: 10, + selectedMode:'multiple', + colorBy: 'data', + itemStyle: { + areaColor: '#001f5b',//地图区域背景颜色 + borderColor: '#005cf9',//地图边界颜色 + shadowColor: '#005cf9', + emphasis: { + areaColor: '#3066ba',//鼠标滑过区域颜色 + label: { + color: '#fff' + } + } + }, + label: { + normal: { + show: false + }, + }, + + // select: { + // label: { + // show: false + // }, + // itemStyle: { + // areaColor: '#3edffe' + // } + // }, + data: dm + } + ] + } +} diff --git a/src/views/ModelForumDetails/FollowPostUserAnalysis/index.vue b/src/views/ModelForumDetails/FollowPostUserAnalysis/index.vue new file mode 100644 index 0000000..971108b --- /dev/null +++ b/src/views/ModelForumDetails/FollowPostUserAnalysis/index.vue @@ -0,0 +1,46 @@ + + + + + + diff --git a/src/views/ModelForumDetails/FollowPostUserAnalysis/opt.js b/src/views/ModelForumDetails/FollowPostUserAnalysis/opt.js new file mode 100644 index 0000000..f01a8de --- /dev/null +++ b/src/views/ModelForumDetails/FollowPostUserAnalysis/opt.js @@ -0,0 +1,80 @@ +/* + * @Author: your name + * @Date: 2021-10-09 09:49:50 + * @LastEditTime: 2021-10-28 13:07:24 + * @LastEditors: Please set LastEditors + * @Description: In User Settings Edit + * @FilePath: /data-show/src/views/Index/userPortrait/opt.js + */ +import * as echarts from "echarts"; +// let colors = ['#3373CC', '#CC9D12', '#54BF93','#f15c80', '#e4d354', '#8085e8', '#8d4653', '#91e8e1','#f7a35c','#90ed7d'] +function createData(ds = [], colors) { + let arr = []; + ds.map((ele, index) => { + let obj = { + value: ele.value, + name: ele.key, + itemStyle: { + color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{ + //给颜色设置渐变色 前面4个参数,给第一个设置1,第四个设置0 ,就是水平渐变 + //给第一个设置0,第四个设置1,就是垂直渐变 + offset: 0, + color: 'black' + }, { + offset: 1, + color: colors[index] + }]) + } + } + arr.push(obj) + }) + return arr; +} +export default function createOpt(ds = [], color = []) { + const data = createData(ds, color); + return { + series: [ + { + name: 'Access From0', + type: 'pie', + radius: ['65%', '80%'], + avoidLabelOverlap: false, + label: { + show: false, + position: 'center', + lineHeight: 30 + }, + emphasis: { + label: { + show: true, + fontSize: '16', + color: "#ffff", + fontWeight: 'bold', + formatter: function (p) { + return `${p.data.name}\n${p.percent}%\n${p.data.value}` + } + } + }, + labelLine: { + show: false + }, + data: data + }, + { + name: 'Access From1', + type: 'pie', + radius: ['86%', '94%'], + avoidLabelOverlap: false, + label: { + show: false, + position: 'center' + }, + labelLine: { + show: false + }, + center: ['50%', '50%'],//边框位置 + data: data + } + ] + } +} diff --git a/src/views/ModelForumDetails/MainPostIDModelAnalysis/index.vue b/src/views/ModelForumDetails/MainPostIDModelAnalysis/index.vue new file mode 100644 index 0000000..4fce04b --- /dev/null +++ b/src/views/ModelForumDetails/MainPostIDModelAnalysis/index.vue @@ -0,0 +1,48 @@ + + + + + + \ No newline at end of file diff --git a/src/views/ModelForumDetails/MainPostIDModelAnalysis/v-ranking-mpma/index.vue b/src/views/ModelForumDetails/MainPostIDModelAnalysis/v-ranking-mpma/index.vue new file mode 100644 index 0000000..905192f --- /dev/null +++ b/src/views/ModelForumDetails/MainPostIDModelAnalysis/v-ranking-mpma/index.vue @@ -0,0 +1,231 @@ + + + + + + diff --git a/src/views/ModelForumDetails/MainPostUserActiveArea/index.vue b/src/views/ModelForumDetails/MainPostUserActiveArea/index.vue new file mode 100644 index 0000000..f888f68 --- /dev/null +++ b/src/views/ModelForumDetails/MainPostUserActiveArea/index.vue @@ -0,0 +1,105 @@ + + + + + + diff --git a/src/views/ModelForumDetails/MainPostUserActiveArea/opt1.js b/src/views/ModelForumDetails/MainPostUserActiveArea/opt1.js new file mode 100644 index 0000000..3fd7054 --- /dev/null +++ b/src/views/ModelForumDetails/MainPostUserActiveArea/opt1.js @@ -0,0 +1,83 @@ + + +/* + * @Author: your name + * @Date: 2021-10-09 12:38:34 + * @LastEditTime: 2021-10-14 11:48:19 + * @LastEditors: Please set LastEditors + * @Description: In User Settings Edit + * @FilePath: /data-show/src/views/Index/tailInsight/opt.js + */ +import * as echarts from "echarts"; +import { bigNumberTransform } from "@/utils/gol/dataTool" +export default function createOptD1(dx=[],ds=[]) { + return { + grid: { + left: 16, + right: '5%', + bottom: 10, + top: "1%", + containLabel: true + }, + tooltip: { + trigger: "axis", + backgroundColor: "#08182F", + color: "#fff", + borderColor: "#3373CC", + textStyle: { + color: "#fff", //设置文字颜色 + }, + extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;" + }, + xAxis: { + type: 'value', + axisLine: { + show: false, + lineStyle: { + color: "#fff", + }, + }, + axisLabel: { + formatter: (value) => { + let str = bigNumberTransform(value); + return str; + } + }, + splitLine: { + lineStyle: { + type: "dashed", // y轴分割线类型 + color: "#012b4b", + }, + }, + }, + yAxis: { + type: 'category', + data: dx, + axisTick: { + show: false, + }, + axisLine: { + show: false, + lineStyle: { + color: "#fff", + }, + }, + inverse: true + }, + series: [ + { + name: '2011', + type: 'bar', + barWidth: 20, + data: ds, + color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{ + offset: 0, + color: '#010B19' + }, { + offset: 1, + color: '#2f68b4' + }]), + } + ] + } +} diff --git a/src/views/ModelForumDetails/MainPostUserActiveArea/opt2.js b/src/views/ModelForumDetails/MainPostUserActiveArea/opt2.js new file mode 100644 index 0000000..c961002 --- /dev/null +++ b/src/views/ModelForumDetails/MainPostUserActiveArea/opt2.js @@ -0,0 +1,94 @@ +/* + * @Author: your name + * @Date: 2021-10-14 11:53:16 + * @LastEditTime: 2021-11-04 17:17:02 + * @LastEditors: Please set LastEditors + * @Description: In User Settings Edit + * @FilePath: /data-show/src/views/WeiboDetails/weiboUserActiveArea/opt2.js + */ + +export default function createOptD2(dm) { + return { + tooltip: { + trigger: "item", + backgroundColor: "#08182F", + color: "#fff", + borderColor: "#3373CC", + textStyle: { + color: "#fff", //设置文字颜色 + }, + extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;" + }, + // geo: { + // show: true, + // map: 'china', + // roam: false,//地图设置不可拖拽,固定的 + // itemStyle: { + // normal: { + // borderWidth: 0, + // shadowColor: 'rgba(0,54,255, 1)', + // shadowBlur: 100 + // } + // } + // }, + visualMap: { + type: 'continuous', + show: false, + min: 0, + max: 2000, + text: ['高', '低'], + orient: 'horizontal', + itemWidth: 15, + itemHeight: 200, + right: 0, + bottom: 30, + inRange: { + color: ['#0393d2', '#75ddff'] + }, + textStyle: { + color: 'white' + } + }, + series: [ + { + name: "微博区域", + type: "map", + mapType: "china", + roam: false, + zoom: 1,//默认地图在容器中显示zoom:1,可根据需求放大缩小地图 + left: 16, + top: 20, + right: 10, + bottom: 10, + selectedMode:'multiple', + colorBy: 'data', + itemStyle: { + areaColor: '#001f5b',//地图区域背景颜色 + borderColor: '#005cf9',//地图边界颜色 + shadowColor: '#005cf9', + emphasis: { + areaColor: '#3066ba',//鼠标滑过区域颜色 + label: { + color: '#fff' + } + } + }, + label: { + normal: { + show: false + }, + }, + + // select: { + // label: { + // show: false + // }, + // itemStyle: { + // areaColor: '#3edffe' + // } + // }, + data: dm + } + ] + } +} diff --git a/src/views/ModelForumDetails/MainPostUserAnalysis/index.vue b/src/views/ModelForumDetails/MainPostUserAnalysis/index.vue new file mode 100644 index 0000000..7fb85aa --- /dev/null +++ b/src/views/ModelForumDetails/MainPostUserAnalysis/index.vue @@ -0,0 +1,46 @@ + + + + + + diff --git a/src/views/ModelForumDetails/MainPostUserAnalysis/opt.js b/src/views/ModelForumDetails/MainPostUserAnalysis/opt.js new file mode 100644 index 0000000..f01a8de --- /dev/null +++ b/src/views/ModelForumDetails/MainPostUserAnalysis/opt.js @@ -0,0 +1,80 @@ +/* + * @Author: your name + * @Date: 2021-10-09 09:49:50 + * @LastEditTime: 2021-10-28 13:07:24 + * @LastEditors: Please set LastEditors + * @Description: In User Settings Edit + * @FilePath: /data-show/src/views/Index/userPortrait/opt.js + */ +import * as echarts from "echarts"; +// let colors = ['#3373CC', '#CC9D12', '#54BF93','#f15c80', '#e4d354', '#8085e8', '#8d4653', '#91e8e1','#f7a35c','#90ed7d'] +function createData(ds = [], colors) { + let arr = []; + ds.map((ele, index) => { + let obj = { + value: ele.value, + name: ele.key, + itemStyle: { + color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{ + //给颜色设置渐变色 前面4个参数,给第一个设置1,第四个设置0 ,就是水平渐变 + //给第一个设置0,第四个设置1,就是垂直渐变 + offset: 0, + color: 'black' + }, { + offset: 1, + color: colors[index] + }]) + } + } + arr.push(obj) + }) + return arr; +} +export default function createOpt(ds = [], color = []) { + const data = createData(ds, color); + return { + series: [ + { + name: 'Access From0', + type: 'pie', + radius: ['65%', '80%'], + avoidLabelOverlap: false, + label: { + show: false, + position: 'center', + lineHeight: 30 + }, + emphasis: { + label: { + show: true, + fontSize: '16', + color: "#ffff", + fontWeight: 'bold', + formatter: function (p) { + return `${p.data.name}\n${p.percent}%\n${p.data.value}` + } + } + }, + labelLine: { + show: false + }, + data: data + }, + { + name: 'Access From1', + type: 'pie', + radius: ['86%', '94%'], + avoidLabelOverlap: false, + label: { + show: false, + position: 'center' + }, + labelLine: { + show: false + }, + center: ['50%', '50%'],//边框位置 + data: data + } + ] + } +} diff --git a/src/views/ModelForumDetails/SuspectedCarBlackID/index.vue b/src/views/ModelForumDetails/SuspectedCarBlackID/index.vue new file mode 100644 index 0000000..7b3446b --- /dev/null +++ b/src/views/ModelForumDetails/SuspectedCarBlackID/index.vue @@ -0,0 +1,40 @@ + + + + + + diff --git a/src/views/ModelForumDetails/SuspectedCarBlackID/opt.js b/src/views/ModelForumDetails/SuspectedCarBlackID/opt.js new file mode 100644 index 0000000..3b3bd67 --- /dev/null +++ b/src/views/ModelForumDetails/SuspectedCarBlackID/opt.js @@ -0,0 +1,90 @@ +/* + * @Author: your name + * @Date: 2021-10-12 15:32:24 + * @LastEditTime: 2021-11-09 17:33:49 + * @LastEditors: Please set LastEditors + * @Description: In User Settings Edit + * @FilePath: /data-show/src/views/BrandInsight/weiboVolumeTrend/opt.js + */ +export default function createOpt() { + return { + grid: { + top: 20, + left: 10, + right: '5%', + bottom: 10, + containLabel: true, + }, + tooltip: { + trigger: "item", + backgroundColor: "#08182F", + color: "#fff", + borderColor: "#3373CC", + textStyle: { + color: "#fff", //设置文字颜色 + }, + extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;" + }, + xAxis: { + axisTick: { + show: false, + }, + axisLine: { + show: false, + lineStyle: { + color: "#fff", + }, + }, + splitLine: { + show: false, + } + }, + yAxis: { + axisTick: { + show: false, + }, + axisLine: { + show: false, + lineStyle: { + color: "#fff", + }, + }, + splitLine: { + lineStyle: { + type: "dashed", // y轴分割线类型 + color: "#012b4b", + }, + }, + }, + series: [ + { + symbolSize: 20, + data: [ + [10.0, 8.04], + [8.07, 6.95], + [13.0, 7.58], + [9.05, 8.81], + [11.0, 8.33], + [14.0, 7.66], + [13.4, 6.81], + [10.0, 6.33], + [14.0, 8.96], + [12.5, 6.82], + [9.15, 7.2], + [11.5, 7.2], + [3.03, 4.23], + [12.2, 7.83], + [2.02, 4.47], + [1.05, 3.33], + [4.05, 4.96], + [6.03, 7.24], + [12.0, 6.26], + [12.0, 8.84], + [7.08, 5.82], + [5.02, 5.68] + ], + type: 'scatter' + } + ] + }; +} diff --git a/src/views/ModelForumDetails/ThreadIDRegistrationTime/index.vue b/src/views/ModelForumDetails/ThreadIDRegistrationTime/index.vue new file mode 100644 index 0000000..ecd1228 --- /dev/null +++ b/src/views/ModelForumDetails/ThreadIDRegistrationTime/index.vue @@ -0,0 +1,41 @@ + + + + + + diff --git a/src/views/ModelForumDetails/index.vue b/src/views/ModelForumDetails/index.vue new file mode 100644 index 0000000..389e0f5 --- /dev/null +++ b/src/views/ModelForumDetails/index.vue @@ -0,0 +1,69 @@ + + + + + + diff --git a/src/views/ModelForumDetails/mfdCharacters/index.vue b/src/views/ModelForumDetails/mfdCharacters/index.vue new file mode 100644 index 0000000..b82f47b --- /dev/null +++ b/src/views/ModelForumDetails/mfdCharacters/index.vue @@ -0,0 +1,171 @@ + + + + + + + diff --git a/src/views/ModelForumDetails/mfdCharacters/opt.js b/src/views/ModelForumDetails/mfdCharacters/opt.js new file mode 100644 index 0000000..f01a8de --- /dev/null +++ b/src/views/ModelForumDetails/mfdCharacters/opt.js @@ -0,0 +1,80 @@ +/* + * @Author: your name + * @Date: 2021-10-09 09:49:50 + * @LastEditTime: 2021-10-28 13:07:24 + * @LastEditors: Please set LastEditors + * @Description: In User Settings Edit + * @FilePath: /data-show/src/views/Index/userPortrait/opt.js + */ +import * as echarts from "echarts"; +// let colors = ['#3373CC', '#CC9D12', '#54BF93','#f15c80', '#e4d354', '#8085e8', '#8d4653', '#91e8e1','#f7a35c','#90ed7d'] +function createData(ds = [], colors) { + let arr = []; + ds.map((ele, index) => { + let obj = { + value: ele.value, + name: ele.key, + itemStyle: { + color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{ + //给颜色设置渐变色 前面4个参数,给第一个设置1,第四个设置0 ,就是水平渐变 + //给第一个设置0,第四个设置1,就是垂直渐变 + offset: 0, + color: 'black' + }, { + offset: 1, + color: colors[index] + }]) + } + } + arr.push(obj) + }) + return arr; +} +export default function createOpt(ds = [], color = []) { + const data = createData(ds, color); + return { + series: [ + { + name: 'Access From0', + type: 'pie', + radius: ['65%', '80%'], + avoidLabelOverlap: false, + label: { + show: false, + position: 'center', + lineHeight: 30 + }, + emphasis: { + label: { + show: true, + fontSize: '16', + color: "#ffff", + fontWeight: 'bold', + formatter: function (p) { + return `${p.data.name}\n${p.percent}%\n${p.data.value}` + } + } + }, + labelLine: { + show: false + }, + data: data + }, + { + name: 'Access From1', + type: 'pie', + radius: ['86%', '94%'], + avoidLabelOverlap: false, + label: { + show: false, + position: 'center' + }, + labelLine: { + show: false + }, + center: ['50%', '50%'],//边框位置 + data: data + } + ] + } +} diff --git a/src/views/ModelForumDetails/mfdCommunicationTrend/index.vue b/src/views/ModelForumDetails/mfdCommunicationTrend/index.vue new file mode 100644 index 0000000..e8b5d3c --- /dev/null +++ b/src/views/ModelForumDetails/mfdCommunicationTrend/index.vue @@ -0,0 +1,71 @@ + + + + + + diff --git a/src/views/ModelForumDetails/mfdCommunicationTrend/opt.js b/src/views/ModelForumDetails/mfdCommunicationTrend/opt.js new file mode 100644 index 0000000..bc0efce --- /dev/null +++ b/src/views/ModelForumDetails/mfdCommunicationTrend/opt.js @@ -0,0 +1,88 @@ +/* + * @Author: your name + * @Date: 2021-10-12 15:32:24 + * @LastEditTime: 2021-10-14 10:21:55 + * @LastEditors: Please set LastEditors + * @Description: In User Settings Edit + * @FilePath: /data-show/src/views/BrandInsight/weiboVolumeTrend/opt.js + */ +import * as echarts from "echarts"; +import { bigNumberTransform } from "@/utils/gol/dataTool" +export default function createOpt(dx = [], ds = []) { + return { + grid: { + top: 16, + left: 16, + right: "5%", + bottom: 10, + containLabel: true, + }, + tooltip: { + trigger: "axis", + backgroundColor: "#08182F", + color: "#fff", + borderColor: "#3373CC", + textStyle: { + color: "#fff", //设置文字颜色 + }, + extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;" + }, + xAxis: { + type: 'category', + boundaryGap: false, + axisTick: { + show: false, + }, + axisLabel: { + formatter: (value) => { + let str = value.substring(10, 16) + return str; + } + }, + axisLine: { + show: false, + lineStyle: { + color: "#fff", + }, + }, + data: dx + }, + yAxis: { + type: 'value', + axisLine: { + show: false, + lineStyle: { + color: "#FFF", + }, + }, + axisLabel: { + formatter: (value) => { + let str = bigNumberTransform(value); + return str; + } + }, + splitLine: { + lineStyle: { + type: "dashed", // y轴分割线类型 + color: "#012b4b", + }, + }, + }, + series: [ + { + data: ds, + type: 'line', + color: '#546fc5', + areaStyle: {normal: { + color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ + offset: 0, + color: '#546fc5' + }, { + offset: 1, + color: 'rgba(0,0,0,0)' + }]), + }} + } + ] + }; +} diff --git a/src/views/ModelForumDetails/mfdContentType/index.vue b/src/views/ModelForumDetails/mfdContentType/index.vue new file mode 100644 index 0000000..f28ce1d --- /dev/null +++ b/src/views/ModelForumDetails/mfdContentType/index.vue @@ -0,0 +1,119 @@ + + + + + diff --git a/src/views/ModelForumDetails/mfdContentType/opt.js b/src/views/ModelForumDetails/mfdContentType/opt.js new file mode 100644 index 0000000..f01a8de --- /dev/null +++ b/src/views/ModelForumDetails/mfdContentType/opt.js @@ -0,0 +1,80 @@ +/* + * @Author: your name + * @Date: 2021-10-09 09:49:50 + * @LastEditTime: 2021-10-28 13:07:24 + * @LastEditors: Please set LastEditors + * @Description: In User Settings Edit + * @FilePath: /data-show/src/views/Index/userPortrait/opt.js + */ +import * as echarts from "echarts"; +// let colors = ['#3373CC', '#CC9D12', '#54BF93','#f15c80', '#e4d354', '#8085e8', '#8d4653', '#91e8e1','#f7a35c','#90ed7d'] +function createData(ds = [], colors) { + let arr = []; + ds.map((ele, index) => { + let obj = { + value: ele.value, + name: ele.key, + itemStyle: { + color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{ + //给颜色设置渐变色 前面4个参数,给第一个设置1,第四个设置0 ,就是水平渐变 + //给第一个设置0,第四个设置1,就是垂直渐变 + offset: 0, + color: 'black' + }, { + offset: 1, + color: colors[index] + }]) + } + } + arr.push(obj) + }) + return arr; +} +export default function createOpt(ds = [], color = []) { + const data = createData(ds, color); + return { + series: [ + { + name: 'Access From0', + type: 'pie', + radius: ['65%', '80%'], + avoidLabelOverlap: false, + label: { + show: false, + position: 'center', + lineHeight: 30 + }, + emphasis: { + label: { + show: true, + fontSize: '16', + color: "#ffff", + fontWeight: 'bold', + formatter: function (p) { + return `${p.data.name}\n${p.percent}%\n${p.data.value}` + } + } + }, + labelLine: { + show: false + }, + data: data + }, + { + name: 'Access From1', + type: 'pie', + radius: ['86%', '94%'], + avoidLabelOverlap: false, + label: { + show: false, + position: 'center' + }, + labelLine: { + show: false + }, + center: ['50%', '50%'],//边框位置 + data: data + } + ] + } +} diff --git a/src/views/ModelForumDetails/mfdFollowPost/index.vue b/src/views/ModelForumDetails/mfdFollowPost/index.vue new file mode 100644 index 0000000..ee738aa --- /dev/null +++ b/src/views/ModelForumDetails/mfdFollowPost/index.vue @@ -0,0 +1,48 @@ + + + + + + diff --git a/src/views/ModelForumDetails/mfdHeader/index.vue b/src/views/ModelForumDetails/mfdHeader/index.vue new file mode 100644 index 0000000..7ed7cae --- /dev/null +++ b/src/views/ModelForumDetails/mfdHeader/index.vue @@ -0,0 +1,122 @@ + + + + + + diff --git a/src/views/ModelForumDetails/mfdMainPost/index.vue b/src/views/ModelForumDetails/mfdMainPost/index.vue new file mode 100644 index 0000000..0b4c899 --- /dev/null +++ b/src/views/ModelForumDetails/mfdMainPost/index.vue @@ -0,0 +1,48 @@ + + + + + + diff --git a/src/views/ModelForumDetails/mfdNegativeTopic/index.vue b/src/views/ModelForumDetails/mfdNegativeTopic/index.vue new file mode 100644 index 0000000..5a2a983 --- /dev/null +++ b/src/views/ModelForumDetails/mfdNegativeTopic/index.vue @@ -0,0 +1,76 @@ + + + + + + diff --git a/src/views/ModelForumDetails/mfdNegativeTopic/opt.js b/src/views/ModelForumDetails/mfdNegativeTopic/opt.js new file mode 100644 index 0000000..91b1f6c --- /dev/null +++ b/src/views/ModelForumDetails/mfdNegativeTopic/opt.js @@ -0,0 +1,59 @@ +/* + * @Author: your name + * @Date: 2021-10-12 15:32:24 + * @LastEditTime: 2021-11-09 15:45:48 + * @LastEditors: Please set LastEditors + * @Description: In User Settings Edit + * @FilePath: /data-show/src/views/BrandInsight/weiboVolumeTrend/opt.js + */ +export default function createOpt() { + return { + title: { + text: 'Basic Radar Chart', + show: false + }, + tooltip: { + trigger: "item", + backgroundColor: "#08182F", + color: "#fff", + borderColor: "#3373CC", + textStyle: { + color: "#fff", //设置文字颜色 + }, + extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;" + }, + radar: { + // shape: 'circle', + indicator: [ + { name: '新车发布', max: 6500 }, + { name: '用车生活', max: 16000 }, + { name: '咨询请教', max: 30000 }, + { name: '本品讨论', max: 38000 }, + { name: '售后服务', max: 52000 }, + { name: '技术加持', max: 25000 }, + { name: '保养作业', max: 25000 }, + { name: '看车提车', max: 25000 }, + { name: '竞品对比', max: 25000 }, + { name: '销售问题', max: 25000 }, + ] + }, + series: [ + { + name: 'Budget vs spending', + type: 'radar', + data: [ + { + value: [5000, 14000, 28000, 26000, 42000, 21000, 22000, 21000, 19000, 23000], + name: '负面话题分布:', + itemStyle: { + color: "rgba(194, 151, 22)", + }, + areaStyle: { + color: 'rgba(194, 151, 22, 0.2)' + } + } + ] + } + ] + }; +} diff --git a/src/views/ModelForumDetails/mfdPositiveTopic/index.vue b/src/views/ModelForumDetails/mfdPositiveTopic/index.vue new file mode 100644 index 0000000..3dac42b --- /dev/null +++ b/src/views/ModelForumDetails/mfdPositiveTopic/index.vue @@ -0,0 +1,75 @@ + + + + + + diff --git a/src/views/ModelForumDetails/mfdPositiveTopic/opt.js b/src/views/ModelForumDetails/mfdPositiveTopic/opt.js new file mode 100644 index 0000000..3c75051 --- /dev/null +++ b/src/views/ModelForumDetails/mfdPositiveTopic/opt.js @@ -0,0 +1,59 @@ +/* + * @Author: your name + * @Date: 2021-10-12 15:32:24 + * @LastEditTime: 2021-11-09 15:46:21 + * @LastEditors: Please set LastEditors + * @Description: In User Settings Edit + * @FilePath: /data-show/src/views/BrandInsight/weiboVolumeTrend/opt.js + */ +export default function createOpt() { + return { + title: { + text: 'Basic Radar Chart', + show: false + }, + tooltip: { + trigger: "item", + backgroundColor: "#08182F", + color: "#fff", + borderColor: "#3373CC", + textStyle: { + color: "#fff", //设置文字颜色 + }, + extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;" + }, + radar: { + // shape: 'circle', + indicator: [ + { name: '新车发布', max: 6500 }, + { name: '用车生活', max: 16000 }, + { name: '咨询请教', max: 30000 }, + { name: '本品讨论', max: 38000 }, + { name: '售后服务', max: 52000 }, + { name: '技术加持', max: 25000 }, + { name: '保养作业', max: 25000 }, + { name: '看车提车', max: 25000 }, + { name: '竞品对比', max: 25000 }, + { name: '销售问题', max: 25000 }, + ] + }, + series: [ + { + name: 'Budget vs spending', + type: 'radar', + data: [ + { + value: [5000, 14000, 28000, 26000, 42000, 21000, 22000, 21000, 19000, 23000], + name: '正面话题分布:', + itemStyle: { + color: "rgba(48, 110, 195)", + }, + areaStyle: { + color: 'rgba(48, 110, 195, 0.2)' + } + } + ] + } + ] + }; +} diff --git a/src/views/ModelInsight/index.vue b/src/views/ModelInsight/index.vue index b300bd7..74a3d29 100644 --- a/src/views/ModelInsight/index.vue +++ b/src/views/ModelInsight/index.vue @@ -1,7 +1,7 @@ + + + + + \ No newline at end of file diff --git a/src/views/ModelComparison/BrandComparison.vue b/src/views/ModelComparison/BrandComparison.vue new file mode 100644 index 0000000..0255d48 --- /dev/null +++ b/src/views/ModelComparison/BrandComparison.vue @@ -0,0 +1,203 @@ + + + + + + + + diff --git a/src/views/ModelComparison/brandCommunicationTOPMedia/index.vue b/src/views/ModelComparison/brandCommunicationTOPMedia/index.vue new file mode 100644 index 0000000..422d204 --- /dev/null +++ b/src/views/ModelComparison/brandCommunicationTOPMedia/index.vue @@ -0,0 +1,114 @@ + + + + + diff --git a/src/views/ModelComparison/brandCommunicationTOPMedia/v-ranking-bcm/index.vue b/src/views/ModelComparison/brandCommunicationTOPMedia/v-ranking-bcm/index.vue new file mode 100644 index 0000000..3760c07 --- /dev/null +++ b/src/views/ModelComparison/brandCommunicationTOPMedia/v-ranking-bcm/index.vue @@ -0,0 +1,232 @@ + + + + + + diff --git a/src/views/ModelComparison/brandCompateHeader/index.vue b/src/views/ModelComparison/brandCompateHeader/index.vue new file mode 100644 index 0000000..b08d498 --- /dev/null +++ b/src/views/ModelComparison/brandCompateHeader/index.vue @@ -0,0 +1,247 @@ + + + + + + diff --git a/src/views/ModelComparison/brandEventComparison/index.vue b/src/views/ModelComparison/brandEventComparison/index.vue new file mode 100644 index 0000000..4b5423b --- /dev/null +++ b/src/views/ModelComparison/brandEventComparison/index.vue @@ -0,0 +1,191 @@ + + + + + + diff --git a/src/views/ModelComparison/brandEventComparison/opt.js b/src/views/ModelComparison/brandEventComparison/opt.js new file mode 100644 index 0000000..c743ed9 --- /dev/null +++ b/src/views/ModelComparison/brandEventComparison/opt.js @@ -0,0 +1,101 @@ +/* + * @Author: your name + * @Date: 2021-10-15 15:15:27 + * @LastEditTime: 2021-10-15 17:43:04 + * @LastEditors: Please set LastEditors + * @Description: In User Settings Edit + * @FilePath: /data-show/src/views/BrandComparison/channelDistribution/opt.js + */ + +/*series: [ + { + name: '奥迪', + type: 'bar', + barGap: 0, + barWidth: 20, + emphasis: { + focus: 'series' + }, + data: [320, 332, 301, 334, 390, 400] + },*/ +function createData(dataList = []) { + let arr = []; + dataList.forEach(ele => { + let o = { + name: ele.Name, + type: 'bar', + barGap: 0, + barWidth: 20, + emphasis: { + focus: 'series' + }, + data: [ele.Data.新闻,ele.Data.论坛,ele.Data.微信,ele.Data.APP,ele.Data.微博,ele.Data.其他] + }; + arr.push(o) + }) + return arr; +} + +export default function createOpt(dataList = [], brandList = []) { + let info = createData(dataList); + return { + grid: { + top: "56px", + left: "16px", + right: "28px", + bottom: "16px", + containLabel: true, + }, + legend: { + data: brandList, + textStyle: { //图例文字的样式 + color: '#fff' + }, + y: 12, + x: 16 + }, + tooltip: { + trigger: "axis", + backgroundColor: "#08182F", + color: "#fff", + borderColor: "#3373CC", + textStyle: { + color: "#fff", //设置文字颜色 + }, + extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;", + }, + xAxis: [ + { + type: 'category', + axisTick: { + show: false, + }, + axisLine: { + show: false, + lineStyle: { + color: "#fff", + }, + }, + data: ['新闻', '论坛', '微信', 'APP', '微博', "其他"] + } + ], + yAxis: [ + { + type: 'value', + axisLine: { + show: false, + lineStyle: { + color: "#FFF", + }, + }, + splitLine: { + lineStyle: { + type: "dashed", // y轴分割线类型 + color: "#012b4b", + }, + }, + } + ], + series: info + } +} \ No newline at end of file diff --git a/src/views/ModelComparison/brandRearWingComparison/index.vue b/src/views/ModelComparison/brandRearWingComparison/index.vue new file mode 100644 index 0000000..6555c5a --- /dev/null +++ b/src/views/ModelComparison/brandRearWingComparison/index.vue @@ -0,0 +1,39 @@ + + + + + + diff --git a/src/views/ModelComparison/brandRearWingComparison/opt.js b/src/views/ModelComparison/brandRearWingComparison/opt.js new file mode 100644 index 0000000..346d8e9 --- /dev/null +++ b/src/views/ModelComparison/brandRearWingComparison/opt.js @@ -0,0 +1,147 @@ +/* + * @Author: your name + * @Date: 2021-10-12 10:11:24 + * @LastEditTime: 2021-10-15 11:56:55 + * @LastEditors: Please set LastEditors + * @Description: In User Settings Edit + * @FilePath: /data-show/src/views/BrandInsight/titsopo/opt.js + */ +export default function createOpt() { + return { + grid: { + left: 16, + right: 26, + bottom: 16, + top: 52, + containLabel: true + }, + tooltip: { + trigger: "axis", + backgroundColor: "#08182F", + color: "#fff", + borderColor: "#3373CC", + textStyle: { + color: "#fff", //设置文字颜色 + }, + extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;" + }, + legend: { + icon: 'roundRect', + textStyle: { //图例文字的样式 + color: '#fff' + }, + y: 12, + x: 16 + }, + xAxis: { + type: 'category', + boundaryGap: false, + axisTick: { + show: false, + }, + axisLine: { + show: false, + lineStyle: { + color: "#fff", + }, + }, + data: ['00:00', '04:00', '08:00', '12:00', '16:00', '20:00', '24:00'] + }, + yAxis: { + type: 'value', + axisLine: { + show: false, + lineStyle: { + color: "#fff", + }, + }, + splitLine: { + lineStyle: { + type: "dashed", // y轴分割线类型 + color: "#012b4b", + }, + }, + }, + series: [ + { + name: '奥迪', + type: 'line', + stack: 'Total', + symbol: 'none', + areaStyle: { + opacity: 0.4 + }, + emphasis: { + focus: 'series' + }, + data: [2000, 1600, 1000, 2200, 2300, 2100, 1900] + }, + { + name: '宝马', + type: 'line', + stack: 'Total', + symbol: 'none', + areaStyle: { + opacity: 0.4 + }, + emphasis: { + focus: 'series' + }, + data: [1000, 1100, 1300, 2000, 1800, 2100, 1600] + }, + { + name: '奔驰', + type: 'line', + stack: 'Total', + symbol: 'none', + areaStyle: { + opacity: 0.4 + }, + emphasis: { + focus: 'series' + }, + data: [1200, 1200, 1400, 2100, 1400, 1900, 2000] + }, + { + name: '吉利', + type: 'line', + stack: 'Total', + symbol: 'none', + areaStyle: { + opacity: 0.4 + }, + emphasis: { + focus: 'series' + }, + data: [1200, 1200, 1350, 1550, 1750, 1900, 2000] + }, + { + name: '大众', + type: 'line', + stack: 'Total', + symbol: 'none', + areaStyle: { + opacity: 0.4 + }, + emphasis: { + focus: 'series' + }, + data: [1260, 1280, 1390, 1570, 1790, 1950, 2020] + }, + { + name: '别克', + type: 'line', + stack: 'Total', + symbol: 'none', + areaStyle: { + opacity: 0.4 + }, + emphasis: { + focus: 'series' + }, + data: [1260, 1280, 1390, 1570, 1790, 1950, 2020] + }, + + ] + } +} diff --git a/src/views/ModelComparison/brandTonalDistribution/index.vue b/src/views/ModelComparison/brandTonalDistribution/index.vue new file mode 100644 index 0000000..2f02495 --- /dev/null +++ b/src/views/ModelComparison/brandTonalDistribution/index.vue @@ -0,0 +1,126 @@ + + + + + diff --git a/src/views/ModelComparison/brandTonalDistribution/roundata/index.vue b/src/views/ModelComparison/brandTonalDistribution/roundata/index.vue new file mode 100644 index 0000000..3151935 --- /dev/null +++ b/src/views/ModelComparison/brandTonalDistribution/roundata/index.vue @@ -0,0 +1,68 @@ + + + + diff --git a/src/views/ModelComparison/brandTonalDistribution/roundata/opt.js b/src/views/ModelComparison/brandTonalDistribution/roundata/opt.js new file mode 100644 index 0000000..853878b --- /dev/null +++ b/src/views/ModelComparison/brandTonalDistribution/roundata/opt.js @@ -0,0 +1,89 @@ +/* + * @Author: your name + * @Date: 2021-10-12 14:33:51 + * @LastEditTime: 2021-10-15 14:49:19 + * @LastEditors: Please set LastEditors + * @Description: In User Settings Edit + * @FilePath: /data-show/src/views/BrandInsight/weiboKol/opt.js + */ +import * as echarts from "echarts"; +function createData(obj = {}) { + if(JSON.stringify(obj) === '{}') { + return; + } + let arr = []; + for(let key in obj) { + let color = ""; + if(key === '正面') { + color = "#3373CC" + } else if(key === '负面') { + color = "#b38b14" + } else { + color = "#54BF93" + } + let o = { + value: obj[key], + name: key, + itemStyle: {color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{ + //给颜色设置渐变色 前面4个参数,给第一个设置1,第四个设置0 ,就是水平渐变 + //给第一个设置0,第四个设置1,就是垂直渐变 + offset: 0, + color: 'black' + }, { + offset: 1, + color: color + }])} + } + arr.push(o) + } + return arr + +} +export default function createOpt(obj = {}) { + let data = createData(obj) + return { + series: [ + { + name: 'Access From0', + type: 'pie', + radius: ['70%', '92%'], + avoidLabelOverlap: false, + label: { + show: false, + position: 'center', + lineHeight: 28 + }, + emphasis: { + label: { + show: true, + fontSize: '18', + color: "#ffff", + fontWeight: 'bold', + formatter: function(p) { + return `${p.data.name}\n${p.percent}%\n${p.data.value}` + } + } + }, + labelLine: { + show: false + }, + data: data + }, + { + name: 'Access From1', + type: 'pie', + radius: ['96%', '100%'], + avoidLabelOverlap: false, + label: { + show: false, + position: 'center' + }, + labelLine: { + show: false + }, + center: ['50%', '50%'],//边框位置 + data: data + } + ] + } +} diff --git a/src/views/ModelComparison/channelDistribution/index.vue b/src/views/ModelComparison/channelDistribution/index.vue new file mode 100644 index 0000000..420281c --- /dev/null +++ b/src/views/ModelComparison/channelDistribution/index.vue @@ -0,0 +1,78 @@ + + + + + + diff --git a/src/views/ModelComparison/channelDistribution/opt.js b/src/views/ModelComparison/channelDistribution/opt.js new file mode 100644 index 0000000..4326be4 --- /dev/null +++ b/src/views/ModelComparison/channelDistribution/opt.js @@ -0,0 +1,108 @@ +/* + * @Author: your name + * @Date: 2021-10-15 15:15:27 + * @LastEditTime: 2021-10-28 15:44:36 + * @LastEditors: Please set LastEditors + * @Description: In User Settings Edit + * @FilePath: /data-show/src/views/BrandComparison/channelDistribution/opt.js + */ +import { bigNumberTransform } from "@/utils/gol/dataTool" +let colors = ['#3373CC', '#63AECC', '#54BF93', '#CC9D12', '#CC7733', "#CC5B41", '#452b74', '#71686f'] +function createData(dataList = []) { + /*series: [ + { + name: '奥迪', + type: 'bar', + barGap: 0, + barWidth: 16, + emphasis: { + focus: 'series' + }, + data: [320, 332, 301, 334, 390, 400] + },*/ + let arr = []; + dataList.forEach(e => { + let o = { + name: e.Name, + type: 'bar', + barGap: 0, + barWidth: 16, + emphasis: { + focus: 'series' + }, + data: [e.Data.新闻,e.Data.论坛,e.Data.微信,e.Data.短视频,e.Data.微博,e.Data.其他] + }; + arr.push(o) + }) + return arr; +} +export default function createOpt(dataList = [],brandList = []) { + let info = createData(dataList); + return { + grid: { + top: "56px", + left: "16px", + right: "28px", + bottom: "16px", + containLabel: true, + }, + color: colors, + legend: { + data: brandList, + textStyle: { //图例文字的样式 + color: '#fff' + }, + y: 12, + x: 16 + }, + tooltip: { + trigger: "axis", + backgroundColor: "#08182F", + color: "#fff", + borderColor: "#3373CC", + textStyle: { + color: "#fff", //设置文字颜色 + }, + extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;", + }, + xAxis: [ + { + type: 'category', + axisTick: { + show: false, + }, + axisLine: { + show: false, + lineStyle: { + color: "#fff", + }, + }, + data: ['新闻', '论坛', '微信', 'APP', '微博', "其他"] + } + ], + yAxis: [ + { + type: 'value', + axisLine: { + show: false, + lineStyle: { + color: "#FFF", + }, + }, + axisLabel: { + formatter: (value) => { + let str = bigNumberTransform(value); + return str; + } + }, + splitLine: { + lineStyle: { + type: "dashed", // y轴分割线类型 + color: "#012b4b", + }, + }, + } + ], + series: info + } +} \ No newline at end of file diff --git a/src/views/ModelComparison/comparisonOfForumPostingTrends/index.vue b/src/views/ModelComparison/comparisonOfForumPostingTrends/index.vue new file mode 100644 index 0000000..a7bc716 --- /dev/null +++ b/src/views/ModelComparison/comparisonOfForumPostingTrends/index.vue @@ -0,0 +1,39 @@ + + + + + + diff --git a/src/views/ModelComparison/comparisonOfForumPostingTrends/opt.js b/src/views/ModelComparison/comparisonOfForumPostingTrends/opt.js new file mode 100644 index 0000000..346d8e9 --- /dev/null +++ b/src/views/ModelComparison/comparisonOfForumPostingTrends/opt.js @@ -0,0 +1,147 @@ +/* + * @Author: your name + * @Date: 2021-10-12 10:11:24 + * @LastEditTime: 2021-10-15 11:56:55 + * @LastEditors: Please set LastEditors + * @Description: In User Settings Edit + * @FilePath: /data-show/src/views/BrandInsight/titsopo/opt.js + */ +export default function createOpt() { + return { + grid: { + left: 16, + right: 26, + bottom: 16, + top: 52, + containLabel: true + }, + tooltip: { + trigger: "axis", + backgroundColor: "#08182F", + color: "#fff", + borderColor: "#3373CC", + textStyle: { + color: "#fff", //设置文字颜色 + }, + extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;" + }, + legend: { + icon: 'roundRect', + textStyle: { //图例文字的样式 + color: '#fff' + }, + y: 12, + x: 16 + }, + xAxis: { + type: 'category', + boundaryGap: false, + axisTick: { + show: false, + }, + axisLine: { + show: false, + lineStyle: { + color: "#fff", + }, + }, + data: ['00:00', '04:00', '08:00', '12:00', '16:00', '20:00', '24:00'] + }, + yAxis: { + type: 'value', + axisLine: { + show: false, + lineStyle: { + color: "#fff", + }, + }, + splitLine: { + lineStyle: { + type: "dashed", // y轴分割线类型 + color: "#012b4b", + }, + }, + }, + series: [ + { + name: '奥迪', + type: 'line', + stack: 'Total', + symbol: 'none', + areaStyle: { + opacity: 0.4 + }, + emphasis: { + focus: 'series' + }, + data: [2000, 1600, 1000, 2200, 2300, 2100, 1900] + }, + { + name: '宝马', + type: 'line', + stack: 'Total', + symbol: 'none', + areaStyle: { + opacity: 0.4 + }, + emphasis: { + focus: 'series' + }, + data: [1000, 1100, 1300, 2000, 1800, 2100, 1600] + }, + { + name: '奔驰', + type: 'line', + stack: 'Total', + symbol: 'none', + areaStyle: { + opacity: 0.4 + }, + emphasis: { + focus: 'series' + }, + data: [1200, 1200, 1400, 2100, 1400, 1900, 2000] + }, + { + name: '吉利', + type: 'line', + stack: 'Total', + symbol: 'none', + areaStyle: { + opacity: 0.4 + }, + emphasis: { + focus: 'series' + }, + data: [1200, 1200, 1350, 1550, 1750, 1900, 2000] + }, + { + name: '大众', + type: 'line', + stack: 'Total', + symbol: 'none', + areaStyle: { + opacity: 0.4 + }, + emphasis: { + focus: 'series' + }, + data: [1260, 1280, 1390, 1570, 1790, 1950, 2020] + }, + { + name: '别克', + type: 'line', + stack: 'Total', + symbol: 'none', + areaStyle: { + opacity: 0.4 + }, + emphasis: { + focus: 'series' + }, + data: [1260, 1280, 1390, 1570, 1790, 1950, 2020] + }, + + ] + } +} diff --git a/src/views/ModelComparison/comparisonOfNegativeTopicsInForums/index.vue b/src/views/ModelComparison/comparisonOfNegativeTopicsInForums/index.vue new file mode 100644 index 0000000..5d59340 --- /dev/null +++ b/src/views/ModelComparison/comparisonOfNegativeTopicsInForums/index.vue @@ -0,0 +1,88 @@ + + + + + + diff --git a/src/views/ModelComparison/comparisonOfPositiveTopicsInTheForum/index.vue b/src/views/ModelComparison/comparisonOfPositiveTopicsInTheForum/index.vue new file mode 100644 index 0000000..9fbbcd4 --- /dev/null +++ b/src/views/ModelComparison/comparisonOfPositiveTopicsInTheForum/index.vue @@ -0,0 +1,88 @@ + + + + + + diff --git a/src/views/ModelComparison/comparisonOfTheNumberOfWeiboInteractions/index.vue b/src/views/ModelComparison/comparisonOfTheNumberOfWeiboInteractions/index.vue new file mode 100644 index 0000000..358b069 --- /dev/null +++ b/src/views/ModelComparison/comparisonOfTheNumberOfWeiboInteractions/index.vue @@ -0,0 +1,82 @@ + + + + + diff --git a/src/views/ModelComparison/comparisonOfWeiboInformation/index.vue b/src/views/ModelComparison/comparisonOfWeiboInformation/index.vue new file mode 100644 index 0000000..6c56a71 --- /dev/null +++ b/src/views/ModelComparison/comparisonOfWeiboInformation/index.vue @@ -0,0 +1,83 @@ + + + + + + diff --git a/src/views/ModelComparison/forumTonalComparison/index.vue b/src/views/ModelComparison/forumTonalComparison/index.vue new file mode 100644 index 0000000..2a67133 --- /dev/null +++ b/src/views/ModelComparison/forumTonalComparison/index.vue @@ -0,0 +1,76 @@ + + + + + + diff --git a/src/views/ModelComparison/forumTonalComparison/roundata/index.vue b/src/views/ModelComparison/forumTonalComparison/roundata/index.vue new file mode 100644 index 0000000..eb00a88 --- /dev/null +++ b/src/views/ModelComparison/forumTonalComparison/roundata/index.vue @@ -0,0 +1,56 @@ + + + + diff --git a/src/views/ModelComparison/forumTonalComparison/roundata/opt.js b/src/views/ModelComparison/forumTonalComparison/roundata/opt.js new file mode 100644 index 0000000..72c0191 --- /dev/null +++ b/src/views/ModelComparison/forumTonalComparison/roundata/opt.js @@ -0,0 +1,115 @@ +/* + * @Author: your name + * @Date: 2021-10-12 14:33:51 + * @LastEditTime: 2021-10-15 14:49:19 + * @LastEditors: Please set LastEditors + * @Description: In User Settings Edit + * @FilePath: /data-show/src/views/BrandInsight/weiboKol/opt.js + */ +import * as echarts from "echarts"; +export default function createOpt() { + return { + series: [ + { + name: 'Access From0', + type: 'pie', + radius: ['70%', '92%'], + avoidLabelOverlap: false, + label: { + show: false, + position: 'center', + lineHeight: 40 + }, + emphasis: { + label: { + show: true, + fontSize: '20', + color: "#ffff", + fontWeight: 'bold', + formatter: function(p) { + return `${p.data.name}\n25%\n${p.data.value}` + } + } + }, + labelLine: { + show: false + }, + data: [ + { value: 2000, name: '正面', itemStyle: {color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{ + //给颜色设置渐变色 前面4个参数,给第一个设置1,第四个设置0 ,就是水平渐变 + //给第一个设置0,第四个设置1,就是垂直渐变 + offset: 0, + color: 'black' + }, { + offset: 1, + color: '#3373CC' + }])} }, + + { value: 1000, name: '中性', itemStyle: {color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{ + //给颜色设置渐变色 前面4个参数,给第一个设置1,第四个设置0 ,就是水平渐变 + //给第一个设置0,第四个设置1,就是垂直渐变 + offset: 0, + color: 'black' + }, { + offset: 1, + color: '#54BF93' + }])} }, + { value: 1000, name: '负面', itemStyle: {color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{ + //给颜色设置渐变色 前面4个参数,给第一个设置1,第四个设置0 ,就是水平渐变 + //给第一个设置0,第四个设置1,就是垂直渐变 + offset: 0, + color: 'black' + }, { + offset: 1, + color: '#b38b14' + }])} }, + ], + }, + { + name: 'Access From1', + type: 'pie', + radius: ['96%', '100%'], + avoidLabelOverlap: false, + label: { + show: false, + position: 'center' + }, + labelLine: { + show: false + }, + center: ['50%', '50%'],//边框位置 + data: [ + { value: 2000, name: '正面', itemStyle: {color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{ + //给颜色设置渐变色 前面4个参数,给第一个设置1,第四个设置0 ,就是水平渐变 + //给第一个设置0,第四个设置1,就是垂直渐变 + offset: 0, + color: 'black' + }, { + offset: 1, + color: '#3373CC' + }])} }, + + { value: 1000, name: '中性', itemStyle: {color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{ + //给颜色设置渐变色 前面4个参数,给第一个设置1,第四个设置0 ,就是水平渐变 + //给第一个设置0,第四个设置1,就是垂直渐变 + offset: 0, + color: 'black' + }, { + offset: 1, + color: '#54BF93' + }])} }, + { value: 1000, name: '负面', itemStyle: {color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{ + //给颜色设置渐变色 前面4个参数,给第一个设置1,第四个设置0 ,就是水平渐变 + //给第一个设置0,第四个设置1,就是垂直渐变 + offset: 0, + color: 'black' + }, { + offset: 1, + color: '#b38b14' + }])} }, + + ], + } + ] + } +} diff --git a/src/views/ModelComparison/index.vue b/src/views/ModelComparison/index.vue new file mode 100644 index 0000000..edc2c69 --- /dev/null +++ b/src/views/ModelComparison/index.vue @@ -0,0 +1,96 @@ + + + + + + diff --git a/src/views/ModelComparison/informationTrend/index.vue b/src/views/ModelComparison/informationTrend/index.vue new file mode 100644 index 0000000..46e6998 --- /dev/null +++ b/src/views/ModelComparison/informationTrend/index.vue @@ -0,0 +1,75 @@ + + + + + + diff --git a/src/views/ModelComparison/informationTrend/opt.js b/src/views/ModelComparison/informationTrend/opt.js new file mode 100644 index 0000000..1770030 --- /dev/null +++ b/src/views/ModelComparison/informationTrend/opt.js @@ -0,0 +1,109 @@ +/* + * @Author: your name + * @Date: 2021-10-12 10:11:24 + * @LastEditTime: 2021-10-15 11:56:55 + * @LastEditors: Please set LastEditors + * @Description: In User Settings Edit + * @FilePath: /data-show/src/views/BrandInsight/titsopo/opt.js + */ +import { bigNumberTransform } from "@/utils/gol/dataTool" +function createData(ds = []) { + let testData = {} + ds.forEach(item => { + item.forEach(val => { + if (testData[val.key] === undefined) { + testData[val.key] = { + name: val.key, + type: 'line', + symbol: 'none', + areaStyle: { + opacity: 0.2 + }, + emphasis: { + focus: 'series' + }, + data: [val.value] + } + } else { + testData[val.key].data.push(val.value) + } + }) + }) + let arr = []; + for(let key in testData) { + arr.push(testData[key]) + } + return arr +} +export default function createOpt(dx = [], ds = []) { + let data = createData(ds); + return { + grid: { + left: 16, + right: 26, + bottom: 16, + top: 52, + containLabel: true + }, + tooltip: { + trigger: "axis", + backgroundColor: "#08182F", + color: "#fff", + borderColor: "#3373CC", + textStyle: { + color: "#fff", //设置文字颜色 + }, + extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;" + }, + legend: { + icon: 'roundRect', + textStyle: { //图例文字的样式 + color: '#fff' + }, + y: 12, + x: 16 + }, + xAxis: { + type: 'category', + boundaryGap: false, + axisTick: { + show: false, + }, + axisLabel: { + formatter: (value) => { + let str = value.substring(10, 16) + return str; + } + }, + axisLine: { + show: false, + lineStyle: { + color: "#fff", + }, + }, + data: dx + }, + yAxis: { + type: 'value', + axisLine: { + show: false, + lineStyle: { + color: "#fff", + }, + }, + axisLabel: { + formatter: (value) => { + let str = bigNumberTransform(value); + return str; + } + }, + splitLine: { + lineStyle: { + type: "dashed", // y轴分割线类型 + color: "#012b4b", + }, + }, + }, + series: data + } +} diff --git a/src/views/ModelComparison/informationVolumeByChannel/index.vue b/src/views/ModelComparison/informationVolumeByChannel/index.vue new file mode 100644 index 0000000..4e3de9d --- /dev/null +++ b/src/views/ModelComparison/informationVolumeByChannel/index.vue @@ -0,0 +1,39 @@ + + + + + + diff --git a/src/views/ModelComparison/informationVolumeByChannel/opt.js b/src/views/ModelComparison/informationVolumeByChannel/opt.js new file mode 100644 index 0000000..5cb74e0 --- /dev/null +++ b/src/views/ModelComparison/informationVolumeByChannel/opt.js @@ -0,0 +1,126 @@ +/* + * @Author: your name + * @Date: 2021-10-15 15:15:27 + * @LastEditTime: 2021-10-15 17:44:34 + * @LastEditors: Please set LastEditors + * @Description: In User Settings Edit + * @FilePath: /data-show/src/views/BrandComparison/channelDistribution/opt.js + */ +export default function createOpt() { + return { + grid: { + top: "56px", + left: "16px", + right: "28px", + bottom: "16px", + containLabel: true, + }, + legend: { + data: ['奥迪', '宝马', '奔驰', '吉利', '大众', '别克'], + textStyle: { //图例文字的样式 + color: '#fff' + }, + y: 12, + x: 16 + }, + tooltip: { + trigger: "axis", + backgroundColor: "#08182F", + color: "#fff", + borderColor: "#3373CC", + textStyle: { + color: "#fff", //设置文字颜色 + }, + extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;", + }, + xAxis: [ + { + type: 'category', + axisTick: { + show: false, + }, + axisLine: { + show: false, + lineStyle: { + color: "#fff", + }, + }, + data: ['新闻', '论坛', '微信', 'APP', '微博', "其他"] + } + ], + yAxis: [ + { + type: 'value', + axisLine: { + show: false, + lineStyle: { + color: "#FFF", + }, + }, + splitLine: { + lineStyle: { + type: "dashed", // y轴分割线类型 + color: "#012b4b", + }, + }, + } + ], + series: [ + { + name: '奥迪', + type: 'bar', + barGap: 0, + barWidth: 16, + emphasis: { + focus: 'series' + }, + data: [320, 332, 301, 334, 390, 400] + }, + { + name: '宝马', + type: 'bar', + barWidth: 16, + emphasis: { + focus: 'series' + }, + data: [220, 182, 191, 234, 290, 300] + }, + { + name: '奔驰', + type: 'bar', + barWidth: 16, + emphasis: { + focus: 'series' + }, + data: [150, 232, 201, 154, 190, 200] + }, + { + name: '吉利', + type: 'bar', + barWidth: 16, + emphasis: { + focus: 'series' + }, + data: [98, 77, 101, 99, 40, 44] + }, + { + name: '大众', + type: 'bar', + barWidth: 16, + emphasis: { + focus: 'series' + }, + data: [198, 177, 101, 199, 140, 145] + }, + { + name: '别克', + type: 'bar', + barWidth: 16, + emphasis: { + focus: 'series' + }, + data: [298, 277, 201, 299, 240, 250] + } + ] + } +} \ No newline at end of file diff --git a/src/views/ModelComparison/keyMediaCommunicationComparison/index.vue b/src/views/ModelComparison/keyMediaCommunicationComparison/index.vue new file mode 100644 index 0000000..426e390 --- /dev/null +++ b/src/views/ModelComparison/keyMediaCommunicationComparison/index.vue @@ -0,0 +1,67 @@ + + + + + + diff --git a/src/views/ModelComparison/keyMediaCommunicationComparison/opt.js b/src/views/ModelComparison/keyMediaCommunicationComparison/opt.js new file mode 100644 index 0000000..0e27d1d --- /dev/null +++ b/src/views/ModelComparison/keyMediaCommunicationComparison/opt.js @@ -0,0 +1,127 @@ +/* + * @Author: your name + * @Date: 2021-10-09 11:01:19 + * @LastEditTime: 2021-10-15 15:51:52 + * @LastEditors: Please set LastEditors + * @Description: In User Settings Edit + * @FilePath: /data-show/src/views/Index/spreadTheSound/opt.js + */ +export default function createOpt() { + return { + grid: { + left: 16, + right: 16, + bottom: 16, + top: 56, + containLabel: true + }, + tooltip: { + trigger: "axis", + backgroundColor: "#08182F", + color: "#fff", + borderColor: "#3373CC", + textStyle: { + color: "#fff", //设置文字颜色 + }, + extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;" + }, + legend: { + textStyle: { //图例文字的样式 + color: '#fff' + }, + y: 10, + x: 16 + }, + xAxis: { + type: 'category', + axisTick: { + show: false, + }, + axisLine: { + show: false, + lineStyle: { + color: "#fff", + }, + }, + data: ['汽车之家', '懂车帝', '腾讯新闻', '凤凰网', '新浪微博'] + }, + yAxis: { + type: 'value', + axisLine: { + show: false, + lineStyle: { + color: "#fff", + }, + }, + splitLine: { + lineStyle: { + type: "dashed", // y轴分割线类型 + color: "#012b4b", + }, + }, + }, + series: [ + { + name: '奥迪', + type: 'bar', + stack: 'total', + barWidth: 24, + emphasis: { + focus: 'series' + }, + data: [320, 302, 301, 334, 390] + }, + { + name: '宝马', + type: 'bar', + stack: 'total', + barWidth: 24, + emphasis: { + focus: 'series' + }, + data: [120, 132, 101, 134, 90] + }, + { + name: '奔驰', + type: 'bar', + stack: 'total', + barWidth: 24, + emphasis: { + focus: 'series' + }, + data: [220, 182, 191, 234, 290] + }, + { + name: '吉利', + type: 'bar', + stack: 'total', + barWidth: 24, + emphasis: { + focus: 'series' + }, + data: [150, 212, 201, 154, 190] + }, + { + name: '大众', + type: 'bar', + stack: 'total', + barWidth: 24, + emphasis: { + focus: 'series' + }, + data: [820, 832, 901, 934, 1290] + }, + { + name: '别克', + type: 'bar', + stack: 'total', + barWidth: 24, + emphasis: { + focus: 'series' + }, + data: [820, 832, 901, 934, 1290] + } + ] + } + +} \ No newline at end of file diff --git a/src/views/ModelComparison/overallInformation/index.vue b/src/views/ModelComparison/overallInformation/index.vue new file mode 100644 index 0000000..fc93ee6 --- /dev/null +++ b/src/views/ModelComparison/overallInformation/index.vue @@ -0,0 +1,79 @@ + + + + + + diff --git a/src/views/ModelComparison/overallNumberOfInteractions/index.vue b/src/views/ModelComparison/overallNumberOfInteractions/index.vue new file mode 100644 index 0000000..43b11fd --- /dev/null +++ b/src/views/ModelComparison/overallNumberOfInteractions/index.vue @@ -0,0 +1,79 @@ + + + + + + diff --git a/src/views/ModelComparison/overallWordCloudComparison/index.vue b/src/views/ModelComparison/overallWordCloudComparison/index.vue new file mode 100644 index 0000000..e843743 --- /dev/null +++ b/src/views/ModelComparison/overallWordCloudComparison/index.vue @@ -0,0 +1,130 @@ + + + + + + diff --git a/src/views/ModelComparison/overallWordCloudComparison/opt.js b/src/views/ModelComparison/overallWordCloudComparison/opt.js new file mode 100644 index 0000000..296dcc1 --- /dev/null +++ b/src/views/ModelComparison/overallWordCloudComparison/opt.js @@ -0,0 +1,215 @@ +/* + * @Author: your name + * @Date: 2021-10-09 13:35:13 + * @LastEditTime: 2021-10-15 17:23:18 + * @LastEditors: Please set LastEditors + * @Description: In User Settings Edit + * @FilePath: /data-show/src/views/Index/hotDiscussionGraph/opt.js + */ +// import * as echarts from "echarts"; +const dataBJ = [ + [1, 55, 9, 56, 0.46, 18, 6, '良'], + [2, 25, 11, 21, 0.65, 34, 9, '优'], + [3, 56, 7, 63, 0.3, 14, 5, '良'], + [4, 33, 7, 29, 0.33, 16, 6, '优'], + [5, 42, 24, 44, 0.76, 40, 16, '优'], + [6, 82, 58, 90, 1.77, 68, 33, '良'], + [7, 74, 49, 77, 1.46, 48, 27, '良'], + [8, 78, 55, 80, 1.29, 59, 29, '良'], + [9, 267, 216, 280, 4.8, 108, 64, '重度污染'], + // [10, 185, 127, 216, 2.52, 61, 27, '中度污染'], + // [11, 39, 19, 38, 0.57, 31, 15, '优'], + // [12, 41, 11, 40, 0.43, 21, 7, '优'], + // [13, 64, 38, 74, 1.04, 46, 22, '良'], + // [14, 108, 79, 120, 1.7, 75, 41, '轻度污染'], + // [15, 108, 63, 116, 1.48, 44, 26, '轻度污染'], + // [16, 33, 6, 29, 0.34, 13, 5, '优'], + // [17, 94, 66, 110, 1.54, 62, 31, '良'], + // [18, 186, 142, 192, 3.88, 93, 79, '中度污染'], + // [19, 57, 31, 54, 0.96, 32, 14, '良'], + // [20, 22, 8, 17, 0.48, 23, 10, '优'], + // [21, 39, 15, 36, 0.61, 29, 13, '优'], + // [22, 94, 69, 114, 2.08, 73, 39, '良'], + // [23, 99, 73, 110, 2.43, 76, 48, '良'], + // [24, 31, 12, 30, 0.5, 32, 16, '优'], + // [25, 42, 27, 43, 1, 53, 22, '优'], + // [26, 154, 117, 157, 3.05, 92, 58, '中度污染'], + // [27, 234, 185, 230, 4.09, 123, 69, '重度污染'], + // [28, 160, 120, 186, 2.77, 91, 50, '中度污染'], + // [29, 134, 96, 165, 2.76, 83, 41, '轻度污染'], + // [30, 52, 24, 60, 1.03, 50, 21, '良'], + // [31, 46, 5, 49, 0.28, 10, 6, '优'] + ]; + const dataGZ = [ + [1, 26, 37, 27, 1.163, 27, 13, '优'], + [2, 85, 62, 71, 1.195, 60, 8, '良'], + [3, 78, 38, 74, 1.363, 37, 7, '良'], + [4, 21, 21, 36, 0.634, 40, 9, '优'], + [5, 41, 42, 46, 0.915, 81, 13, '优'], + // [6, 56, 52, 69, 1.067, 92, 16, '良'], + // [7, 64, 30, 28, 0.924, 51, 2, '良'], + // [8, 55, 48, 74, 1.236, 75, 26, '良'], + // [9, 76, 85, 113, 1.237, 114, 27, '良'], + // [10, 91, 81, 104, 1.041, 56, 40, '良'], + // [11, 84, 39, 60, 0.964, 25, 11, '良'], + // [12, 64, 51, 101, 0.862, 58, 23, '良'], + // [13, 70, 69, 120, 1.198, 65, 36, '良'], + // [14, 77, 105, 178, 2.549, 64, 16, '良'], + // [15, 109, 68, 87, 0.996, 74, 29, '轻度污染'], + // [16, 73, 68, 97, 0.905, 51, 34, '良'], + // [17, 54, 27, 47, 0.592, 53, 12, '良'], + // [18, 51, 61, 97, 0.811, 65, 19, '良'], + // [19, 91, 71, 121, 1.374, 43, 18, '良'], + // [20, 73, 102, 182, 2.787, 44, 19, '良'], + // [21, 73, 50, 76, 0.717, 31, 20, '良'], + // [22, 84, 94, 140, 2.238, 68, 18, '良'], + // [23, 93, 77, 104, 1.165, 53, 7, '良'], + // [24, 99, 130, 227, 3.97, 55, 15, '良'], + // [25, 146, 84, 139, 1.094, 40, 17, '轻度污染'], + // [26, 113, 108, 137, 1.481, 48, 15, '轻度污染'], + // [27, 81, 48, 62, 1.619, 26, 3, '良'], + // [28, 56, 48, 68, 1.336, 37, 9, '良'], + // [29, 82, 92, 174, 3.29, 0, 13, '良'], + // [30, 106, 116, 188, 3.628, 101, 16, '轻度污染'], + // [31, 118, 50, 0, 1.383, 76, 11, '轻度污染'] + ]; + const dataSH = [ + [1, 91, 45, 125, 0.82, 34, 23, '良'], + [2, 65, 27, 78, 0.86, 45, 29, '良'], + [3, 83, 60, 84, 1.09, 73, 27, '良'], + [4, 109, 81, 121, 1.28, 68, 51, '轻度污染'], + [5, 106, 77, 114, 1.07, 55, 51, '轻度污染'], + // [6, 109, 81, 121, 1.28, 68, 51, '轻度污染'], + // [7, 106, 77, 114, 1.07, 55, 51, '轻度污染'], + // [8, 89, 65, 78, 0.86, 51, 26, '良'], + // [9, 53, 33, 47, 0.64, 50, 17, '良'], + // [10, 80, 55, 80, 1.01, 75, 24, '良'], + // [11, 117, 81, 124, 1.03, 45, 24, '轻度污染'], + // [12, 99, 71, 142, 1.1, 62, 42, '良'], + // [13, 95, 69, 130, 1.28, 74, 50, '良'], + // [14, 116, 87, 131, 1.47, 84, 40, '轻度污染'], + // [15, 108, 80, 121, 1.3, 85, 37, '轻度污染'], + // [16, 134, 83, 167, 1.16, 57, 43, '轻度污染'], + // [17, 79, 43, 107, 1.05, 59, 37, '良'], + // [18, 71, 46, 89, 0.86, 64, 25, '良'], + // [19, 97, 71, 113, 1.17, 88, 31, '良'], + // [20, 84, 57, 91, 0.85, 55, 31, '良'], + // [21, 87, 63, 101, 0.9, 56, 41, '良'], + // [22, 104, 77, 119, 1.09, 73, 48, '轻度污染'], + // [23, 87, 62, 100, 1, 72, 28, '良'], + // [24, 168, 128, 172, 1.49, 97, 56, '中度污染'], + // [25, 65, 45, 51, 0.74, 39, 17, '良'], + // [26, 39, 24, 38, 0.61, 47, 17, '优'], + // [27, 39, 24, 39, 0.59, 50, 19, '优'], + // [28, 93, 68, 96, 1.05, 79, 29, '良'], + // [29, 188, 143, 197, 1.66, 99, 51, '中度污染'], + // [30, 174, 131, 174, 1.55, 108, 50, '中度污染'], + // [31, 187, 143, 201, 1.39, 89, 53, '中度污染'] + ]; +// const schema = [ +// { name: 'date', index: 0, text: '日' }, +// { name: 'AQIindex', index: 1, text: 'AQI指数' }, +// { name: 'PM25', index: 2, text: 'PM2.5' }, +// { name: 'PM10', index: 3, text: 'PM10' }, +// { name: 'CO', index: 4, text: '一氧化碳(CO)' }, +// { name: 'NO2', index: 5, text: '二氧化氮(NO2)' }, +// { name: 'SO2', index: 6, text: '二氧化硫(SO2)' } +// ]; + const itemStyle = { + opacity: 0.8, + shadowBlur: 10, + shadowOffsetX: 0, + shadowOffsetY: 0, + shadowColor: 'rgba(0,0,0,0.3)' + }; +export default function createOpt() { + return { + grid: { + top: "16px", + left: "16px", + right: "16px", + bottom: "16px", + containLabel: true, + }, + tooltip: { + backgroundColor: "#08182F", + color: "#fff", + borderColor: "#3373CC", + textStyle: { + color: "#fff", //设置文字颜色 + }, + extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;", + formatter: function(param) { + let value = param.value; + return `${value[value.length - 1]}
${value[0]}` + } + }, + xAxis: { + show: false, + type: 'value', + splitLine: { + lineStyle: { + type: 'dashed' + } + } + }, + yAxis: { + show: false, + type: 'value', + splitLine: { + lineStyle: { + type: 'dashed' + } + }, + scale: true + }, + series: [{ + name: '北京', + data: dataBJ, + type: 'scatter', + symbolSize: function (data) { + return data[2] + }, + label: { + show: true, + color: "#FFF", + formatter: function (param) { + return param.data[param.data.length - 1]; + }, + }, + itemStyle: itemStyle + }, { + name: '上海', + data: dataSH, + type: 'scatter', + symbolSize: function (data) { + return data[2] + }, + label: { + show: true, + color: "#FFF", + formatter: function (param) { + return param.data[param.data.length - 1]; + }, + }, + itemStyle: itemStyle + }, + { + name: '广州', + data: dataGZ, + type: 'scatter', + symbolSize: function (data) { + return data[2] + }, + label: { + show: true, + color: "#FFF", + formatter: function (param) { + return param.data[param.data.length - 1]; + }, + }, + itemStyle: itemStyle + } + ] + } +} diff --git a/src/views/ModelComparison/summaryAndComparisonOfForumInformation/index.vue b/src/views/ModelComparison/summaryAndComparisonOfForumInformation/index.vue new file mode 100644 index 0000000..e39cdb7 --- /dev/null +++ b/src/views/ModelComparison/summaryAndComparisonOfForumInformation/index.vue @@ -0,0 +1,146 @@ + + + + + + diff --git a/src/views/ModelComparison/tailTOPMedia/index.vue b/src/views/ModelComparison/tailTOPMedia/index.vue new file mode 100644 index 0000000..4e0ea5b --- /dev/null +++ b/src/views/ModelComparison/tailTOPMedia/index.vue @@ -0,0 +1,91 @@ + + + + + + + diff --git a/src/views/ModelComparison/userAreaDistribution/index.vue b/src/views/ModelComparison/userAreaDistribution/index.vue new file mode 100644 index 0000000..a5c7ca1 --- /dev/null +++ b/src/views/ModelComparison/userAreaDistribution/index.vue @@ -0,0 +1,98 @@ + + + + + + diff --git a/src/views/ModelComparison/userAreaDistribution/opt1.js b/src/views/ModelComparison/userAreaDistribution/opt1.js new file mode 100644 index 0000000..02ca558 --- /dev/null +++ b/src/views/ModelComparison/userAreaDistribution/opt1.js @@ -0,0 +1,75 @@ + + +/* + * @Author: your name + * @Date: 2021-10-09 12:38:34 + * @LastEditTime: 2021-10-14 11:48:19 + * @LastEditors: Please set LastEditors + * @Description: In User Settings Edit + * @FilePath: /data-show/src/views/Index/tailInsight/opt.js + */ +import * as echarts from "echarts"; +export default function createOptD1() { + return { + grid: { + left: '4%', + right: '4%', + bottom: '4%', + top: "1%", + containLabel: true + }, + tooltip: { + trigger: "axis", + backgroundColor: "#08182F", + color: "#fff", + borderColor: "#3373CC", + textStyle: { + color: "#fff", //设置文字颜色 + }, + extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;" + }, + xAxis: { + type: 'value', + axisLine: { + show: false, + lineStyle: { + color: "#fff", + }, + }, + splitLine: { + lineStyle: { + type: "dashed", // y轴分割线类型 + color: "#012b4b", + }, + }, + }, + yAxis: { + type: 'category', + data: ['山西省', '浙江省', '北京市', '江西省', '江苏省', '福建省', '山东省', '天津市'], + axisTick: { + show: false, + }, + axisLine: { + show: false, + lineStyle: { + color: "#fff", + }, + }, + }, + series: [ + { + name: '2011', + type: 'bar', + barWidth: 24, + data: [500, 1000, 2220, 3000, 4000, 3000,2200, 2600], + color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{ + offset: 0, + color: '#010B19' + }, { + offset: 1, + color: '#2f68b4' + }]), + } + ] + } +} diff --git a/src/views/ModelComparison/userAreaDistribution/opt2.js b/src/views/ModelComparison/userAreaDistribution/opt2.js new file mode 100644 index 0000000..178233f --- /dev/null +++ b/src/views/ModelComparison/userAreaDistribution/opt2.js @@ -0,0 +1,134 @@ +/* + * @Author: your name + * @Date: 2021-10-14 11:53:16 + * @LastEditTime: 2021-10-14 15:51:30 + * @LastEditors: Please set LastEditors + * @Description: In User Settings Edit + * @FilePath: /data-show/src/views/WeiboDetails/weiboUserActiveArea/opt2.js + */ +const ini_data = [];//初始化省份数组 +const provArr = ['河北', '河南', '云南', '辽宁', '黑龙江', '湖南', '安徽', '山东']; +//正则省份,将省与市的字眼去掉,框架不识别 +for (var i = 0; i < provArr.length; i++) { + var str = provArr[i]; + var re = /省|市/g; //全局匹配 + var str2 = { name: str.replace(re, ''), value: 5 };//拼接对象数组 + ini_data.push(str2); +} +export default function createOptD2() { + return { + tooltip: { + trigger: "item", + backgroundColor: "#08182F", + color: "#fff", + borderColor: "#3373CC", + textStyle: { + color: "#fff", //设置文字颜色 + }, + extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;" + }, + // geo: { + // show: true, + // map: 'china', + // roam: false,//地图设置不可拖拽,固定的 + // itemStyle: { + // normal: { + // borderWidth: 0, + // shadowColor: 'rgba(0,54,255, 1)', + // shadowBlur: 100 + // } + // } + // }, + visualMap: { + type: 'continuous', + show: false, + min: 0, + max: 2000, + text: ['高', '低'], + orient: 'horizontal', + itemWidth: 15, + itemHeight: 200, + right: 0, + bottom: 30, + inRange: { + color: ['#0393d2', '#75ddff'] + }, + textStyle: { + color: 'white' + } + }, + series: [ + { + name: "微博区域", + type: "map", + mapType: "china", + roam: false, + zoom: 1,//默认地图在容器中显示zoom:1,可根据需求放大缩小地图 + left: 16, + top: 20, + right: 10, + bottom: 10, + selectedMode:'multiple', + colorBy: 'data', + itemStyle: { + areaColor: '#001f5b',//地图区域背景颜色 + borderColor: '#005cf9',//地图边界颜色 + shadowColor: '#005cf9', + emphasis: { + areaColor: '#3066ba',//鼠标滑过区域颜色 + label: { + color: '#fff' + } + } + }, + label: { + normal: { + show: false + }, + }, + + // select: { + // label: { + // show: false + // }, + // itemStyle: { + // areaColor: '#3edffe' + // } + // }, + data: [ + { + name: "河北省", + value: 1000, + // selected: true, + }, + { + name: "浙江省", + value: 1100, + // selected: true + }, + { + name: "山东省", + value: 1200, + // selected: true + }, + { + name: "山西省", + value: 1300, + // selected: true + }, + { + name: "上海市", + value: 1400, + // selected: true + }, + { + name: "江苏省", + value: 1500, + // selected: true + } + ] + + } + ] + } +} diff --git a/src/views/ModelComparison/weiboBigVComparison/index.vue b/src/views/ModelComparison/weiboBigVComparison/index.vue new file mode 100644 index 0000000..f16b1f6 --- /dev/null +++ b/src/views/ModelComparison/weiboBigVComparison/index.vue @@ -0,0 +1,76 @@ + + + + + diff --git a/src/views/ModelComparison/weiboBigVComparison/opt.js b/src/views/ModelComparison/weiboBigVComparison/opt.js new file mode 100644 index 0000000..73914a7 --- /dev/null +++ b/src/views/ModelComparison/weiboBigVComparison/opt.js @@ -0,0 +1,99 @@ +/* + * @Author: your name + * @Date: 2021-10-09 11:01:19 + * @LastEditTime: 2021-10-16 10:42:52 + * @LastEditors: Please set LastEditors + * @Description: In User Settings Edit + * @FilePath: /data-show/src/views/Index/spreadTheSound/opt.js + */ +/* +series: [ + { + name: '奥迪', + type: 'bar', + stack: 'total', + barWidth: 24, + emphasis: { + focus: 'series' + }, + data: [320, 302, 301, 334, 390] + }, +*/ +function createData(dataList = []) { + let arr = []; + dataList.forEach(ele => { + let o = { + name: ele.key, + type: 'bar', + stack: 'total', + barWidth: 24, + emphasis: { + focus: 'series' + }, + //索引各类型大v的值,0表示名人,1表示政府,2表示企业,3表示媒体,4表示个人大V + data: [ele.value[0].value, ele.value[3].value, ele.value[2].value, ele.value[1].value, ele.value[4].value] + }; + arr.push(o); + }) + return arr; +} + +export default function createOpt(dataList = []) { + let info = createData(dataList); + return { + grid: { + left: 16, + right: 16, + bottom: 16, + top: 56, + containLabel: true + }, + tooltip: { + trigger: "axis", + backgroundColor: "#08182F", + color: "#fff", + borderColor: "#3373CC", + textStyle: { + color: "#fff", //设置文字颜色 + }, + extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;" + }, + legend: { + textStyle: { //图例文字的样式 + color: '#fff' + }, + y: 10, + x: 16 + }, + xAxis: { + type: 'category', + axisTick: { + show: false, + }, + axisLine: { + show: false, + lineStyle: { + color: "#fff", + }, + }, + data: ['名人', '媒体', '企业', '政府', '个人大v'] + }, + yAxis: { + type: 'value', + axisLine: { + show: false, + lineStyle: { + color: "#fff", + }, + }, + splitLine: { + lineStyle: { + type: "dashed", // y轴分割线类型 + color: "#012b4b", + }, + }, + }, + series: info + } + +} \ No newline at end of file diff --git a/src/views/ModelComparison/weiboContentDirectionComparison/index.vue b/src/views/ModelComparison/weiboContentDirectionComparison/index.vue new file mode 100644 index 0000000..e1cca02 --- /dev/null +++ b/src/views/ModelComparison/weiboContentDirectionComparison/index.vue @@ -0,0 +1,137 @@ + + + + + diff --git a/src/views/ModelComparison/weiboContentDirectionComparison/v-ranking-bcm/index.vue b/src/views/ModelComparison/weiboContentDirectionComparison/v-ranking-bcm/index.vue new file mode 100644 index 0000000..3760c07 --- /dev/null +++ b/src/views/ModelComparison/weiboContentDirectionComparison/v-ranking-bcm/index.vue @@ -0,0 +1,232 @@ + + + + + + diff --git a/src/views/ModelComparison/weiboTuneComparison/index.vue b/src/views/ModelComparison/weiboTuneComparison/index.vue new file mode 100644 index 0000000..0b8bb95 --- /dev/null +++ b/src/views/ModelComparison/weiboTuneComparison/index.vue @@ -0,0 +1,131 @@ + + + + + + diff --git a/src/views/ModelComparison/weiboTuneComparison/wbRoundata/index.vue b/src/views/ModelComparison/weiboTuneComparison/wbRoundata/index.vue new file mode 100644 index 0000000..da4459e --- /dev/null +++ b/src/views/ModelComparison/weiboTuneComparison/wbRoundata/index.vue @@ -0,0 +1,68 @@ + + + + diff --git a/src/views/ModelComparison/weiboTuneComparison/wbRoundata/opt.js b/src/views/ModelComparison/weiboTuneComparison/wbRoundata/opt.js new file mode 100644 index 0000000..9006c30 --- /dev/null +++ b/src/views/ModelComparison/weiboTuneComparison/wbRoundata/opt.js @@ -0,0 +1,90 @@ +/* + * @Author: your name + * @Date: 2021-10-12 14:33:51 + * @LastEditTime: 2021-10-15 14:49:19 + * @LastEditors: Please set LastEditors + * @Description: In User Settings Edit + * @FilePath: /data-show/src/views/BrandInsight/weiboKol/opt.js + */ +import * as echarts from "echarts"; +function createData(obj = {}) { + if (JSON.stringify(obj) === '{}') { + return; + } + let arr = []; + for (let key in obj) { + let color = ""; + if (key === '正面') { + color = "#3373CC" + } else if (key === '负面') { + color = "#b38b14" + } else { + color = "#54BF93" + } + let o = { + value: obj[key], + name: key, + itemStyle: { + color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{ + //给颜色设置渐变色 前面4个参数,给第一个设置1,第四个设置0 ,就是水平渐变 + //给第一个设置0,第四个设置1,就是垂直渐变 + offset: 0, + color: 'black' + }, { + offset: 1, + color: color + }]) + } + } + arr.push(o) + } + return arr +} +export default function createOpt(obj={}) { + let data = createData(obj); + return { + series: [ + { + name: 'Access From0', + type: 'pie', + radius: ['70%', '92%'], + avoidLabelOverlap: false, + label: { + show: false, + position: 'center', + lineHeight: 28 + }, + emphasis: { + label: { + show: true, + fontSize: '18', + color: "#ffff", + fontWeight: 'bold', + formatter: function (p) { + return `${p.data.name}\n${p.percent}%\n${p.data.value}` + } + } + }, + labelLine: { + show: false + }, + data: data + }, + { + name: 'Access From1', + type: 'pie', + radius: ['96%', '100%'], + avoidLabelOverlap: false, + label: { + show: false, + position: 'center' + }, + labelLine: { + show: false + }, + center: ['50%', '50%'],//边框位置 + data: data + } + ] + } +} diff --git a/src/views/ModelComparison/weiboUserPortrait/index.vue b/src/views/ModelComparison/weiboUserPortrait/index.vue new file mode 100644 index 0000000..7ac5dc3 --- /dev/null +++ b/src/views/ModelComparison/weiboUserPortrait/index.vue @@ -0,0 +1,81 @@ + + + + + + diff --git a/src/views/ModelComparison/weiboUserPortrait/opt1.js b/src/views/ModelComparison/weiboUserPortrait/opt1.js new file mode 100644 index 0000000..fd6dbf6 --- /dev/null +++ b/src/views/ModelComparison/weiboUserPortrait/opt1.js @@ -0,0 +1,114 @@ +/* + * @Author: your name + * @Date: 2021-10-12 15:14:58 + * @LastEditTime: 2021-10-14 10:43:47 + * @LastEditors: Please set LastEditors + * @Description: In User Settings Edit + * @FilePath: /data-show/src/views/BrandInsight/weiboPortraits/opt.js + */ +import * as echarts from "echarts"; +export default function createOpt1() { + return { + series: [ + { + name: 'Access From0', + type: 'pie', + radius: ['63%', '77%'], + avoidLabelOverlap: false, + label: { + show: false, + position: 'center', + fontSize: '40', + color: "#ffff", + }, + emphasis: { + label: { + show: true, + fontSize: '40', + color: "#ffff", + formatter: (p)=>{ + return p.data.name + '\n' + p.data.value; + }, + } + }, + labelLine: { + show: false + }, + data: [ + { value: 2200, name: '男性', itemStyle: {color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{ + //给颜色设置渐变色 前面4个参数,给第一个设置1,第四个设置0 ,就是水平渐变 + //给第一个设置0,第四个设置1,就是垂直渐变 + offset: 0, + color: 'black' + }, { + offset: 1, + color: '#3373CC' + }])} }, + { value: 2200, name: '女性', itemStyle: {color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{ + //给颜色设置渐变色 前面4个参数,给第一个设置1,第四个设置0 ,就是水平渐变 + //给第一个设置0,第四个设置1,就是垂直渐变 + offset: 0, + color: 'black' + }, { + offset: 1, + color: '#CC9D12' + }])} }, + { value: 2200, name: '未知', itemStyle: {color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{ + //给颜色设置渐变色 前面4个参数,给第一个设置1,第四个设置0 ,就是水平渐变 + //给第一个设置0,第四个设置1,就是垂直渐变 + offset: 0, + color: 'black' + }, { + offset: 1, + color: '#54BF93' + }])} }, + ], + + }, + { + name: 'Access From1', + type: 'pie', + radius: ['80%', '84%'], + avoidLabelOverlap: false, + label: { + show: false, + position: 'center' + }, + labelLine: { + show: false + }, + center: ['50%', '50%'],//边框位置 + data: [ + { value: 2200, name: '男性', itemStyle: {color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{ + //给颜色设置渐变色 前面4个参数,给第一个设置1,第四个设置0 ,就是水平渐变 + //给第一个设置0,第四个设置1,就是垂直渐变 + offset: 0, + color: 'black' + }, { + offset: 1, + color: '#3373CC' + }])} }, + { value: 2200, name: '女性', itemStyle: {color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{ + //给颜色设置渐变色 前面4个参数,给第一个设置1,第四个设置0 ,就是水平渐变 + //给第一个设置0,第四个设置1,就是垂直渐变 + offset: 0, + color: 'black' + }, { + offset: 1, + color: '#CC9D12' + }])} }, + { value: 2200, name: '未知', itemStyle: {color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{ + //给颜色设置渐变色 前面4个参数,给第一个设置1,第四个设置0 ,就是水平渐变 + //给第一个设置0,第四个设置1,就是垂直渐变 + offset: 0, + color: 'black' + }, { + offset: 1, + color: '#54BF93' + }])} }, + ], + + } + ] + } +} diff --git a/src/views/ModelComparison/weiboUserPortrait/opt2.js b/src/views/ModelComparison/weiboUserPortrait/opt2.js new file mode 100644 index 0000000..eab17f6 --- /dev/null +++ b/src/views/ModelComparison/weiboUserPortrait/opt2.js @@ -0,0 +1,114 @@ +/* + * @Author: your name + * @Date: 2021-10-12 15:14:58 + * @LastEditTime: 2021-10-16 11:53:25 + * @LastEditors: Please set LastEditors + * @Description: In User Settings Edit + * @FilePath: /data-show/src/views/BrandInsight/weiboPortraits/opt.js + */ +import * as echarts from "echarts"; +export default function createOpt2() { + return { + series: [ + { + name: 'Access From0', + type: 'pie', + radius: ['63%', '77%'], + avoidLabelOverlap: false, + label: { + show: false, + position: 'center', + fontSize: '40', + color: "#ffff", + }, + emphasis: { + label: { + show: true, + fontSize: '40', + color: "#ffff", + formatter: (p)=>{ + return p.data.name + '\n' + p.data.value; + }, + } + }, + labelLine: { + show: false + }, + data: [ + { value: 2200, name: '已认证', itemStyle: {color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{ + //给颜色设置渐变色 前面4个参数,给第一个设置1,第四个设置0 ,就是水平渐变 + //给第一个设置0,第四个设置1,就是垂直渐变 + offset: 0, + color: 'black' + }, { + offset: 1, + color: '#3373CC' + }])} }, + { value: 2200, name: '未认证', itemStyle: {color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{ + //给颜色设置渐变色 前面4个参数,给第一个设置1,第四个设置0 ,就是水平渐变 + //给第一个设置0,第四个设置1,就是垂直渐变 + offset: 0, + color: 'black' + }, { + offset: 1, + color: '#CC9D12' + }])} }, + { value: 2200, name: '未知', itemStyle: {color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{ + //给颜色设置渐变色 前面4个参数,给第一个设置1,第四个设置0 ,就是水平渐变 + //给第一个设置0,第四个设置1,就是垂直渐变 + offset: 0, + color: 'black' + }, { + offset: 1, + color: '#54BF93' + }])} }, + ], + + }, + { + name: 'Access From1', + type: 'pie', + radius: ['80%', '84%'], + avoidLabelOverlap: false, + label: { + show: false, + position: 'center' + }, + labelLine: { + show: false + }, + center: ['50%', '50%'],//边框位置 + data: [ + { value: 2200, name: '男性', itemStyle: {color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{ + //给颜色设置渐变色 前面4个参数,给第一个设置1,第四个设置0 ,就是水平渐变 + //给第一个设置0,第四个设置1,就是垂直渐变 + offset: 0, + color: 'black' + }, { + offset: 1, + color: '#3373CC' + }])} }, + { value: 2200, name: '女性', itemStyle: {color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{ + //给颜色设置渐变色 前面4个参数,给第一个设置1,第四个设置0 ,就是水平渐变 + //给第一个设置0,第四个设置1,就是垂直渐变 + offset: 0, + color: 'black' + }, { + offset: 1, + color: '#CC9D12' + }])} }, + { value: 2200, name: '未知', itemStyle: {color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{ + //给颜色设置渐变色 前面4个参数,给第一个设置1,第四个设置0 ,就是水平渐变 + //给第一个设置0,第四个设置1,就是垂直渐变 + offset: 0, + color: 'black' + }, { + offset: 1, + color: '#54BF93' + }])} }, + ], + + } + ] + } +} diff --git a/src/views/ModelInsight/index.vue b/src/views/ModelInsight/index.vue index 74a3d29..8eb1417 100644 --- a/src/views/ModelInsight/index.vue +++ b/src/views/ModelInsight/index.vue @@ -1,7 +1,7 @@ diff --git a/src/views/ModelForumDetails/FollowPostUserActiveArea/index.vue b/src/views/ModelForumDetails/FollowPostUserActiveArea/index.vue index 357825c..970677b 100644 --- a/src/views/ModelForumDetails/FollowPostUserActiveArea/index.vue +++ b/src/views/ModelForumDetails/FollowPostUserActiveArea/index.vue @@ -1,7 +1,7 @@ diff --git a/src/views/ModelForumDetails/MainPostIDModelAnalysis/index.vue b/src/views/ModelForumDetails/MainPostIDModelAnalysis/index.vue index 4fce04b..27072bd 100644 --- a/src/views/ModelForumDetails/MainPostIDModelAnalysis/index.vue +++ b/src/views/ModelForumDetails/MainPostIDModelAnalysis/index.vue @@ -1,38 +1,118 @@ diff --git a/src/views/ModelForumDetails/MainPostUserActiveArea/index.vue b/src/views/ModelForumDetails/MainPostUserActiveArea/index.vue index f888f68..bbc07be 100644 --- a/src/views/ModelForumDetails/MainPostUserActiveArea/index.vue +++ b/src/views/ModelForumDetails/MainPostUserActiveArea/index.vue @@ -1,7 +1,7 @@ diff --git a/src/views/ModelForumDetails/mfdCommunicationTrend/index.vue b/src/views/ModelForumDetails/mfdCommunicationTrend/index.vue index e8b5d3c..e174f17 100644 --- a/src/views/ModelForumDetails/mfdCommunicationTrend/index.vue +++ b/src/views/ModelForumDetails/mfdCommunicationTrend/index.vue @@ -1,7 +1,7 @@ diff --git a/src/views/ModelForumDetails/mfdHeader/index.vue b/src/views/ModelForumDetails/mfdHeader/index.vue index 7ed7cae..919c32e 100644 --- a/src/views/ModelForumDetails/mfdHeader/index.vue +++ b/src/views/ModelForumDetails/mfdHeader/index.vue @@ -1,55 +1,75 @@ diff --git a/src/views/ModelForumDetails/mfdNegativeTopic/index.vue b/src/views/ModelForumDetails/mfdNegativeTopic/index.vue index 5a2a983..1b9e44a 100644 --- a/src/views/ModelForumDetails/mfdNegativeTopic/index.vue +++ b/src/views/ModelForumDetails/mfdNegativeTopic/index.vue @@ -1,14 +1,14 @@ diff --git a/src/views/ModelForumDetails/mfdNegativeTopic/opt.js b/src/views/ModelForumDetails/mfdNegativeTopic/opt.js index 91b1f6c..94b9919 100644 --- a/src/views/ModelForumDetails/mfdNegativeTopic/opt.js +++ b/src/views/ModelForumDetails/mfdNegativeTopic/opt.js @@ -6,7 +6,7 @@ * @Description: In User Settings Edit * @FilePath: /data-show/src/views/BrandInsight/weiboVolumeTrend/opt.js */ -export default function createOpt() { +export default function createOpt(dx=[], ds=[]) { return { title: { text: 'Basic Radar Chart', @@ -24,18 +24,7 @@ export default function createOpt() { }, radar: { // shape: 'circle', - indicator: [ - { name: '新车发布', max: 6500 }, - { name: '用车生活', max: 16000 }, - { name: '咨询请教', max: 30000 }, - { name: '本品讨论', max: 38000 }, - { name: '售后服务', max: 52000 }, - { name: '技术加持', max: 25000 }, - { name: '保养作业', max: 25000 }, - { name: '看车提车', max: 25000 }, - { name: '竞品对比', max: 25000 }, - { name: '销售问题', max: 25000 }, - ] + indicator:dx }, series: [ { @@ -43,7 +32,7 @@ export default function createOpt() { type: 'radar', data: [ { - value: [5000, 14000, 28000, 26000, 42000, 21000, 22000, 21000, 19000, 23000], + value: ds, name: '负面话题分布:', itemStyle: { color: "rgba(194, 151, 22)", diff --git a/src/views/ModelForumDetails/mfdPositiveTopic/index.vue b/src/views/ModelForumDetails/mfdPositiveTopic/index.vue index 3dac42b..32bc1ff 100644 --- a/src/views/ModelForumDetails/mfdPositiveTopic/index.vue +++ b/src/views/ModelForumDetails/mfdPositiveTopic/index.vue @@ -1,13 +1,13 @@ diff --git a/src/views/ModelForumDetails/mfdPositiveTopic/opt.js b/src/views/ModelForumDetails/mfdPositiveTopic/opt.js index 3c75051..d4274b2 100644 --- a/src/views/ModelForumDetails/mfdPositiveTopic/opt.js +++ b/src/views/ModelForumDetails/mfdPositiveTopic/opt.js @@ -1,12 +1,12 @@ /* * @Author: your name * @Date: 2021-10-12 15:32:24 - * @LastEditTime: 2021-11-09 15:46:21 + * @LastEditTime: 2021-11-10 11:55:50 * @LastEditors: Please set LastEditors * @Description: In User Settings Edit * @FilePath: /data-show/src/views/BrandInsight/weiboVolumeTrend/opt.js */ -export default function createOpt() { +export default function createOpt(dx=[], ds=[]) { return { title: { text: 'Basic Radar Chart', @@ -24,18 +24,7 @@ export default function createOpt() { }, radar: { // shape: 'circle', - indicator: [ - { name: '新车发布', max: 6500 }, - { name: '用车生活', max: 16000 }, - { name: '咨询请教', max: 30000 }, - { name: '本品讨论', max: 38000 }, - { name: '售后服务', max: 52000 }, - { name: '技术加持', max: 25000 }, - { name: '保养作业', max: 25000 }, - { name: '看车提车', max: 25000 }, - { name: '竞品对比', max: 25000 }, - { name: '销售问题', max: 25000 }, - ] + indicator: dx }, series: [ { @@ -43,7 +32,7 @@ export default function createOpt() { type: 'radar', data: [ { - value: [5000, 14000, 28000, 26000, 42000, 21000, 22000, 21000, 19000, 23000], + value: ds, name: '正面话题分布:', itemStyle: { color: "rgba(48, 110, 195)", diff --git a/src/views/ModelInsight/mlForumHotTopicDirection/index.vue b/src/views/ModelInsight/mlForumHotTopicDirection/index.vue index c87ff71..0626671 100644 --- a/src/views/ModelInsight/mlForumHotTopicDirection/index.vue +++ b/src/views/ModelInsight/mlForumHotTopicDirection/index.vue @@ -1,7 +1,7 @@ diff --git a/src/views/BrandComparison/comparisonOfForumPostingTrends/opt.js b/src/views/BrandComparison/comparisonOfForumPostingTrends/opt.js index 346d8e9..bca6707 100644 --- a/src/views/BrandComparison/comparisonOfForumPostingTrends/opt.js +++ b/src/views/BrandComparison/comparisonOfForumPostingTrends/opt.js @@ -6,7 +6,38 @@ * @Description: In User Settings Edit * @FilePath: /data-show/src/views/BrandInsight/titsopo/opt.js */ -export default function createOpt() { +import { bigNumberTransform } from "@/utils/gol/dataTool" +function createData(ds = []) { + let testData = {} + ds.forEach(item => { + item.forEach(val => { + if (testData[val.key] === undefined) { + testData[val.key] = { + name: val.key, + type: 'line', + symbol: 'none', + areaStyle: { + opacity: 0.4 + }, + emphasis: { + focus: 'series' + }, + data: [val.value] + } + } else { + testData[val.key].data.push(val.value) + } + }) + }) + let arr = []; + for(let key in testData) { + arr.push(testData[key]) + } + return arr +} + +export default function createOpt(dx = [], ds = []) { + let data = createData(ds); return { grid: { left: 16, @@ -39,13 +70,19 @@ export default function createOpt() { axisTick: { show: false, }, + axisLabel: { + formatter: (value) => { + let str = value.substring(10, 16) + return str; + } + }, axisLine: { show: false, lineStyle: { color: "#fff", }, }, - data: ['00:00', '04:00', '08:00', '12:00', '16:00', '20:00', '24:00'] + data: dx }, yAxis: { type: 'value', @@ -55,6 +92,12 @@ export default function createOpt() { color: "#fff", }, }, + axisLabel: { + formatter: (value) => { + let str = bigNumberTransform(value); + return str; + } + }, splitLine: { lineStyle: { type: "dashed", // y轴分割线类型 @@ -62,86 +105,6 @@ export default function createOpt() { }, }, }, - series: [ - { - name: '奥迪', - type: 'line', - stack: 'Total', - symbol: 'none', - areaStyle: { - opacity: 0.4 - }, - emphasis: { - focus: 'series' - }, - data: [2000, 1600, 1000, 2200, 2300, 2100, 1900] - }, - { - name: '宝马', - type: 'line', - stack: 'Total', - symbol: 'none', - areaStyle: { - opacity: 0.4 - }, - emphasis: { - focus: 'series' - }, - data: [1000, 1100, 1300, 2000, 1800, 2100, 1600] - }, - { - name: '奔驰', - type: 'line', - stack: 'Total', - symbol: 'none', - areaStyle: { - opacity: 0.4 - }, - emphasis: { - focus: 'series' - }, - data: [1200, 1200, 1400, 2100, 1400, 1900, 2000] - }, - { - name: '吉利', - type: 'line', - stack: 'Total', - symbol: 'none', - areaStyle: { - opacity: 0.4 - }, - emphasis: { - focus: 'series' - }, - data: [1200, 1200, 1350, 1550, 1750, 1900, 2000] - }, - { - name: '大众', - type: 'line', - stack: 'Total', - symbol: 'none', - areaStyle: { - opacity: 0.4 - }, - emphasis: { - focus: 'series' - }, - data: [1260, 1280, 1390, 1570, 1790, 1950, 2020] - }, - { - name: '别克', - type: 'line', - stack: 'Total', - symbol: 'none', - areaStyle: { - opacity: 0.4 - }, - emphasis: { - focus: 'series' - }, - data: [1260, 1280, 1390, 1570, 1790, 1950, 2020] - }, - - ] + series: data } } diff --git a/src/views/BrandComparison/comparisonOfNegativeTopicsInForums/index.vue b/src/views/BrandComparison/comparisonOfNegativeTopicsInForums/index.vue index 5d59340..3609109 100644 --- a/src/views/BrandComparison/comparisonOfNegativeTopicsInForums/index.vue +++ b/src/views/BrandComparison/comparisonOfNegativeTopicsInForums/index.vue @@ -7,82 +7,169 @@ * @FilePath: /data-show/src/views/BrandComparison/comparisonOfPositiveTopicsInTheForum/index.vue --> diff --git a/src/views/BrandComparison/comparisonOfPositiveTopicsInTheForum/index.vue b/src/views/BrandComparison/comparisonOfPositiveTopicsInTheForum/index.vue index 9fbbcd4..c7638b9 100644 --- a/src/views/BrandComparison/comparisonOfPositiveTopicsInTheForum/index.vue +++ b/src/views/BrandComparison/comparisonOfPositiveTopicsInTheForum/index.vue @@ -7,82 +7,119 @@ * @FilePath: /data-show/src/views/BrandComparison/comparisonOfPositiveTopicsInTheForum/index.vue --> diff --git a/src/views/BrandComparison/forumTonalComparison/index.vue b/src/views/BrandComparison/forumTonalComparison/index.vue index 2a67133..a1ddb5e 100644 --- a/src/views/BrandComparison/forumTonalComparison/index.vue +++ b/src/views/BrandComparison/forumTonalComparison/index.vue @@ -7,70 +7,131 @@ * @FilePath: /data-show/src/views/BrandComparison/weiboTuneComparison/index.vue --> diff --git a/src/views/BrandComparison/forumTonalComparison/roundata/index.vue b/src/views/BrandComparison/forumTonalComparison/roundata/index.vue index eb00a88..6582462 100644 --- a/src/views/BrandComparison/forumTonalComparison/roundata/index.vue +++ b/src/views/BrandComparison/forumTonalComparison/roundata/index.vue @@ -27,10 +27,22 @@ export default { type: String, default: "", }, + data: { + type: Object, + default: () => {} + } + }, + watch: { + data: { + handler(val) { + this.opt = createOpt(val) + }, + immediate: true + } }, data() { return { - opt: createOpt(), + //opt: createOpt(), }; }, methods: { diff --git a/src/views/BrandComparison/forumTonalComparison/roundata/opt.js b/src/views/BrandComparison/forumTonalComparison/roundata/opt.js index 72c0191..9608152 100644 --- a/src/views/BrandComparison/forumTonalComparison/roundata/opt.js +++ b/src/views/BrandComparison/forumTonalComparison/roundata/opt.js @@ -7,7 +7,42 @@ * @FilePath: /data-show/src/views/BrandInsight/weiboKol/opt.js */ import * as echarts from "echarts"; -export default function createOpt() { +function createData(obj = {}) { + if (JSON.stringify(obj) === '{}') { + return; + } + let arr = []; + for (let key in obj) { + let color = ""; + if (key === '正面') { + color = "#3373CC" + } else if (key === '负面') { + color = "#b38b14" + } else { + color = "#54BF93" + } + let o = { + value: obj[key], + name: key, + itemStyle: { + color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{ + //给颜色设置渐变色 前面4个参数,给第一个设置1,第四个设置0 ,就是水平渐变 + //给第一个设置0,第四个设置1,就是垂直渐变 + offset: 0, + color: 'black' + }, { + offset: 1, + color: color + }]) + } + } + arr.push(o) + } + return arr +} + +export default function createOpt(obj={}) { + let data = createData(obj); return { series: [ { @@ -18,52 +53,23 @@ export default function createOpt() { label: { show: false, position: 'center', - lineHeight: 40 + lineHeight: 28 }, emphasis: { label: { show: true, - fontSize: '20', + fontSize: '18', color: "#ffff", fontWeight: 'bold', formatter: function(p) { - return `${p.data.name}\n25%\n${p.data.value}` + return `${p.data.name}\n${p.percent}%\n${p.data.value}` } } }, labelLine: { show: false }, - data: [ - { value: 2000, name: '正面', itemStyle: {color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{ - //给颜色设置渐变色 前面4个参数,给第一个设置1,第四个设置0 ,就是水平渐变 - //给第一个设置0,第四个设置1,就是垂直渐变 - offset: 0, - color: 'black' - }, { - offset: 1, - color: '#3373CC' - }])} }, - - { value: 1000, name: '中性', itemStyle: {color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{ - //给颜色设置渐变色 前面4个参数,给第一个设置1,第四个设置0 ,就是水平渐变 - //给第一个设置0,第四个设置1,就是垂直渐变 - offset: 0, - color: 'black' - }, { - offset: 1, - color: '#54BF93' - }])} }, - { value: 1000, name: '负面', itemStyle: {color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{ - //给颜色设置渐变色 前面4个参数,给第一个设置1,第四个设置0 ,就是水平渐变 - //给第一个设置0,第四个设置1,就是垂直渐变 - offset: 0, - color: 'black' - }, { - offset: 1, - color: '#b38b14' - }])} }, - ], + data: data, }, { name: 'Access From1', @@ -78,37 +84,7 @@ export default function createOpt() { show: false }, center: ['50%', '50%'],//边框位置 - data: [ - { value: 2000, name: '正面', itemStyle: {color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{ - //给颜色设置渐变色 前面4个参数,给第一个设置1,第四个设置0 ,就是水平渐变 - //给第一个设置0,第四个设置1,就是垂直渐变 - offset: 0, - color: 'black' - }, { - offset: 1, - color: '#3373CC' - }])} }, - - { value: 1000, name: '中性', itemStyle: {color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{ - //给颜色设置渐变色 前面4个参数,给第一个设置1,第四个设置0 ,就是水平渐变 - //给第一个设置0,第四个设置1,就是垂直渐变 - offset: 0, - color: 'black' - }, { - offset: 1, - color: '#54BF93' - }])} }, - { value: 1000, name: '负面', itemStyle: {color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{ - //给颜色设置渐变色 前面4个参数,给第一个设置1,第四个设置0 ,就是水平渐变 - //给第一个设置0,第四个设置1,就是垂直渐变 - offset: 0, - color: 'black' - }, { - offset: 1, - color: '#b38b14' - }])} }, - - ], + data: data, } ] } diff --git a/src/views/BrandComparison/summaryAndComparisonOfForumInformation/index.vue b/src/views/BrandComparison/summaryAndComparisonOfForumInformation/index.vue index e39cdb7..8e81e78 100644 --- a/src/views/BrandComparison/summaryAndComparisonOfForumInformation/index.vue +++ b/src/views/BrandComparison/summaryAndComparisonOfForumInformation/index.vue @@ -9,34 +9,34 @@ diff --git a/src/views/BrandComparison/userAreaDistribution/opt1.js b/src/views/BrandComparison/userAreaDistribution/opt1.js index 02ca558..eb5b011 100644 --- a/src/views/BrandComparison/userAreaDistribution/opt1.js +++ b/src/views/BrandComparison/userAreaDistribution/opt1.js @@ -9,7 +9,7 @@ * @FilePath: /data-show/src/views/Index/tailInsight/opt.js */ import * as echarts from "echarts"; -export default function createOptD1() { +export default function createOptD1(dx = [],ds = []) { return { grid: { left: '4%', @@ -45,7 +45,7 @@ export default function createOptD1() { }, yAxis: { type: 'category', - data: ['山西省', '浙江省', '北京市', '江西省', '江苏省', '福建省', '山东省', '天津市'], + data: dx, axisTick: { show: false, }, @@ -55,13 +55,14 @@ export default function createOptD1() { color: "#fff", }, }, + inverse: true }, series: [ { name: '2011', type: 'bar', barWidth: 24, - data: [500, 1000, 2220, 3000, 4000, 3000,2200, 2600], + data: ds, color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{ offset: 0, color: '#010B19' diff --git a/src/views/BrandComparison/userAreaDistribution/opt2.js b/src/views/BrandComparison/userAreaDistribution/opt2.js index 178233f..9efd42e 100644 --- a/src/views/BrandComparison/userAreaDistribution/opt2.js +++ b/src/views/BrandComparison/userAreaDistribution/opt2.js @@ -15,7 +15,7 @@ for (var i = 0; i < provArr.length; i++) { var str2 = { name: str.replace(re, ''), value: 5 };//拼接对象数组 ini_data.push(str2); } -export default function createOptD2() { +export default function createOptD2(dm = []) { return { tooltip: { trigger: "item", @@ -59,7 +59,7 @@ export default function createOptD2() { }, series: [ { - name: "微博区域", + name: "用户区域", type: "map", mapType: "china", roam: false, @@ -95,39 +95,7 @@ export default function createOptD2() { // areaColor: '#3edffe' // } // }, - data: [ - { - name: "河北省", - value: 1000, - // selected: true, - }, - { - name: "浙江省", - value: 1100, - // selected: true - }, - { - name: "山东省", - value: 1200, - // selected: true - }, - { - name: "山西省", - value: 1300, - // selected: true - }, - { - name: "上海市", - value: 1400, - // selected: true - }, - { - name: "江苏省", - value: 1500, - // selected: true - } - ] - + data: dm } ] } diff --git a/src/views/BrandComparison/weiboUserPortrait/index.vue b/src/views/BrandComparison/weiboUserPortrait/index.vue index 7ac5dc3..f47603e 100644 --- a/src/views/BrandComparison/weiboUserPortrait/index.vue +++ b/src/views/BrandComparison/weiboUserPortrait/index.vue @@ -7,75 +7,190 @@ * @FilePath: /data-show/src/views/BrandComparison/weiboUserPortrait/index.vue --> diff --git a/src/views/BrandComparison/weiboUserPortrait/opt1.js b/src/views/BrandComparison/weiboUserPortrait/opt1.js index fd6dbf6..12129ba 100644 --- a/src/views/BrandComparison/weiboUserPortrait/opt1.js +++ b/src/views/BrandComparison/weiboUserPortrait/opt1.js @@ -6,8 +6,33 @@ * @Description: In User Settings Edit * @FilePath: /data-show/src/views/BrandInsight/weiboPortraits/opt.js */ + +function createData(ds = [], colors) { + let arr = []; + ds.map((ele, index) => { + let obj = { + value: ele.value, + name: ele.key, + itemStyle: { + color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{ + //给颜色设置渐变色 前面4个参数,给第一个设置1,第四个设置0 ,就是水平渐变 + //给第一个设置0,第四个设置1,就是垂直渐变 + offset: 0, + color: 'black' + }, { + offset: 1, + color: colors[index] + }]) + } + } + arr.push(obj) + }) + return arr; +} + import * as echarts from "echarts"; -export default function createOpt1() { +export default function createOpt1(ds = [], color = []) { + const data = createData(ds, color); return { series: [ { @@ -24,46 +49,18 @@ export default function createOpt1() { emphasis: { label: { show: true, - fontSize: '40', + fontSize: '22', color: "#ffff", + fontWeight: 'bold', formatter: (p)=>{ - return p.data.name + '\n' + p.data.value; + return p.data.name + '\n' + p.percent + '%' + '\n' + p.data.value; }, } }, labelLine: { show: false }, - data: [ - { value: 2200, name: '男性', itemStyle: {color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{ - //给颜色设置渐变色 前面4个参数,给第一个设置1,第四个设置0 ,就是水平渐变 - //给第一个设置0,第四个设置1,就是垂直渐变 - offset: 0, - color: 'black' - }, { - offset: 1, - color: '#3373CC' - }])} }, - { value: 2200, name: '女性', itemStyle: {color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{ - //给颜色设置渐变色 前面4个参数,给第一个设置1,第四个设置0 ,就是水平渐变 - //给第一个设置0,第四个设置1,就是垂直渐变 - offset: 0, - color: 'black' - }, { - offset: 1, - color: '#CC9D12' - }])} }, - { value: 2200, name: '未知', itemStyle: {color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{ - //给颜色设置渐变色 前面4个参数,给第一个设置1,第四个设置0 ,就是水平渐变 - //给第一个设置0,第四个设置1,就是垂直渐变 - offset: 0, - color: 'black' - }, { - offset: 1, - color: '#54BF93' - }])} }, - ], - + data: data, }, { name: 'Access From1', @@ -78,35 +75,7 @@ export default function createOpt1() { show: false }, center: ['50%', '50%'],//边框位置 - data: [ - { value: 2200, name: '男性', itemStyle: {color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{ - //给颜色设置渐变色 前面4个参数,给第一个设置1,第四个设置0 ,就是水平渐变 - //给第一个设置0,第四个设置1,就是垂直渐变 - offset: 0, - color: 'black' - }, { - offset: 1, - color: '#3373CC' - }])} }, - { value: 2200, name: '女性', itemStyle: {color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{ - //给颜色设置渐变色 前面4个参数,给第一个设置1,第四个设置0 ,就是水平渐变 - //给第一个设置0,第四个设置1,就是垂直渐变 - offset: 0, - color: 'black' - }, { - offset: 1, - color: '#CC9D12' - }])} }, - { value: 2200, name: '未知', itemStyle: {color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{ - //给颜色设置渐变色 前面4个参数,给第一个设置1,第四个设置0 ,就是水平渐变 - //给第一个设置0,第四个设置1,就是垂直渐变 - offset: 0, - color: 'black' - }, { - offset: 1, - color: '#54BF93' - }])} }, - ], + data: data, } ] diff --git a/src/views/BrandComparison/weiboUserPortrait/opt2.js b/src/views/BrandComparison/weiboUserPortrait/opt2.js index eab17f6..bd1a436 100644 --- a/src/views/BrandComparison/weiboUserPortrait/opt2.js +++ b/src/views/BrandComparison/weiboUserPortrait/opt2.js @@ -6,109 +6,78 @@ * @Description: In User Settings Edit * @FilePath: /data-show/src/views/BrandInsight/weiboPortraits/opt.js */ + +function createData(ds = [], colors) { + let arr = []; + ds.map((ele, index) => { + let obj = { + value: ele.value, + name: ele.key, + itemStyle: { + color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{ + //给颜色设置渐变色 前面4个参数,给第一个设置1,第四个设置0 ,就是水平渐变 + //给第一个设置0,第四个设置1,就是垂直渐变 + offset: 0, + color: 'black' + }, { + offset: 1, + color: colors[index] + }]) + } + } + arr.push(obj) + }) + return arr; +} + import * as echarts from "echarts"; -export default function createOpt2() { - return { - series: [ - { - name: 'Access From0', - type: 'pie', - radius: ['63%', '77%'], - avoidLabelOverlap: false, - label: { - show: false, - position: 'center', - fontSize: '40', - color: "#ffff", +export default function createOpt2(ds = [], color = []) { + const data = createData(ds, color); + return { + series: [ + { + name: 'Access From0', + type: 'pie', + radius: ['63%', '77%'], + avoidLabelOverlap: false, + label: { + show: false, + position: 'center', + fontSize: '40', + color: "#ffff", + }, + emphasis: { + label: { + show: true, + fontSize: '22', + color: "#ffff", + fontWeight: 'bold', + formatter: (p) => { + return p.data.name + '\n' + p.percent + '%' + '\n' + p.data.value; }, - emphasis: { - label: { - show: true, - fontSize: '40', - color: "#ffff", - formatter: (p)=>{ - return p.data.name + '\n' + p.data.value; - }, - } - }, - labelLine: { - show: false - }, - data: [ - { value: 2200, name: '已认证', itemStyle: {color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{ - //给颜色设置渐变色 前面4个参数,给第一个设置1,第四个设置0 ,就是水平渐变 - //给第一个设置0,第四个设置1,就是垂直渐变 - offset: 0, - color: 'black' - }, { - offset: 1, - color: '#3373CC' - }])} }, - { value: 2200, name: '未认证', itemStyle: {color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{ - //给颜色设置渐变色 前面4个参数,给第一个设置1,第四个设置0 ,就是水平渐变 - //给第一个设置0,第四个设置1,就是垂直渐变 - offset: 0, - color: 'black' - }, { - offset: 1, - color: '#CC9D12' - }])} }, - { value: 2200, name: '未知', itemStyle: {color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{ - //给颜色设置渐变色 前面4个参数,给第一个设置1,第四个设置0 ,就是水平渐变 - //给第一个设置0,第四个设置1,就是垂直渐变 - offset: 0, - color: 'black' - }, { - offset: 1, - color: '#54BF93' - }])} }, - ], + } + }, + labelLine: { + show: false + }, + data: data, - }, - { - name: 'Access From1', - type: 'pie', - radius: ['80%', '84%'], - avoidLabelOverlap: false, - label: { - show: false, - position: 'center' - }, - labelLine: { - show: false - }, - center: ['50%', '50%'],//边框位置 - data: [ - { value: 2200, name: '男性', itemStyle: {color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{ - //给颜色设置渐变色 前面4个参数,给第一个设置1,第四个设置0 ,就是水平渐变 - //给第一个设置0,第四个设置1,就是垂直渐变 - offset: 0, - color: 'black' - }, { - offset: 1, - color: '#3373CC' - }])} }, - { value: 2200, name: '女性', itemStyle: {color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{ - //给颜色设置渐变色 前面4个参数,给第一个设置1,第四个设置0 ,就是水平渐变 - //给第一个设置0,第四个设置1,就是垂直渐变 - offset: 0, - color: 'black' - }, { - offset: 1, - color: '#CC9D12' - }])} }, - { value: 2200, name: '未知', itemStyle: {color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{ - //给颜色设置渐变色 前面4个参数,给第一个设置1,第四个设置0 ,就是水平渐变 - //给第一个设置0,第四个设置1,就是垂直渐变 - offset: 0, - color: 'black' - }, { - offset: 1, - color: '#54BF93' - }])} }, - ], - - } - ] - } + }, + { + name: 'Access From1', + type: 'pie', + radius: ['80%', '84%'], + avoidLabelOverlap: false, + label: { + show: false, + position: 'center' + }, + labelLine: { + show: false + }, + center: ['50%', '50%'],//边框位置 + data: data, + } + ] + } }