From d9f565ec3073a17c694ddf120107691da14c40df Mon Sep 17 00:00:00 2001 From: zx <604444282@qq.com> Date: Fri, 21 Jan 2022 13:42:55 +0800 Subject: [PATCH] zx --- src/api/ThemeAnalize/index.js | 30 ++- src/api/ThemeAnalizeDec/index.js | 171 +++++++++++++++++ src/views/BrandInsight/titsopo/index.vue | 3 +- src/views/IndustryDataExport/tableEvent.js | 1 + src/views/ThemeAnalize/index.vue | 121 +++++++++--- src/views/ThemeBoard/SourceDivide/index.vue | 65 +++++-- src/views/ThemeBoard/SourceDivide/opt.js | 4 +- src/views/ThemeBoard/ThemeSource/index.vue | 144 +++++++++++++- src/views/ThemeBoard/ThemeSource/opt.js | 80 ++++++++ src/views/ThemeBoard/TotalSource/index.vue | 118 +++++++++++- src/views/ThemeBoard/TotalSource/opt.js | 177 ++++++++++++++++++ src/views/ThemeBoard/TotalVolume/index.vue | 33 +++- src/views/ThemeBoard/TotalVolume/opt.js | 109 +++++++++++ .../ThemeBoard/TransformAnalize/index.vue | 61 +++++- src/views/ThemeBoard/UserArea/index.vue | 74 +++++++- src/views/ThemeBoard/UserArea/opt1.js | 83 ++++++++ src/views/ThemeBoard/UserArea/opt2.js | 94 ++++++++++ src/views/ThemeBoard/UserTopic/index.vue | 37 +++- src/views/ThemeBoard/WordCloud/index.vue | 91 ++++++++- src/views/ThemeBoard/index.vue | 27 ++- src/views/ThemeData/getApi.js | 129 +++++++++++++ src/views/ThemeData/index.vue | 115 +++++++++--- src/views/ThemeData/tableEvent.js | 132 +++++++++++++ 23 files changed, 1794 insertions(+), 105 deletions(-) create mode 100644 src/api/ThemeAnalizeDec/index.js create mode 100644 src/views/ThemeBoard/ThemeSource/opt.js create mode 100644 src/views/ThemeBoard/UserArea/opt1.js create mode 100644 src/views/ThemeBoard/UserArea/opt2.js create mode 100644 src/views/ThemeData/getApi.js create mode 100644 src/views/ThemeData/tableEvent.js diff --git a/src/api/ThemeAnalize/index.js b/src/api/ThemeAnalize/index.js index 2b675c0..a2eeaf8 100644 --- a/src/api/ThemeAnalize/index.js +++ b/src/api/ThemeAnalize/index.js @@ -2,7 +2,20 @@ import httpService from "@/request" // 主题分析-列表 主页 export function getSchemeDataToTheme(params) { - let obj = Object.assign({action: 'getSchemeDataToTheme'}, params) + let obj = Object.assign({action: 'getSchemeDataToTheme', sType: ''}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} + +// 主题分析-列表 修改时的填充数据 +export function getSchemeDataByGuid(params) { + let obj = Object.assign({action: 'getSchemeDataByGuid'}, params) return httpService({ url: `/api/v6.ashx`, method: 'post', @@ -15,7 +28,20 @@ export function getSchemeDataToTheme(params) { // 主题分析-列表 添加 export function setSchemeData(params) { - let obj = Object.assign({action: 'setSchemeData'}, params) + let obj = Object.assign({action: 'setSchemeData', DataJson: ''}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} + +// 主题分析-列表 删除 +export function delCarBigDataByGuid(params) { + let obj = Object.assign({action: 'delCarBigDataByGuid'}, params) return httpService({ url: `/api/v6.ashx`, method: 'post', diff --git a/src/api/ThemeAnalizeDec/index.js b/src/api/ThemeAnalizeDec/index.js new file mode 100644 index 0000000..b3c9678 --- /dev/null +++ b/src/api/ThemeAnalizeDec/index.js @@ -0,0 +1,171 @@ +import httpService from "@/request" + +// 主题分析-看板 主页 +export function getSummarizeMerge(params) { + let obj = Object.assign({action: 'getSummarizeMerge', sType: ''}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} + +// 主题分析-总声量趋势 +export function getVolumeTime(params) { + let obj = Object.assign({action: 'getVolumeTime', sType: ''}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} + +// 主题分析-核心传播媒体 +export function getCoreWebsite(params) { + let obj = Object.assign({action: 'getCoreWebsite', sType: ''}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} + +// 主题分析-核心传播网民 +export function getCoreDiffuse(params) { + let obj = Object.assign({action: 'getCoreDiffuse', sType: ''}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} + +// 主题分析-热议话题 +export function getHottalk(params) { + let obj = Object.assign({action: 'getHottalk', sType: ''}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} + +// 主题分析-渠道分布占比 +export function getSourcetype(params) { + let obj = Object.assign({action: 'getSourcetype', sType: ''}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} + +// 主题分析-渠道分布 +export function getSourcetypeTime(params) { + let obj = Object.assign({action: 'getSourcetypeTime', sType: ''}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} + +// 主题分析-热门词云 +export function getHotWord(params) { + let obj = Object.assign({action: 'getHotWord', sType: ''}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} + +// 主题分析-正面词 +export function getPositive(params) { + let obj = Object.assign({action: 'getPositive', sType: ''}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} + +// 主题分析-负面词 +export function getNegative(params) { + let obj = Object.assign({action: 'getNegative', sType: ''}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} + +// 主题分析-性别 认证 +export function getSexMerge(params) { + let obj = Object.assign({action: 'getSexMerge', sType: ''}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} + +// 主题分析-区域分布 +export function getRegion(params) { + let obj = Object.assign({action: 'getRegion', sType: ''}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} + +// 主题分析-大V分析 +export function getVAnalyze(params) { + let obj = Object.assign({action: 'getVAnalyze', sType: ''}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} + diff --git a/src/views/BrandInsight/titsopo/index.vue b/src/views/BrandInsight/titsopo/index.vue index 85f743a..40cd380 100644 --- a/src/views/BrandInsight/titsopo/index.vue +++ b/src/views/BrandInsight/titsopo/index.vue @@ -19,7 +19,8 @@
-
+
+
关闭 diff --git a/src/views/IndustryDataExport/tableEvent.js b/src/views/IndustryDataExport/tableEvent.js index 6b734cb..6e716f5 100644 --- a/src/views/IndustryDataExport/tableEvent.js +++ b/src/views/IndustryDataExport/tableEvent.js @@ -84,6 +84,7 @@ export default { } else { this.gValue = x; } + console.log(this.form); this.getList(); this.getTable(); }); diff --git a/src/views/ThemeAnalize/index.vue b/src/views/ThemeAnalize/index.vue index bc1a2b7..5510e0d 100644 --- a/src/views/ThemeAnalize/index.vue +++ b/src/views/ThemeAnalize/index.vue @@ -13,21 +13,24 @@
- 进行中 - 已完成 + 进行中 + 已完成 - 编辑 - 删除 + 编辑 + +
此操作将删除数据,是否继续?
+ 删除 +
-
+
- {{index}} + {{item.name}}
-
开始时间
{{index}}
-
结束时间
{{index}}
-
相关报道(条)
{{index}}
+
开始时间
{{item.startTime}}
+
结束时间
{{item.endTime}}
+
相关报道(条)
{{item.total}}
@@ -124,6 +127,8 @@ import newThemeModal from "./newThemeModal" import {getSchemeDataToTheme} from "@/api/ThemeAnalize" import {setSchemeData} from "@/api/ThemeAnalize" +import {delCarBigDataByGuid} from "@/api/ThemeAnalize" +import {getSchemeDataByGuid} from "@/api/ThemeAnalize" export default { name: "themeAnalize", components: { @@ -132,9 +137,7 @@ export default { data() { return { isCom: true, - myThemeArr: [ - {},{},{},{},{},{}, - ], + myThemeArr: [], //新增对话框 visible: false, modalObj: { @@ -151,11 +154,13 @@ export default { Classify: 0, StartTime: '', EndTime: '', - Types: "theme", + Types: "theme_v6", DetailsData: [ {AnalyzeWord: "", HuoWord: "", PaiChu: "", + Source: "", + UserAuthor: "", IsAdvancedQuery: 0 //0普通 1高级 } ] @@ -165,7 +170,7 @@ export default { token: "", pageIndex: '', pageSize: '', - sType: "former" //former往期 now现在 + sType: "now" //former往期 now现在 }, } }, @@ -177,18 +182,50 @@ export default { getNowData() { let obj = Object.assign({}, this.form); getSchemeDataToTheme(obj).then(res => { - console.log(res); + let data = res.data; + let themeArr = []; + data.forEach(ele => { + let obj = { + guids: ele.Guids, + name: ele.Name, + startTime: ele.StartTime, + endTime: ele.EndTime, + total: ele.ReportSum + }; + themeArr.push(obj); + }) + console.log(themeArr); + this.myThemeArr = themeArr; }) }, goBack() { this.$router.go(-1); }, handlerAdd() { + this.reSet(); this.modalObj.visible = true }, - handlerEdit(index) { - + handlerEdit(guids) { + let obj = { + token: this.getToken, + Guids: guids + }; + getSchemeDataByGuid(obj).then(res => { + let data = res.data; + this.addForm = data + this.modalObj.visible = true; + }) + }, + handlerDel(guids) { + let obj = { + token: this.getToken, + Guids: guids + } + delCarBigDataByGuid(obj).then(() => { + this.getNowData(); + }) }, + cancel() {}, handlerOk() { let newForm = { token: "", @@ -198,13 +235,52 @@ export default { newForm.DataJson = JSON.stringify(this.addForm); let obj = Object.assign({}, newForm); setSchemeData(obj).then(res => { - console.log(res); this.getNowData(); }) + this.reSet(); this.modalObj.visible = false; }, - toThemeData(index) { - this.$router.push({path: '/ThemeData'}) + reSet() { + this.addForm = { + Guids: null, + Name: "", + Classify: 0, + StartTime: '', + EndTime: '', + Types: "theme_v6", + DetailsData: [ + {AnalyzeWord: "", + HuoWord: "", + PaiChu: "", + Source: "", + UserAuthor: "", + IsAdvancedQuery: 0 //0普通 1高级 + } + ] + } + }, + toThemeData(guids) { + this.$router.push( + { + path: '/ThemeData', + query: { + action: "getList", + // sTimeType, + // sQuDao, + // sQingGan, + // iPageIndex, + // iPageSize, + token: this.getToken, + sType: "ZhuTiFenXiBl", + sGuid: guids, + // iGroupBy, + // isSourcetype, + // listType, + // website, + // iTimeType + }, + } + ) } } } @@ -247,14 +323,15 @@ export default { padding: 16px; color: white; .cid-title { - height: 130px; + height: 110px; } .cid-data { display: flex; justify-content: space-between; .s1 { - width: 30%; + width: 33%; display: block; + font-family: Bebas; font-size: 12px; .s1-title { color: #7b93a5; diff --git a/src/views/ThemeBoard/SourceDivide/index.vue b/src/views/ThemeBoard/SourceDivide/index.vue index b9b8106..b8642dd 100644 --- a/src/views/ThemeBoard/SourceDivide/index.vue +++ b/src/views/ThemeBoard/SourceDivide/index.vue @@ -1,5 +1,5 @@ @@ -15,5 +138,20 @@ export default { width: 936px; height: 460px; border: 2px solid #0f2a4d; + .ts-inner { + display: flex; + justify-content: flex-start; + width: 100%; + height: 100%; + .ts-d1 { + width: 430px; + height: calc(100% - 48px); + } + .ts-d2 { + width: 460px; + height: calc(100% - 48px); + margin-left: 16px; + } + } } \ No newline at end of file diff --git a/src/views/ThemeBoard/ThemeSource/opt.js b/src/views/ThemeBoard/ThemeSource/opt.js new file mode 100644 index 0000000..782b448 --- /dev/null +++ b/src/views/ThemeBoard/ThemeSource/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: 36 + }, + emphasis: { + label: { + show: true, + fontSize: '20', + 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/ThemeBoard/TotalSource/index.vue b/src/views/ThemeBoard/TotalSource/index.vue index cedf07a..5ee83c6 100644 --- a/src/views/ThemeBoard/TotalSource/index.vue +++ b/src/views/ThemeBoard/TotalSource/index.vue @@ -1,19 +1,119 @@ @@ -30,4 +130,16 @@ export default { height: calc(100% - 48px); } } +.vshow{ + position: absolute; + width: 300px; + background: rgb(3, 18, 36); + border: 4px solid #0f2a4d; + .vshow-item { + padding: 11px; + width: 100%; + font-size: 15px; + color: rgb(54, 189, 239); + } +} \ No newline at end of file diff --git a/src/views/ThemeBoard/TotalSource/opt.js b/src/views/ThemeBoard/TotalSource/opt.js index e69de29..8979d3e 100644 --- a/src/views/ThemeBoard/TotalSource/opt.js +++ b/src/views/ThemeBoard/TotalSource/opt.js @@ -0,0 +1,177 @@ +/* + * @Author: your name + * @Date: 2021-10-12 10:11:24 + * @LastEditTime: 2021-12-29 17:08:53 + * @LastEditors: Please set LastEditors + * @Description: In User Settings Edit + * @FilePath: /data-show/src/views/BrandInsight/titsopo/opt.js + */ +import * as echarts from "echarts"; +import { bigNumberTransform } from "@/utils/gol/dataTool" +import {doStr} from "@/utils/gol/dataTool" +let colors = ['#546fc5', '#91cb74', '#f9c857', '#ed6565', '#72bfde', '#3aa272', '#fb8351','rgb(135,71,165)']; +function createData(ds = [], hotIndex = []) { + let arr = []; + for (let i = 0; i < ds.length; i++) { + let arr1 = ds[i]; + for (let j = 0; j < arr1.length; j++) { + let n = arr.findIndex(ele => { + return ele.name === arr1[j].key; + }) + if (n === -1) { + let obj = + { + name: arr1[j].key, + type: 'line', + symbol: 'none', + areaStyle: { + normal: { + opacity: 0.4, + color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ + offset: 0, color: colors[j] // 0% 处的颜色 + }, { + offset: 1, color: '#000' // 100% 处的颜色 + }] + ), + } + }, + emphasis: { + focus: 'series' + }, + data: [arr1[j].value], + markPoint: { + data: [], + } + } + arr.push(obj) + } else { + arr[n].data.push(arr1[j].value) + } + } + }; + //设定标记点 + hotIndex.forEach(e => { + let yMax = 0; //y轴 + let colorMax = 0; //颜色的索引 + for(let i = 0; i yMax){ + yMax = arr[i].data[e]; + colorMax = i; + } + } + arr.forEach(ele => { + ele.markPoint.data.push( + { + name: 'Max', + xAxis: e, yAxis: yMax, + symbol: 'pin', + symbolSize: 16, + symbolOffset: [0, '-70%'], + itemStyle: {color: colors[colorMax]}, + } + ) + }) + }) + return arr; +} +export default function createOpt(dx = [], ds = [], hotTopArr=[], hotIndex = []) { + let data = createData(ds, hotIndex) + return { + grid: { + left: '1.5%', + right: '2.5%', + bottom: '3%', + top: '15%', + containLabel: true + }, + tooltip: { + trigger: "axis", + backgroundColor: "#08182F", + color: "#fff", + borderColor: "#3373CC", + textStyle: { + color: "#fff", //设置文字颜色 + }, + extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;width: 200px", + formatter: function(param) { + let htmlStr = `
${param[0].name}
`; + let hotTop = hotTopArr.find(ele => param[0].name === ele.label).hotTop; + hotTop.forEach(e => { + htmlStr += `
热门:${doStr(e.title, 18)}
` + }) + for(let i = 0; i < param.length; i++) { + htmlStr += `
${param[i].marker}${param[i].seriesName} ${param[i].value}
` + } + return htmlStr + } + }, + legend: { + icon: 'roundRect', + textStyle: { //图例文字的样式 + color: '#fff', + fontSize: 10, + }, + y: 12, + x: 16, + itemWidth: 12, + itemHeight: 12 + + }, + xAxis: { + type: 'category', + boundaryGap: false, + axisTick: { + show: false, + }, + axisLine: { + show: false, + lineStyle: { + color: "#fff", + }, + }, + axisLabel: { + formatter: (value) => { + let rex = "00:00:00"; + let isCont = false; + let str = value; + for(let i = 0;i { + let str = bigNumberTransform(value); + return str; + } + }, + splitLine: { + lineStyle: { + type: "dashed", // y轴分割线类型 + color: "#012b4b", + }, + }, + }, + series: data + } +} diff --git a/src/views/ThemeBoard/TotalVolume/index.vue b/src/views/ThemeBoard/TotalVolume/index.vue index 52fd161..9c91311 100644 --- a/src/views/ThemeBoard/TotalVolume/index.vue +++ b/src/views/ThemeBoard/TotalVolume/index.vue @@ -1,5 +1,5 @@ diff --git a/src/views/ThemeBoard/TotalVolume/opt.js b/src/views/ThemeBoard/TotalVolume/opt.js index e69de29..ac51310 100644 --- a/src/views/ThemeBoard/TotalVolume/opt.js +++ b/src/views/ThemeBoard/TotalVolume/opt.js @@ -0,0 +1,109 @@ + +import * as echarts from "echarts"; +import { bigNumberTransform } from "@/utils/gol/dataTool" +export default function createOpt(dx = [], ds = [], hotIndex = []) { + let mark = []; + hotIndex.forEach(ele => { + let obj = { + name: 'Max', + xAxis: ele, yAxis: ds[ele], + symbol: 'pin', + symbolSize: 16, + symbolOffset: [0, '-70%'], + } + mark.push(obj) + }) + return { + grid: { + top: "15%", + left: "1.5%", //3% + right: "2.5%", //5% + bottom: "3%", + 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, + }, + axisLine: { + show: false, + lineStyle: { + color: "#fff", + }, + }, + axisLabel : { + formatter: (value) => { + let rex = "00:00:00"; + let isCont = false; + let str = value; + for(let i = 0;i { + 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)' + }]), + }}, + markPoint: { + data: mark, + } + } + ] + }; +} diff --git a/src/views/ThemeBoard/TransformAnalize/index.vue b/src/views/ThemeBoard/TransformAnalize/index.vue index b96edc8..279f5c4 100644 --- a/src/views/ThemeBoard/TransformAnalize/index.vue +++ b/src/views/ThemeBoard/TransformAnalize/index.vue @@ -1,5 +1,5 @@ diff --git a/src/views/ThemeBoard/UserArea/index.vue b/src/views/ThemeBoard/UserArea/index.vue index db1505b..a0f44bb 100644 --- a/src/views/ThemeBoard/UserArea/index.vue +++ b/src/views/ThemeBoard/UserArea/index.vue @@ -1,12 +1,69 @@ @@ -17,5 +74,20 @@ export default { border: 2px solid #0f2a4d; margin-left: 16px; overflow: hidden; + .ua-inner { + width: 100%; + height: calc(100% - 48px); + display: flex; + justify-content: flex-start; + .ua-d1 { + width: 540px; + height: 100%; + } + .ua-d2 { + width: 420px; + height: 100%; + margin-left: 16px; + } + } } \ No newline at end of file diff --git a/src/views/ThemeBoard/UserArea/opt1.js b/src/views/ThemeBoard/UserArea/opt1.js new file mode 100644 index 0000000..3fd7054 --- /dev/null +++ b/src/views/ThemeBoard/UserArea/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/ThemeBoard/UserArea/opt2.js b/src/views/ThemeBoard/UserArea/opt2.js new file mode 100644 index 0000000..c961002 --- /dev/null +++ b/src/views/ThemeBoard/UserArea/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/ThemeBoard/UserTopic/index.vue b/src/views/ThemeBoard/UserTopic/index.vue index 072eecf..2956737 100644 --- a/src/views/ThemeBoard/UserTopic/index.vue +++ b/src/views/ThemeBoard/UserTopic/index.vue @@ -1,12 +1,41 @@ @@ -17,5 +46,9 @@ export default { border: 2px solid #0f2a4d; margin-left: 16px; overflow: hidden; + .ut-inner { + width: 100%; + height: calc(100% - 48px); + } } \ No newline at end of file diff --git a/src/views/ThemeBoard/WordCloud/index.vue b/src/views/ThemeBoard/WordCloud/index.vue index 1281682..f1e1409 100644 --- a/src/views/ThemeBoard/WordCloud/index.vue +++ b/src/views/ThemeBoard/WordCloud/index.vue @@ -1,5 +1,5 @@ @@ -35,5 +114,9 @@ export default { border: 2px solid #0f2a4d; margin-left: 16px; overflow: hidden; + .wc-inner { + width: 100%; + height: calc(100% - 48px); + } } \ No newline at end of file diff --git a/src/views/ThemeBoard/index.vue b/src/views/ThemeBoard/index.vue index bea4ce0..bda74f9 100644 --- a/src/views/ThemeBoard/index.vue +++ b/src/views/ThemeBoard/index.vue @@ -28,10 +28,10 @@
-
+
@@ -40,6 +40,7 @@ diff --git a/src/views/ThemeData/tableEvent.js b/src/views/ThemeData/tableEvent.js new file mode 100644 index 0000000..47d28a2 --- /dev/null +++ b/src/views/ThemeData/tableEvent.js @@ -0,0 +1,132 @@ +export function rowSelection() { + let a = null; + if (!this.form.token) { + a = null + } else { + a = { + onChange: (selectedRowKeys, selectedRows) => { + this.sk = selectedRowKeys; + this.selectedRowKeys = selectedRowKeys.toString(); + this.selectedRows = selectedRows; + this.secIds = selectedRowKeys; + + }, + onSelect:(record, selected) => { + if(!selected) { + this.tableAll = false; + } + }, + selectedRowKeys: this.sk, + onSelectAll: () => { + this.tableAll = !this.tableAll; + if(!this.tableAll) { + this.sk = [] + } + }, + } + } + return a +} + +export default { + //---主页面---// + initData() { + Promise.all([ + this.getTime(), + this.getQuDao(), + this.getQingGan() + ]).then(() => { + this.form.token = this.getToken; + this.form.sGuid = this.$route.query.sGuid; + this.form.iTimeType = 0; + this.form.iGroupBy = '0'; + this.form.listType = '0'; + this.form.isSourcetype = '0'; + let series = this.$route.query.series || []; + let qudao = this.$route.query.qudao || []; + this.doFormQudao(qudao); + this.doFormQS(series); + + this.form.sTimeType = this.$route.query.sTimeType || '20'; + this.form.sStartTime = this.$route.query.startTime || ""; + this.form.sEndTime = this.$route.query.endTime || ""; + if (this.form.sStartTime && this.form.sEndTime) { + this.selTime = [this.form.sStartTime, this.form.sEndTime]; + } + let x = this.timesSel.findIndex(ele => { + return ele.key == this.form.sTimeType; + }) + if(x === -1) { + this.gValue = 0; + } else { + this.gValue = x; + } + console.log(this.form) + this.getTableData(); + }) + }, + handlerBack() { + this.$router.go(-1); + }, + //前往数据看版 + goThemeBoard() { + this.$router.push({ + path: '/ThemeBoard', + query: { + sGuid: this.$route.query.sGuid, + sType: 'ZhuTiFenXiBl', + token: this.getToken, + website: this.form.website, + sTitle: this.form.sTitle, + sTimeType: this.form.sTimeType, + sQuDao: this.form.sQuDao, + sQingGan: this.form.sQingGan + } + }) + }, + //------// + //时间 + calendarPriceRangeChange() {}, + handlerChangeTime() {}, + disabledDate() {}, + changeTime(n) { + let ele = this.timesSel[n]; + this.form.sTimeType = ele.key; + }, + // 选择情感和渠道的情况 + onChange(val, type) { + this.noClick = true; + if (type === "quDao") { + this.qdIndeterminate = !!this.quDao.length && this.quDao.length < this.plainOptions.length; + this.qdCheckAll = this.quDao.length === this.plainOptions.length; + this.form.sQuDao = this.quDao.toString(); + } else if (type === "qingGan") { + this.qgIndeterminate = !!this.qingGan.length && this.qingGan.length < this.plainOptions3.length; + this.qgCheckAll = this.qingGan.length === this.plainOptions3.length; + this.doFormQS(this.qingGan); + } + this.form.iPageIndex = 1; + Promise.all([this.getTableData()]).then(() => { + this.noClick = false; + }); + }, + //渠道 + onCheckAllChangeQd() {}, + //调性 + onCheckAllChangeDx() {}, + //时间筛选 + handlerTime(activeIndex) { + this.form.iTimeType = activeIndex; + }, + //去重筛选 + handlerTime2(activeIndex) { + this.form.iGroupBy = activeIndex; + }, + // 改变页面的数据 + handlerPage(p) { + let iPageIndex = p.current; + this.form.iPageIndex = iPageIndex; + this.pagination.current = iPageIndex; + this.getTable(); + }, +} \ No newline at end of file