张雄 3 years ago
parent 70336d19b2
commit d9f565ec30

@ -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',

@ -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'
}
})
}

@ -19,7 +19,8 @@
</div>
</div>
<div class="con-box">
<div id="gxid" @click.prevent="boxss"></div>
<div id="gxid" @click.prevent="boxss">
</div>
<div class="vshow" v-if="modelShow" :style="modelStyle">
<vLabel-div title="实时热点事件">
<a-button @click="closeBox"></a-button>

@ -84,6 +84,7 @@ export default {
} else {
this.gValue = x;
}
console.log(this.form);
this.getList();
this.getTable();
});

@ -13,21 +13,24 @@
<a-tab-pane class="tab-pane" key="1" tab="我的主题">
<div class="card-items" v-for="(item, index) in myThemeArr" :key="index">
<div class="card-item-top">
<a-button v-if="isCom"></a-button>
<a-button v-else disabled>已完成</a-button>
<a-button type="primary" v-if="isCom"></a-button>
<a-button type="primary" v-else disabled>已完成</a-button>
<a-button-group style="float: right">
<a-button @click="handlerEdit(index)"></a-button>
<a-button>删除</a-button>
<a-button type="primary" @click="handlerEdit(item.guids)"></a-button>
<a-popconfirm @confirm="handlerDel(item.guids)" @cancel="cancel">
<div slot="title" style="color: white">此操作将删除数据是否继续</div>
<a-button type="primary">删除</a-button>
</a-popconfirm>
</a-button-group>
</div>
<div class="card-item-data" @click="toThemeData(index)">
<div class="card-item-data" @click="toThemeData(item.guids)">
<div class="cid-title">
{{index}}
{{item.name}}
</div>
<div class="cid-data">
<div class="s1"><div class="s1-title">开始时间</div><div class="s1-text">{{index}}</div></div>
<div class="s1"><div class="s1-title">结束时间</div><div class="s1-text">{{index}}</div></div>
<div class="s1"><div class="s1-title">相关报道</div><div class="s1-text">{{index}}</div></div>
<div class="s1"><div class="s1-title">开始时间</div><div class="s1-text">{{item.startTime}}</div></div>
<div class="s1"><div class="s1-title">结束时间</div><div class="s1-text">{{item.endTime}}</div></div>
<div class="s1"><div class="s1-title">相关报道</div><div class="s1-text">{{item.total}}</div></div>
</div>
</div>
</div>
@ -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;

@ -1,5 +1,5 @@
<template>
<div class="sd-outter">
<div class="sd-outter" v-loading="load">
<v-label-div title="渠道分布占比"></v-label-div>
<div class="sd-inner">
<div class="sd-d1">
@ -21,17 +21,25 @@
</template>
<script>
import {getSourcetype} from "@/api/ThemeAnalizeDec"
import createOpt from "./opt"
export default {
name: "SourceDivide",
data() {
return {
load: false,
opt: {},
labelData: [
{key: '微博', value: 1250},
{key: '微信', value: 2400}
],
total: 14000,
labelData: [],
total: 0,
colors: [
'#546fc5',
'#91cb74',
'#f9c857',
'#ed6565',
'#72bfde',
'#3aa272',
'#fb8351',
'rgb(135,71,165)',
"#54BF93",
"#3373CC",
"#CC9D12",
@ -41,18 +49,37 @@ export default {
"#8d4653",
"#91e8e1",
"#f7a35c",
"#90ed7d",
"#54BF93",
"#3373CC",
"#CC9D12",
"#f15c80",
"#e4d354",
"#8085e8",
"#8d4653",
"#91e8e1",
"#f7a35c",
"#90ed7d",
],
form: {
token: ''
}
}
},
created() {
this.form = this.$route.query;
this.getData()
},
methods: {
getData() {
let obj = Object.assign({}, this.form);
this.load = true;
getSourcetype(obj).then(res => {
let data = res.data;
let labelData = [];
let totalVal = 0;
for(let key in data) {
let obj = {
key: key,
value: data[key]
};
totalVal = totalVal + data[key] * 1.0;
labelData.push(obj);
};
this.labelData = labelData;
this.total = totalVal
this.opt = createOpt(labelData, this.colors);
this.load = false
})
}
}
}
@ -73,8 +100,8 @@ export default {
height: calc(100% - 48px);
}
.sd-d2 {
width: 430px;
height: auto;
width: 460px;
height: calc(100% - 48px);
margin-left: 16px;
}
}

@ -35,7 +35,7 @@ export default function createOpt(ds = [], colors= []) {
{
name: 'Access From0',
type: 'pie',
radius: ['65%', '80%'],
radius: ['62%', '74%'],
avoidLabelOverlap: false,
label: {
show: false,
@ -62,7 +62,7 @@ export default function createOpt(ds = [], colors= []) {
{
name: 'Access From1',
type: 'pie',
radius: ['86%', '94%'],
radius: ['79%', '86%'],
avoidLabelOverlap: false,
label: {
show: false,

@ -1,12 +1,135 @@
<template>
<div class="ts-outter">
<v-label-div title="主题调性分布"></v-label-div>
<div class="ts-outter" v-loading="load">
<v-label-div title="主题调性分布/男女比例认证非认证">
<v-tab-group :btns="['性别', '认证']" @change="handlerTab"></v-tab-group>
</v-label-div>
<div class="ts-inner">
<div class="ts-d1">
<v-echarts :opt="opt"></v-echarts>
</div>
<div class="ts-d2">
<vue-scroll>
<v-label-ctx v-for="(item,index) in labelData"
:key="index" :label="item.key"
:cont="item.value"
:percentage="(item.value/totalData*100).toFixed(2) +'%'"
:color="colors[index]" contLabel="数量"
:eStyle="{ height: '8.4rem' }">
</v-label-ctx>
</vue-scroll>
</div>
</div>
</div>
</template>
<script>
import {getSexMerge} from '@/api/ThemeAnalizeDec'
import createOpt from './opt'
export default {
name: "ThemeSource"
name: "ThemeSource",
data() {
return {
load: false,
form: {
token: ''
},
opt: {},
labelData: [],
attestation: [], //
sex: [], //
totalData: 0,
labelData: [],
colors: [
"#54BF93",
"#3373CC",
"#CC9D12",
"#f15c80",
"#e4d354",
"#8085e8",
"#8d4653",
"#91e8e1",
"#f7a35c",
"#90ed7d",
"#54BF93",
"#3373CC",
"#CC9D12",
"#f15c80",
"#e4d354",
"#8085e8",
"#8d4653",
"#91e8e1",
"#f7a35c",
"#90ed7d",
],
}
},
created() {
this.form = this.$route.query;
this.getData()
},
methods: {
getData() {
let obj = Object.assign({}, this.form);
this.load = true;
getSexMerge(obj).then(res => {
let data = res.data;
let attestation = data.attestation || {};
let sex = data.sex || {};
let total = 0;
let wSex = [];
for (let key in sex) {
let obj = {
key: key,
value: sex[key],
};
total += sex[key] * 1;
wSex.push(obj);
}
let wAttestation = [];
for (let key in attestation) {
let obj = {
key: key,
value: attestation[key],
};
wAttestation.push(obj);
}
this.sex = wSex;
this.attestation = wAttestation;
this.totalData = total;
this.labelData = this.sex;
this.opt = createOpt(this.sex, [
"#54BF93",
"#3373CC",
"#CC9D12",
]);
this.load = false;
})
},
//
handlerTab(n) {
if (n === 0) {
this.labelData = this.sex;
let total = 0;
this.sex.forEach((ele) => {
total += ele.value * 1;
});
this.totalData = total;
this.opt = createOpt(this.sex, [
"#54BF93",
"#3373CC",
"#CC9D12",
]);
} else {
this.labelData = this.attestation;
let total = 0;
this.attestation.forEach((ele) => {
total += ele.value * 1;
});
this.totalData = total;
this.opt = createOpt(this.attestation, this.colors);
}
},
}
}
</script>
@ -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;
}
}
}
</style>

@ -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
}
]
}
}

@ -1,19 +1,119 @@
<template>
<div class="ts-container1">
<div class="ts-container1" v-loading="load">
<v-label-div title="渠道分布"></v-label-div>
<div class="ts-inner">
<v-echarts :opt="opt"></v-echarts>
<v-echarts :opt="opt" @clickMark="clickMark"></v-echarts>
<div class="vshow" v-if="modelShow" :style="modelStyle">
<vLabel-div title="实时热点事件">
<a-button @click="closeBox"></a-button>
</vLabel-div>
<div class="vshow-item" v-for="(item, index) in urlArr" :key="index">
<a class="vshow-link" :href="item.url" v-if="item.column == activeCol" target="tar">{{item.title}}</a>
</div>
</div>
</div>
</div>
</template>
<script>
import {getSourcetypeTime} from "@/api/ThemeAnalizeDec"
import {doStr} from "@/utils/gol/dataTool"
import createOpt from "./opt";
export default {
name: "TotalSource",
data() {
return {
opt: {}
load: false,
////
modelStyle:{
left: '',
top: ''
},
modelShow: false,
ecbox:{//
width:618,
height:460
},
ecmodel:{//
width:300,
height:280
},
activeCol: 0,
//-*-//
opt: {},
form: {
token: ''
},
urlArr: []
}
},
created() {
this.form = this.$route.query;
this.getData()
},
methods: {
getData() {
let obj = Object.assign({}, this.form);
this.load = true;
getSourcetypeTime(obj).then(res => {
let data = res.data || [];
let dx = [];
let ds = [];
let hotTopArr = [];
let urlArr = [];
let hotIndex = [];
let dataI = 0;
data.forEach((ele) => {
let time = ele.Time;
let value = ele.Data;
dx.push(time);
ds.push(value);
if(ele.hotTop[0]) {
ele.hotTop.forEach((e) => {
let urlObj = {
column: dataI,
title: doStr(e.title, 30),
url: e.url
};
urlArr.push(urlObj);
})
}
let obj = {
label: time,
hotTop: ele.hotTop
}
hotTopArr.push(obj);
dataI = dataI + 1;
});
this.urlArr = urlArr;
//
for(let i = 0; i<hotTopArr.length; i++) {
if(hotTopArr[i].hotTop != '') {
hotIndex.push(i)
}
}
this.opt = createOpt(dx, ds, hotTopArr, hotIndex);
this.load = false;
})
},
clickMark(data) {
this.activeCol = data.index
this.modelShow = true;
let mw = window.event;
if((this.ecbox.width - mw.offsetX - 20) > this.ecmodel.width) {
this.modelStyle.left = mw.offsetX + 20 + "px"
} else {
this.modelStyle.left = mw.offsetX - this.ecmodel.width - 20 + "px"
}
if((this.ecbox.height - mw.offsetY - 20) > this.ecmodel.height) {
this.modelStyle.top = mw.offsetY + 1500 + "px"
} else {
this.modelStyle.top = mw.offsetY - this.ecmodel.height + 1500 + "px"
}
},
closeBox() {
this.modelShow = false;
},
}
}
</script>
@ -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);
}
}
</style>

@ -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<arr.length; i++){
if(arr[i].data[e] * 1 > 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 = `<div>${param[0].name}</div>`;
let hotTop = hotTopArr.find(ele => param[0].name === ele.label).hotTop;
hotTop.forEach(e => {
htmlStr += `<div style="width: 200px">热门:${doStr(e.title, 18)}</div>`
})
for(let i = 0; i < param.length; i++) {
htmlStr += `<div style="display: flex;justify-content: space-between;"><span>${param[i].marker}${param[i].seriesName} </span><span>${param[i].value}</span></div>`
}
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<dx.length-1;i++){
//连续两条带小时
if(dx[i].indexOf(rex) === -1 && dx[i+1].indexOf(rex) === -1){
isCont = true;
break;
}
}
if(isCont == true) {
str = value.substring(10, 16)
} else {
str = value.substring(5, 10)
}
return str;
}
},
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
}
}

@ -1,5 +1,5 @@
<template>
<div class="tv-container1">
<div class="tv-container1" v-loading="load">
<v-label-div title="总声量趋势"></v-label-div>
<div class="tv-inner">
<v-echarts :opt="opt"></v-echarts>
@ -8,15 +8,42 @@
</template>
<script>
import {getVolumeTime} from "@/api/ThemeAnalizeDec"
import createOpt from "./opt"
export default {
name: "TotalVolume",
data() {
return {
opt: {}
load: false,
opt: {},
form: {
token: ''
}
}
},
created() {
this.form = this.$route.query;
this.getData()
},
methods: {
getData() {
let obj = Object.assign({}, this.form);
this.load = true;
getVolumeTime(obj).then(res => {
let data = res.data || [];
let dx = [];
let ds = [];
let hotIndex = [];
data.forEach(ele => {
let key = ele.Time;
let value = ele.value;
dx.push(key);
ds.push(value);
})
this.opt = createOpt(dx, ds, hotIndex);
this.load = false;
})
}
}
}
</script>

@ -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<dx.length-1;i++){
//连续两条带小时
if(dx[i].indexOf(rex) === -1 && dx[i+1].indexOf(rex) === -1){
isCont = true;
break;
}
}
if(isCont == true) {
str = value.substring(10, 16)
} else {
str = value.substring(5, 10)
}
return str;
}
},
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)'
}]),
}},
markPoint: {
data: mark,
}
}
]
};
}

@ -1,5 +1,5 @@
<template>
<div class="container1">
<div class="container1" v-loading="load">
<v-label-div title="传播分析">
</v-label-div>
<div class="inner">
@ -24,7 +24,7 @@
<v-ranking-kmd v-for="(item,index) in d1" :key="index" :lineShow="index === 0 ? false : true" :num="index + 1" :label="item.label|doStr(8)" :val="item.val"></v-ranking-kmd>
</div>
<div class="rank1" style="margin-left: 14px">
<v-ranking-kmd v-for="(item,index) in d2" :key="index" :lineShow="index === 0 ? false : true" :num="index + 1" :label="item.label|doStr(8)" :val="item.val"></v-ranking-kmd>
<v-ranking-kmd v-for="(item,index) in d2" :key="index" :lineShow="index === 0 ? false : true" :num="index + 6" :label="item.label|doStr(8)" :val="item.val"></v-ranking-kmd>
</div>
</div>
</div>
@ -33,6 +33,7 @@
</template>
<script>
import {getCoreDiffuse, getCoreWebsite} from "@/api/ThemeAnalizeDec"
import vRankingKmd from "./v-ranking-kmd"
import {bigNumberTransform} from "@/utils/gol/dataTool"
export default {
@ -42,6 +43,7 @@ export default {
},
data() {
return {
load: false,
bigNumberTransform: bigNumberTransform,
d1: [
{label: '媒体1', val: 1200},
@ -51,15 +53,54 @@ export default {
d2: [
{label: '媒体6', val: 3190}
],
list: [
{ _source:
{profileimgurl: '', user_author: '1111', weibofans: '1223'}
},
{ _source:
{profileimgurl: '', user_author: '2222', weibofans: '321214'}
},
]
list: [],
form: {
token: ''
}
}
},
created() {
this.form = this.$route.query;
this.getData();
this.getMediaData();
},
methods: {
getData() {
let obj = Object.assign({}, this.form);
this.load = true;
getCoreDiffuse(obj).then(res => {
let data = res.data;
let mediaList = []
data.forEach(ele => {
let o = {
_source: {
profileimgurl: ele._source.profileimgurl,
user_author: ele._source.user_author,
weibofans: ele._source.weibofans
}
};
mediaList.push(o)
})
this.list = mediaList;
this.load = false;
})
},
getMediaData() {
let obj = Object.assign({}, this.form);
getCoreWebsite(obj).then(res => {
let data = res.data;
let mediaList = [];
for(let key in data) {
let obj = {
label: key,
val: data[key]
};
mediaList.push(obj)
}
this.d1 = mediaList.slice(0, 5);
this.d2 = mediaList.slice(5, 10)
})
},
}
}
</script>

@ -1,12 +1,69 @@
<template>
<div class="ua-outter">
<v-label-div title="用户区域分布"></v-label-div>
<div class="ua-inner">
<div class="ua-d1">
<v-echarts :opt="opt1"></v-echarts>
</div>
<div class="ua-d2">
<v-echars-map :opt="opt2"></v-echars-map>
</div>
</div>
</div>
</template>
<script>
import {getRegion} from "@/api/ThemeAnalizeDec"
import createOptD1 from "./opt1";
import createOptD2 from "./opt2";
export default {
name: "UserArea"
name: "UserArea",
data() {
return {
form: {
token: ''
},
opt1: {},
opt2: {}
}
},
created() {
this.form = this.$route.query;
this.getData();
},
methods: {
getData() {
let obj = Object.assign({}, this.form);
getRegion(obj).then(res => {
let data = res.data || {};
let arr = this.toArr(data);
let dx = []; //
let ds = []; //
arr.forEach((ele) => {
ele.name = ele.name.replace('省','')
let value = ele.value;
dx.push(ele.name);
ds.push(value);
});
let dm = arr //
this.opt1 = createOptD1(dx, ds);
this.opt2 = createOptD2(dm);
this.load = false;
})
},
//
toArr(obj) {
let arr = [];
for (let key in obj) {
let o = {
name: key,
value: obj[key] * 1,
};
arr.push(o);
}
return arr;
},
}
}
</script>
@ -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;
}
}
}
</style>

@ -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'
}]),
}
]
}
}

@ -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
}
]
}
}

@ -1,12 +1,41 @@
<template>
<div class="ut-outter">
<div class="ut-outter" v-loading="load">
<v-label-div title="用户热议话题"></v-label-div>
<div class="ut-inner">
<v-echarts :opt="opt"></v-echarts>
</div>
</div>
</template>
<script>
import {getHottalk} from "@/api/ThemeAnalizeDec"
import createWordCloud from "@/utils/gol/bubbleWord";
export default {
name: "UserTopic"
name: "UserTopic",
data() {
return {
load: false,
form: {
token: ''
},
opt: {}
}
},
created() {
this.form = this.$route.query;
this.getData()
},
methods: {
getData() {
let obj = Object.assign({}, this.form);
this.load = true;
getHottalk(obj).then(res => {
let data = res.data;
this.opt = createWordCloud(data);
this.load = false
})
}
}
}
</script>
@ -17,5 +46,9 @@ export default {
border: 2px solid #0f2a4d;
margin-left: 16px;
overflow: hidden;
.ut-inner {
width: 100%;
height: calc(100% - 48px);
}
}
</style>

@ -1,5 +1,5 @@
<template>
<div class="wc-outter">
<div class="wc-outter" v-loading="load">
<v-label-div title="词云">
<div>
<v-tab-group
@ -9,21 +9,100 @@
</div>
</v-label-div>
<div class="wc-inner">
<v-echarts :opt="opt"></v-echarts>
</div>
</div>
</template>
<script>
import {getHotWord,getPositive,getNegative} from "@/api/ThemeAnalizeDec"
import createWordCloud from "@/utils/gol/bubbleWord";
export default {
name: "WordCloud",
data() {
return {
load: false,
form: {
token: ''
},
opt: {},
positiveData: {},
negativeData: {},
hotData: {},
}
},
created() {
this.form = this.$route.query;
this.getData()
},
methods: {
handlerTab() {},
getData() {
this.load = true;
Promise.all([this.getP(), this.getN(), this.getH()]).then(() => {
//
this.opt = createWordCloud(this.positiveData);
this.load = false;
});
},
//
getP() {
return new Promise((resolve, reject) => {
let obj = Object.assign({}, this.form);
getPositive(obj)
.then((res) => {
this.positiveData = res.data || {};
resolve(res);
})
.catch(() => {
reject(false);
});
});
},
//
getN() {
return new Promise((resolve, reject) => {
let obj = Object.assign({}, this.form);
getNegative(obj)
.then((res) => {
this.negativeData = res.data || {};
resolve(res);
})
.catch(() => {
reject(false);
});
});
},
//
getH() {
return new Promise((resolve, reject) => {
let obj = Object.assign({}, this.form);
getHotWord(obj)
.then((res) => {
this.hotData = res.data || {};
resolve(res);
})
.catch(() => {
reject(false);
});
});
},
//
handlerTab(n) {
switch (n) {
case 0:
this.opt = createWordCloud(this.positiveData);
break;
case 1:
this.opt = createWordCloud(this.negativeData);
break;
case 2:
this.opt = createWordCloud(this.hotData);
break;
default:
this.opt = createWordCloud(this.positiveData);
break;
}
},
}
}
</script>
@ -35,5 +114,9 @@ export default {
border: 2px solid #0f2a4d;
margin-left: 16px;
overflow: hidden;
.wc-inner {
width: 100%;
height: calc(100% - 48px);
}
}
</style>

@ -28,10 +28,10 @@
<volumeArea></volumeArea>
<userArea></userArea>
</div>
<div class="d8">
<!-- <div class="d8">
<peopleGender></peopleGender>
<peopleAuthen></peopleAuthen>
</div>
</div> -->
<div class="wb-analize">
<weiboAnalize></weiboAnalize>
</div>
@ -40,6 +40,7 @@
</template>
<script>
import {getSummarizeMerge} from "@/api/ThemeAnalizeDec"
import totalVolume from "./TotalVolume" //
import eventTransform from "./EventTransform" //
import transformAnalize from "./TransformAnalize" //
@ -73,14 +74,32 @@ export default {
data() {
return {
themeObj: {
title: '特斯拉续航能力实测',
content: '特斯拉续航能力实测'
title: '',
content: ''
},
form: {
token: ''
}
}
},
created() {
this.form = this.$route.query;
this.getTitleData();
},
methods: {
goBack() {
this.$router.go(-1);
},
getTitleData() {
let obj = Object.assign({}, this.form);
getSummarizeMerge(obj).then(res => {
let data = res.data;
let o = {
title: data.Summarize,
content: data.AffectionsMsg
};
this.themeObj = o
})
}
}
}

@ -0,0 +1,129 @@
import { getQuDao, getQingGan, getTwoTime} from "@/api/comm";
import {getList} from "@/api/ThemeAnalizeDec"
export default {
//获取表格数据
getTableData() {
let obj = Object.assign({}, this.form);
getList(obj).then(res => {
let data = res.data;
this.totalNum = res.totalNum;
this.pagination.total = res.totalNum;
let arr = [];
let ids = [];
let ssk = [...this.sk];
data.forEach((ele) => {
let _source = ele._source;
let id = _source.id;
ids.push(id);
arr.push(_source);
});
if(this.tableAll) {
ids.forEach(ele => {
let n = this.sk.findIndex(e => {
return ele === e;
})
if(n === -1) {
ssk.push(ele);
}
})
this.sk = ssk;
}
this.tbData = arr;
this.tableLoading = false;
})
},
// 获取时间选项
getTime() {
return new Promise((resolve, reject) => {
getTwoTime().then((res) => {
let data = res.data;
this.timesSel = data;
this.form.sTimeType = this.timesSel[0].key;
let arr = [];
data.forEach((ele) => {
let value = ele.value;
arr.push(value);
});
this.buttonTime = arr;
resolve(data);
})
.catch(() => {
reject(false);
});
});
},
// 获取渠道
getQuDao() {
return new Promise((resolve, reject) => {
getQuDao().then((res) => {
let data = res.data;
let arr = [];
data.forEach((ele) => {
let obj = null;
if(ele.key != -1) {
obj = {
label: ele.value,
value: ele.key,
};
arr.push(obj);
}
});
this.plainOptions = arr;
resolve(arr);
})
.catch(() => {
reject(false);
});
});
},
// 获取情感
getQingGan() {
return new Promise((resolve, reject) => {
getQingGan().then((res) => {
let data = res.data;
let arr = [];
data.forEach((ele) => {
if(ele.key != -1) {
let obj = {
label: ele.value,
value: ele.key,
};
arr.push(obj);
}
});
this.plainOptions1 = arr;
resolve(arr);
})
.catch(() => {
reject(false);
});
});
},
// 给后台传渠道
doFormQudao(val = []) {
let arr = [];
val.forEach((ele) => {
let n = this.plainOptions.findIndex((e) => {
return e.label === ele;
});
if (n != -1) {
arr.push(this.plainOptions[n].value);
}
});
this.quDao = arr;
this.form.sQuDao = arr.toString();
},
// 给后台传情感和负面等级
doFormQS(val = []) {
let qingGan = [];
val.forEach((ele) => {
let n1 = this.plainOptions1.findIndex((e) => {
return e.label === ele;
});
if (n1 != -1) {
qingGan.push(this.plainOptions1[n1].value);
}
});
this.form.sQingGan = qingGan.toString();
},
}

@ -7,7 +7,8 @@
</v-label-div>
<div class="d-inner-d1">
<span class="s1">时间</span>
<a-range-picker show-time v-model="selTime" style="margin-left: 0.8rem" :disabled-date="disabledDate" @calendarChange="calendarPriceRangeChange" :size="$vuiSize" valueFormat="YYYY-MM-DD HH:mm:ss" @change="handlerChangeTime">
<v-tab-group :value="tValue" :style="{ background: 'transparent' }" :btns="buttonTime" @change="changeTime"></v-tab-group>
<a-range-picker show-time v-model="selTime" style="margin-left: 0.8rem" :disabled-date="disabledDate" @calendarChange="calendarPriceRangeChange" :size="$vuiSize" valueFormat="YYYY-MM-DD HH:mm:ss" v-if="form.sTimeType == selVal" @change="handlerChangeTime">
<a-icon slot="suffixIcon" type="calendar" />
</a-range-picker>
</div>
@ -23,7 +24,7 @@
<a-checkbox :disabled="noClick" :indeterminate="dxIndeterminate" :checked="dxCheckAll" @change="onCheckAllChangeDx">
全部
</a-checkbox>
<a-checkbox-group v-model="diaoXing" :disabled="noClick" :options="plainOptions2" @change="(val) => onChange(val, 'diaoXing')" />
<a-checkbox-group v-model="diaoXing" :disabled="noClick" :options="plainOptions1" @change="(val) => onChange(val, 'diaoXing')" />
</div>
<div class="d-inner-d1">
<span class="s1">关键词</span>
@ -36,7 +37,7 @@
</div>
<div class="d-inner-d1">
<span class="s1">去重筛选</span>
<v-tab-group :value="gValue2" :style="{ background: 'transparent' }" :btns="btnTimes2" @change="handlerTime"></v-tab-group>
<v-tab-group :value="gValue2" :style="{ background: 'transparent' }" :btns="btnTimes2" @change="handlerTime2"></v-tab-group>
</div>
<div class="d-inner-d2">
<span class="s1">共计<span class="ss1">{{totalNum}}</span>条数据已选中<span class="ss1"></span>条数据</span>
@ -45,34 +46,66 @@
<a-button type="primary" @click="goThemeBoard"></a-button>
</div>
</div>
<v-table ref="rtable" :row-selection="rowSelection" :columns="columns" :data="tbData" :loading="tableLoading" :pagination="pagination" @change="handlerPage">
<template slot="titlex" slot-scope="text, record">
<a :href="record.url" style="color: #fff" target="_blank">{{ text|doStr(100) }}</a>
<a-tag color="#108ee9" v-if="record.affections === 1" style="margin-left: 0.6rem;margin-right: 0px;"></a-tag>
<a-tag color="#fece42" v-if="record.affections === 3" style="margin-left: 0.6rem;margin-right: 0px"></a-tag>
<a-tag color="#cb7632" v-if="record.affections === 2" style="margin-left: 0.6rem;margin-right: 0px"></a-tag>
<a-tag color="#d48c44" v-if="record.crisis === 1" style="margin-left: 0.6rem;margin-right: 0px;"></a-tag>
<a-tag color="#d46a46" v-if="record.crisis === 2" style="margin-left: 0.6rem;margin-right: 0px;"></a-tag>
<a-tag color="#d81c33" v-if="record.crisis === 3" style="margin-left: 0.6rem;margin-right: 0px;"></a-tag>
</template>
</v-table>
</div>
</div>
</div>
</template>
<script>
import tableEvent from "./tableEvent";
import getApi from "./getApi";
import {rowSelection} from "./tableEvent";
export default {
name: "ThemeData",
computed: {
rowSelection
},
data() {
return {
noClick: false,
totalNum: 0,
form: {
action: 'getList',
sTimeType: '',
sQuDao: '',
sQingGan: '',
iPageIndex: 1,
iPageSize: 20,
sTitle: "",
token: "",
sType: "ZhuTiFenXiBl",
sGuid: '',
iGroupBy: '', // 0 1
isSourcetype: '', //1 0
listType: '', //0 1 eventList
website: '',
iTimeType: '' // 0 1
},
//
tValue: 0,
selVal: 4,
selTime: [],
timesSel: [],
buttonTime: [],
//
quDao: [],
plainOptions: [
{label: '新闻', value: 'news'},
{label: '论坛', value: 'forum'},
],
plainOptions: [],
qdIndeterminate: true,
qdCheckAll: false,
//
diaoXing: [],
plainOptions2: [
{label: '正面', value: 'poz'},
{label: '中性', value: 'mid'},
{label: '负面', value: 'neg'},
],
plainOptions1: [],
dxIndeterminate: true,
dxCheckAll: false,
//
@ -81,26 +114,50 @@ export default {
//
gValue2: 0,
btnTimes2:['不去重','相似度去重'],
//
columns: [
{
title: "标题及内容",
dataIndex: "title",
key: "title",
scopedSlots: { customRender: "titlex" },
},
{
title: "来源",
dataIndex: "source",
key: "source",
},
{
title: "作者",
dataIndex: "user_author",
key: "user_author",
},
{
title: "发布时间",
dataIndex: "sourcetime",
key: "sourcetime",
width: 200,
},
],
pagination: {
total: 0,
current: 1,
pageSize: 20,
},
tbData: [],
tableLoading: false,
selectedRows: [],
sk: [],
selectedRowKeys: "",
secIds: [],
}
},
created() {
this.initData();
},
methods: {
handlerBack() {
this.$router.go(-1);
},
goThemeBoard() {
this.$router.push({path: '/ThemeBoard'})
},
//
calendarPriceRangeChange() {},
handlerChangeTime() {},
disabledDate() {},
onChange(val, type) {}, //
//
onCheckAllChangeQd() {},
//
onCheckAllChangeDx() {},
//
handlerTime() {}
...tableEvent,
...getApi
}
}
</script>

@ -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();
},
}
Loading…
Cancel
Save